Browse Source

safety

master
fmk 3 years ago
parent
commit
8246ce77ba
  1. 16
      lib/community/community_details.dart
  2. 4
      lib/community/community_view/community_dynamic.dart
  3. 2
      lib/home/home_view/coupon.dart
  4. 102
      lib/home/home_view/featured_acticvity.dart
  5. 46
      lib/home/home_view/home_integral_store.dart
  6. 4
      lib/mine/mine_page.dart
  7. 146
      lib/order/order_detail_page.dart
  8. 6
      lib/order/order_history_page.dart
  9. 11
      lib/order/order_utils.dart
  10. 10
      lib/retrofit/min_api.dart
  11. 2
      lib/retrofit/min_api.g.dart
  12. 10
      lib/retrofit/retrofit_api.dart
  13. 6
      lib/retrofit/retrofit_api.g.dart
  14. 244
      lib/settlement/settlement.dart
  15. 60
      lib/settlement/settlement_view/activity_coupon_remarks.dart
  16. 4
      lib/settlement/settlement_view/pay_method.dart
  17. 2
      lib/store/store_order.dart
  18. 84
      lib/store/store_view/shop_goods.dart
  19. 4
      lib/web/web_page.dart
  20. 2
      lib/web/web_view/comment_list.dart
  21. 100
      lib/web/web_view/web_content.dart

16
lib/community/community_details.dart

@ -197,7 +197,7 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
comunity.selfLike = !comunity.selfLike ?? false; comunity.selfLike = !comunity.selfLike ?? false;
}); });
} else { } else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center); // SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
} }
} }
@ -210,7 +210,8 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
"relationalType": 1 "relationalType": 1
}).catchError((error) {}); }).catchError((error) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
commentKey.currentState.initState(); CommentListState state = commentKey.currentState;
state.queryMemberCommentList();
commentTextController.text = ""; commentTextController.text = "";
FocusScope.of(context).unfocus(); FocusScope.of(context).unfocus();
_queryMemberCommentList(); _queryMemberCommentList();
@ -254,17 +255,18 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
} }
/// ///
_delCommentTips() { _delCommentTips(memberComment) {
SmartDialog.show(widget: Tips(() { SmartDialog.show(widget: Tips(() {
delComment(); delComment(memberComment);
})); }));
} }
/// ///
delComment() async { delComment(memberComment) async {
BaseData baseData = await apiService.delComment(""); BaseData baseData = await apiService.delComment(memberComment.id);
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
commentKey.currentState.initState(); CommentListState state = commentKey.currentState;
state.queryMemberCommentList();
} }
} }

4
lib/community/community_view/community_dynamic.dart

@ -120,7 +120,7 @@ class _CommunityDynamic extends State<CommunityDynamic> {
widget.exitFull(); widget.exitFull();
SmartDialog.showToast("关注成功", alignment: Alignment.center); SmartDialog.showToast("关注成功", alignment: Alignment.center);
} else { } else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center); // SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
} }
} }
@ -131,7 +131,7 @@ class _CommunityDynamic extends State<CommunityDynamic> {
widget.exitFull(); widget.exitFull();
SmartDialog.showToast("删除成功", alignment: Alignment.center); SmartDialog.showToast("删除成功", alignment: Alignment.center);
} else { } else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center); // SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
} }
} }

2
lib/home/home_view/coupon.dart

@ -59,7 +59,7 @@ class _CouponView extends State<CouponView> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Column( return (coupons == null || coupons.length == 0) ? Container(height: 20,) : Column(
children: [ children: [
SizedBox( SizedBox(
height: 20.h, height: 20.h,

102
lib/home/home_view/featured_acticvity.dart

@ -69,19 +69,25 @@ class _FeaturedActivity extends State<FeaturedActivity> {
child: Row( child: Row(
children: [ children: [
if (activityList != null && activityList.length > 0) if (activityList != null && activityList.length > 0)
Container( GestureDetector(
child: stackItem(18.sp, activityList[0]), onTap: () {
margin: EdgeInsets.symmetric(horizontal: 5.w), Navigator.of(context).pushNamed('/router/web_page',
width: (MediaQuery.of(context).size.width - 42) / 2, arguments: {"activityId": activityList[0].id});
height: 190.h, },
decoration: BoxDecoration( child: Container(
borderRadius: BorderRadius.circular(4), child: stackItem(18.sp, activityList[0]),
color: Colors.red, margin: EdgeInsets.symmetric(horizontal: 5.w),
image: DecorationImage( width: (MediaQuery.of(context).size.width - 42) / 2,
image: NetworkImage( height: 190.h,
activityList[0].coverImg, decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
color: Colors.red,
image: DecorationImage(
image: NetworkImage(
activityList[0].coverImg,
),
fit: BoxFit.cover,
), ),
fit: BoxFit.cover,
), ),
), ),
), ),
@ -90,41 +96,53 @@ class _FeaturedActivity extends State<FeaturedActivity> {
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [ children: [
Container( GestureDetector(
child: stackItem(12.sp, activityList[1]), onTap: () {
margin: EdgeInsets.symmetric(horizontal: 5.w), Navigator.of(context).pushNamed('/router/web_page',
width: (MediaQuery.of(context).size.width - 42) / 2, arguments: {"activityId": activityList[1].id});
height: 190.h / 2, },
decoration: BoxDecoration( child: Container(
borderRadius: BorderRadius.circular(4), child: stackItem(12.sp, activityList[1]),
color: Colors.green, margin: EdgeInsets.symmetric(horizontal: 5.w),
image: DecorationImage( width: (MediaQuery.of(context).size.width - 42) / 2,
image: NetworkImage( height: 190.h / 2,
activityList[2].coverImg, decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
color: Colors.green,
image: DecorationImage(
image: NetworkImage(
activityList[1].coverImg,
),
fit: BoxFit.cover,
), ),
fit: BoxFit.cover,
), ),
), ),
), ),
SizedBox( SizedBox(
height: 5, height: 5,
), ),
Container( GestureDetector(
child: stackItem(12.sp, activityList[2]), onTap: () {
margin: EdgeInsets.symmetric(horizontal: 5.w), Navigator.of(context).pushNamed('/router/web_page',
width: (MediaQuery.of(context).size.width - 42) / 2, arguments: {"activityId": activityList[2].id});
height: 190.h / 2, },
decoration: BoxDecoration( child: Container(
borderRadius: BorderRadius.circular(4), child: stackItem(12.sp, activityList[2]),
color: Colors.blue, margin: EdgeInsets.symmetric(horizontal: 5.w),
image: DecorationImage( width: (MediaQuery.of(context).size.width - 42) / 2,
image: NetworkImage( height: 190.h / 2,
activityList[2].coverImg, decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
color: Colors.blue,
image: DecorationImage(
image: NetworkImage(
activityList[2].coverImg,
),
fit: BoxFit.cover,
), ),
fit: BoxFit.cover,
), ),
), ),
) ),
], ],
), ),
), ),
@ -184,13 +202,7 @@ class _FeaturedActivity extends State<FeaturedActivity> {
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(20),
), ),
alignment: Alignment.center, alignment: Alignment.center,
child: child: Row(
GestureDetector(
onTap: (){
Navigator.of(context).pushNamed('/router/web_page',
arguments: {"activityId": activity.id});
},
child:Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
@ -208,7 +220,7 @@ class _FeaturedActivity extends State<FeaturedActivity> {
size: 12, size: 12,
), ),
], ],
)), ),
), ),
], ],
); );

46
lib/home/home_view/home_integral_store.dart

@ -45,56 +45,12 @@ class _HomeIntegralStore extends State<HomeIntegralStore> {
), ),
child: Column( child: Column(
children: [ children: [
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Expanded(
// flex: 1,
// child: ItemTitle(
// text: S.of(context).jifenshangcheng,
// imgPath: "assets/image/icon_points_mall.png",
// ),
// ),
// GestureDetector(
// onTap: widget.callback,
// child: Container(
// padding: EdgeInsets.symmetric(
// vertical: 3.h,
// horizontal: 8.w,
// ),
// margin: EdgeInsets.only(right: 16.w),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(11.5),
// color: Color(0xFF32A060),
// ),
// child: Row(
// children: [
// Text(
// "GO",
// style: TextStyle(
// fontSize: 14.sp,
// fontWeight: FontWeight.bold,
// color: Colors.white,
// ),
// ),
// Icon(
// Icons.chevron_right,
// color: Colors.white,
// size: 18,
// ),
// ],
// ),
// ),
// ),
// ],
// ),
ItemTitle( ItemTitle(
text: "大家都在兑换", text: "大家都在兑换",
imgPath: "assets/image/icon_points_mall.png", imgPath: "assets/image/icon_points_mall.png",
), ),
SizedBox( SizedBox(
height: 14.h, height: 10.h,
), ),
Divider( Divider(
thickness: 1, thickness: 1,

4
lib/mine/mine_page.dart

@ -331,7 +331,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
), ),
), ),
Text( Text(
"(" + (infoNumber != null ?infoNumber.follow.toString() :"()") +")", "(" + (infoNumber != null ?infoNumber.follow.toString() :"0") +")",
style: TextStyle( style: TextStyle(
color: Color(0xFF000000), color: Color(0xFF000000),
fontSize: 15.sp, fontSize: 15.sp,
@ -351,7 +351,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
), ),
), ),
Text( Text(
"(" + (infoNumber != null ?infoNumber.fans.toString() :"()") +")", "(" + (infoNumber != null ?infoNumber.fans.toString() :"0") +")",
style: TextStyle( style: TextStyle(
color: Color(0xFF000000), color: Color(0xFF000000),
fontSize: 15.sp, fontSize: 15.sp,

146
lib/order/order_detail_page.dart

@ -115,84 +115,87 @@ class _OrderDetailPage extends State<OrderDetailPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Stack( return Container(
children: [ color: Colors.white,
Positioned( child: Stack(
top: 0, children: [
left: 0, Positioned(
right: 0, top: 0,
child: Container( left: 0,
height: (orderStatus >= 4 ? 118.h : 118.h) + right: 0,
MediaQuery.of(context).padding.top + child: Container(
kToolbarHeight + height: (orderStatus >= 4 ? 118.h : 118.h) +
48.h, MediaQuery.of(context).padding.top +
color: Color(0xFF3A405A), kToolbarHeight +
width: MediaQuery.of(context).size.width, 48.h,
), color: Color(0xFF3A405A),
), width: MediaQuery.of(context).size.width,
Positioned(
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: MyAppBar(
title: "订单详情",
titleColor: Colors.white,
background: Colors.transparent,
leadingColor: Colors.white,
brightness: Brightness.dark,
), ),
body: Container( ),
child: SingleChildScrollView( Positioned(
physics: BouncingScrollPhysics(), child: Scaffold(
child: Container( backgroundColor: Colors.transparent,
child: Column( appBar: MyAppBar(
children: [ title: "订单详情",
/// titleColor: Colors.white,
OrderStatus( background: Colors.transparent,
orderStatus, leadingColor: Colors.white,
isTakeOut, brightness: Brightness.dark,
sendStatus, ),
payStatus, body: Container(
refundStatus, child: SingleChildScrollView(
title, physics: BouncingScrollPhysics(),
center, child: Container(
orderInfo, child: Column(
), children: [
///
OrderStatus(
orderStatus,
isTakeOut,
sendStatus,
payStatus,
refundStatus,
title,
center,
orderInfo,
),
/// ///
OrderAddress( OrderAddress(
orderStatus, orderStatus,
isTakeOut, isTakeOut,
sendStatus, sendStatus,
payStatus, payStatus,
refundStatus, refundStatus,
title, title,
center, center,
paySelected, paySelected,
_orderCancel, _orderCancel,
orderInfo, orderInfo,
), ),
/// ///
OrderCommodity(orderInfo), OrderCommodity(orderInfo),
/// ///
OrderInfoView(orderInfo), OrderInfoView(orderInfo),
Container( Container(
height: 42.h, height: 42.h,
), ),
], ],
),
), ),
), ),
), ),
), ),
left: 0,
right: 0,
top: 0,
bottom: 0,
), ),
left: 0, ],
right: 0, ),
top: 0,
bottom: 0,
),
],
); );
} }
@ -208,10 +211,15 @@ class _OrderDetailPage extends State<OrderDetailPage> {
}, },
); );
if (payChannel != null && payChannel > 0) { if (payChannel != null && payChannel > 0) {
OrderUtils.carryOnPay(payChannel, minService, orderInfo, queryDetails); OrderUtils.carryOnPay(payChannel, minService, orderInfo, payResult);
} }
} }
payResult(BaseData baseData) {
queryDetails();
SmartDialog.showToast("订单支付成功");
}
statusTitle() { statusTitle() {
if (isTakeOut == 0) { if (isTakeOut == 0) {
if (payStatus == 0) { if (payStatus == 0) {

6
lib/order/order_history_page.dart

@ -524,10 +524,14 @@ class _OrderHistoryList extends State<OrderHistoryList>
Future.delayed(Duration(seconds: 1), () { Future.delayed(Duration(seconds: 1), () {
_onRefresh(); _onRefresh();
}); });
}); },);
} }
} }
payResult(BaseData baseData) {
}
orderCancel(String orderId) async { orderCancel(String orderId) async {
BaseData baseData = await apiService.orderCancel(orderId); BaseData baseData = await apiService.orderCancel(orderId);
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {

11
lib/order/order_utils.dart

@ -1,6 +1,3 @@
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:fluwx/fluwx.dart'; import 'package:fluwx/fluwx.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/order_info.dart'; import 'package:huixiang/retrofit/data/order_info.dart';
@ -8,7 +5,6 @@ import 'package:huixiang/retrofit/data/placeOrderFirst.dart';
import 'package:huixiang/retrofit/data/wx_pay.dart'; import 'package:huixiang/retrofit/data/wx_pay.dart';
import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/min_api.dart';
import 'package:huixiang/utils/min.dart'; import 'package:huixiang/utils/min.dart';
import 'package:huixiang/view_widget/tips_dialog.dart';
class OrderUtils { class OrderUtils {
@ -75,12 +71,7 @@ class OrderUtils {
BaseData baseData = await minService BaseData baseData = await minService
.settlementApi(placeOrderFirst.toJson()) .settlementApi(placeOrderFirst.toJson())
.catchError((error) {}); .catchError((error) {});
// if (baseData != null && baseData.isSuccess) { queryDetails(baseData);
//
// } else {
queryDetails();
SmartDialog.show(widget: Tips((){}, text: "${baseData.msg}",));
// }
} }
} }

10
lib/retrofit/min_api.dart

@ -21,14 +21,12 @@ import 'data/shoppingCart.dart';
part 'min_api.g.dart'; part 'min_api.g.dart';
// const base_url = "https://pos.platform.lotus-wallet.com/app/"; /// const base_url = "https://pos.api.lotus-wallet.com/app/"; ///
// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; /// const baseUrl = "https://pos.api.lotus-wallet.com/app/"; ///
const base_url = "http://192.168.10.236:8765/app/";
// const base_url = "http://192.168.10.236:8765/app/";
/// ///
const baseUrl = "http://192.168.10.236:8765/app/"; // const baseUrl = "http://192.168.10.236:8765/app/";
/// ///
// const base_url = "http://192.168.10.37:8766/app/"; // const base_url = "http://192.168.10.37:8766/app/";

2
lib/retrofit/min_api.g.dart

@ -9,7 +9,7 @@ part of 'min_api.dart';
class _MinApiService implements MinApiService { class _MinApiService implements MinApiService {
_MinApiService(this._dio, {this.baseUrl}) { _MinApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio'); ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.236:8765/app/'; baseUrl ??= 'https://pos.api.lotus-wallet.com/app/';
} }
final Dio _dio; final Dio _dio;

10
lib/retrofit/retrofit_api.dart

@ -40,11 +40,11 @@ import 'data/wx_pay.dart';
part 'retrofit_api.g.dart'; part 'retrofit_api.g.dart';
// const base_url = "https://pos.platform.lotus-wallet.com/app/"; /// const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///
// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; /// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///
const base_url = "http://192.168.10.236:8766/app/"; /// // const base_url = "http://192.168.10.236:8766/app/"; ///
const baseUrl = "http://192.168.10.236:8766/app/"; /// // const baseUrl = "http://192.168.10.236:8766/app/"; ///
// const base_url = "http://192.168.10.37:8766/app/"; // const base_url = "http://192.168.10.37:8766/app/";
// const baseUrl = "http://192.168.10.37:8766/app/"; // const baseUrl = "http://192.168.10.37:8766/app/";
@ -343,7 +343,7 @@ abstract class ApiService {
Future<BaseData> commentLike(@Path("id") String id); Future<BaseData> commentLike(@Path("id") String id);
/// ///
@GET("/memberComment/delete/{id}") @DELETE("/memberComment/{id}")
Future<BaseData> delComment(@Path("id") String id); Future<BaseData> delComment(@Path("id") String id);
/// ///

6
lib/retrofit/retrofit_api.g.dart

@ -9,7 +9,7 @@ part of 'retrofit_api.dart';
class _ApiService implements ApiService { class _ApiService implements ApiService {
_ApiService(this._dio, {this.baseUrl}) { _ApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio'); ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.236:8766/app/'; baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/';
} }
final Dio _dio; final Dio _dio;
@ -1101,10 +1101,10 @@ class _ApiService implements ApiService {
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{}; final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>( final _result = await _dio.request<Map<String, dynamic>>(
'/memberComment/delete/$id', '/memberComment/$id',
queryParameters: queryParameters, queryParameters: queryParameters,
options: RequestOptions( options: RequestOptions(
method: 'GET', method: 'DELETE',
headers: <String, dynamic>{}, headers: <String, dynamic>{},
extra: _extra, extra: _extra,
baseUrl: baseUrl), baseUrl: baseUrl),

244
lib/settlement/settlement.dart

@ -325,138 +325,142 @@ class _Settlement extends State<Settlement> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Stack( return Container(
children: [ color: Colors.white,
Positioned( child: Stack(
top: 0, children: [
left: 0, Positioned(
right: 0, top: 0,
child: Container( left: 0,
height: 175.h, right: 0,
color: Color(0xFF3A405A), child: Container(
width: MediaQuery.of(context).size.width, height: 175.h,
), color: Color(0xFF3A405A),
), width: MediaQuery.of(context).size.width,
Positioned(
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: MyAppBar(
background: Color(0xFF3A405A),
leadingColor: Colors.white,
title: S.of(context).dingdanjiesuan,
titleColor: Colors.white,
brightness: Brightness.dark,
titleSize: 18.sp,
), ),
body: Container( ),
child: Column( Positioned(
children: [ child: Scaffold(
Expanded( backgroundColor: Colors.transparent,
child: Container( appBar: MyAppBar(
child: SingleChildScrollView( background: Color(0xFF3A405A),
physics: BouncingScrollPhysics(), leadingColor: Colors.white,
child: Container( title: S.of(context).dingdanjiesuan,
child: Column( titleColor: Colors.white,
children: [ brightness: Brightness.dark,
DistributionMode( titleSize: 18.sp,
queryOrderInfo, ),
queryAddress, body: Container(
storeInfo, child: Column(
address, children: [
), Expanded(
child: Container(
SizedBox( child: SingleChildScrollView(
height: 16, physics: BouncingScrollPhysics(),
), child: Container(
child: Column(
/// children: [
EditPhoneWidget( DistributionMode(
storeInfo, queryOrderInfo,
mobileChange, queryAddress,
), storeInfo,
address,
/// ),
SettlementOrderCommodity(
selectedBtn, SizedBox(
settleOrderInfo, height: 16,
minOrderInfo, ),
),
///
//// EditPhoneWidget(
ActivityCouponRemarks( storeInfo,
couponCart, mobileChange,
activityCart, ),
settleOrderInfo,
coupons, ///
promotions, SettlementOrderCommodity(
couponCount(), selectedBtn,
), settleOrderInfo,
minOrderInfo,
if (placeOrder) /// ),
PayMethod(payChannelCheck),
], ////
ActivityCouponRemarks(
couponCart,
activityCart,
settleOrderInfo,
coupons,
promotions,
couponCount(),
placeOrder,
),
if (placeOrder) ///
PayMethod(payChannelCheck),
],
),
), ),
), ),
), ),
flex: 1,
), ),
flex: 1, Container(
), height: 54.h,
Container( color: Colors.white,
height: 54.h, child: Row(
color: Colors.white, crossAxisAlignment: CrossAxisAlignment.center,
child: Row( children: [
crossAxisAlignment: CrossAxisAlignment.center, Spacer(),
children: [ Text(
Spacer(), S.of(context).heji,
Text( style: TextStyle(
S.of(context).heji, fontSize: 12.sp,
style: TextStyle( fontWeight: MyFontWeight.regular,
fontSize: 12.sp, color: Colors.black,
fontWeight: MyFontWeight.regular, ),
color: Colors.black,
), ),
), Text(
Text( minOrderInfo != null
minOrderInfo != null ? "${minOrderInfo.orderSumPrice}"
? "${minOrderInfo.orderSumPrice}" : "${settleOrderInfo == null ? "0" : settleOrderInfo.price}",
: "${settleOrderInfo == null ? "0" : settleOrderInfo.price}", style: TextStyle(
style: TextStyle( fontSize: 20.sp,
fontSize: 20.sp, fontWeight: MyFontWeight.semi_bold,
fontWeight: MyFontWeight.semi_bold, color: Color(0xFF32A060),
color: Color(0xFF32A060), ),
), ),
), SizedBox(
SizedBox( width: 28,
width: 28,
),
RoundButton(
width: 103.w,
height: 54.h,
text: placeOrder ? S.current.jiesuan : "下单",
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFF32A060),
fontSize: 16.sp,
padding: EdgeInsets.symmetric(
vertical: 5.h,
), ),
callback: () { RoundButton(
queryPlaceOrderFirst(); width: 103.w,
}, height: 54.h,
), text: placeOrder ? S.current.jiesuan : "下单",
], textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFF32A060),
fontSize: 16.sp,
padding: EdgeInsets.symmetric(
vertical: 5.h,
),
callback: () {
queryPlaceOrderFirst();
},
),
],
),
), ),
), ],
], ),
), ),
), ),
left: 0,
right: 0,
top: 0,
bottom: 0,
), ),
left: 0, ],
right: 0, ),
top: 0,
bottom: 0,
),
],
); );
} }

60
lib/settlement/settlement_view/activity_coupon_remarks.dart

@ -12,6 +12,7 @@ class ActivityCouponRemarks extends StatefulWidget {
final String promotions; final String promotions;
final SettleOrderInfo settleOrderInfo; final SettleOrderInfo settleOrderInfo;
final int couponCount; final int couponCount;
final bool placeOrder;
ActivityCouponRemarks( ActivityCouponRemarks(
this.couponCart, this.couponCart,
@ -20,6 +21,7 @@ class ActivityCouponRemarks extends StatefulWidget {
this.coupons, this.coupons,
this.promotions, this.promotions,
this.couponCount, this.couponCount,
this.placeOrder,
); );
@override @override
@ -29,6 +31,7 @@ class ActivityCouponRemarks extends StatefulWidget {
} }
class _ActivityCouponRemarks extends State<ActivityCouponRemarks> { class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
@ -44,7 +47,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
], ],
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
), ),
height: 122.h, height: 122.h / (!widget.placeOrder ? 2 : 1),
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 16, left: 16,
right: 16, right: 16,
@ -60,6 +63,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
if (widget.placeOrder)
InkWell( InkWell(
onTap: () { onTap: () {
widget.activityCart(); widget.activityCart();
@ -95,9 +99,11 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
], ],
), ),
), ),
if (widget.placeOrder)
SizedBox( SizedBox(
height: 13, height: 13,
), ),
if (widget.placeOrder)
InkWell( InkWell(
onTap: () { onTap: () {
widget.couponCart(); widget.couponCart();
@ -133,38 +139,44 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
], ],
), ),
), ),
if (widget.placeOrder)
SizedBox( SizedBox(
height: 13, height: 13,
), ),
Row( InkWell(
mainAxisAlignment: MainAxisAlignment.center, onTap: () {
crossAxisAlignment: CrossAxisAlignment.center,
children: [ },
Expanded( child: Row(
flex: 1, mainAxisAlignment: MainAxisAlignment.center,
child: Text( crossAxisAlignment: CrossAxisAlignment.center,
S.of(context).beizhu, children: [
Expanded(
flex: 1,
child: Text(
S.of(context).beizhu,
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 14.sp,
color: Color(0xFF353535),
),
),
),
Text(
"口味、面包硬度等",
textAlign: TextAlign.end,
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 14.sp, fontSize: 14.sp,
color: Color(0xFF353535), color: Color(0xFF353535),
fontWeight: MyFontWeight.semi_bold,
), ),
), ),
), Icon(
Text( Icons.keyboard_arrow_right,
"口味、面包硬度等", size: 16,
textAlign: TextAlign.end,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF353535),
fontWeight: MyFontWeight.semi_bold,
), ),
), ],
Icon( ),
Icons.keyboard_arrow_right,
size: 16,
),
],
), ),
], ],
), ),

4
lib/settlement/settlement_view/pay_method.dart

@ -84,7 +84,7 @@ class _PayMethod extends State<PayMethod> {
}, },
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
checkView(1), checkView(1),
Expanded( Expanded(
@ -125,7 +125,7 @@ class _PayMethod extends State<PayMethod> {
}, },
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
checkView(2), checkView(2),
Expanded( Expanded(

2
lib/store/store_order.dart

@ -710,7 +710,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
"productName": miNiDetail.productName, "productName": miNiDetail.productName,
"skuName": skuValue, "skuName": skuValue,
"storeId": storeInfo.id, "storeId": storeInfo.id,
"skuPrice": productSku.applyPrice, "skuPrice": productSku.skuPrice,
"skuStock": productSku.skuStock, "skuStock": productSku.skuStock,
"tableId": tableId, "tableId": tableId,
}, },

84
lib/store/store_view/shop_goods.dart

@ -81,9 +81,6 @@ class _ShopGoods extends State<ShopGoods> {
SizedBox( SizedBox(
height: 2, height: 2,
), ),
///{"id":"1442420413828169728","productId":"1432652566000304128","productName":"桂花乌龙茶","skuName":null,"buyNum":1,"skuStock":1000,"skuImg":"https://pos.upload.gznl.top/1177/2021/08/f855ffb8-d473-4f5f-93c9-5907b539b2fd.jpg",
///"skuPrice":"0.00","selected":1,"storeId":null,"groupId":"1426067376096411648","createTime":"2021-10-20 10:27:46","tableId":null,"platterList":null}
Row( Row(
children: [ children: [
Expanded( Expanded(
@ -110,57 +107,29 @@ class _ShopGoods extends State<ShopGoods> {
), ),
Row( Row(
children: [ children: [
// Column( Row(
// crossAxisAlignment: CrossAxisAlignment.start, children: [
// children: [ Text(
Row( S.of(context).huiyuanjia,
children: [ style: TextStyle(
Text( color: Color(0xFFFF7A1A),
S.of(context).huiyuanjia, fontSize: 10.sp,
style: TextStyle( fontWeight: MyFontWeight.medium,
color: Color(0xFFFF7A1A), ),
fontSize: 10.sp, ),
fontWeight: MyFontWeight.medium, SizedBox(
), width: 4,
),
SizedBox(
width: 4,
),
Text(
"¥${widget.isShopCart ? widget.shoppingCartSkuItemListBean.skuPrice : widget.productListBean.price}",
style: TextStyle(
color: Color(0xFFFF7A1A),
fontSize: 11.sp,
fontWeight: MyFontWeight.medium,
),
),
],
), ),
// Row( Text(
// children: [ "¥${widget.isShopCart ? widget.shoppingCartSkuItemListBean.skuPrice : widget.productListBean.price}",
// Text( style: TextStyle(
// S.of(context).yuanjia, color: Color(0xFFFF7A1A),
// style: TextStyle( fontSize: 11.sp,
// color: Color(0xFFA29E9E), fontWeight: MyFontWeight.medium,
// fontSize: 9.sp, ),
// fontWeight: MyFontWeight.regular, ),
// ), ],
// ), ),
// SizedBox(
// width: 4,
// ),
// Text(
// "¥${widget.isShopCart ? widget.shoppingCartSkuItemListBean.skuPrice : widget.productListBean.price}",
// style: TextStyle(
// color: Color(0xFFA29E9E),
// fontSize: 10.sp,
// fontWeight: MyFontWeight.regular,
// ),
// ),
// ],
// ),
// ],
// ),
Spacer(), Spacer(),
if (!widget.isShopCart) if (!widget.isShopCart)
Stack( Stack(
@ -178,10 +147,11 @@ class _ShopGoods extends State<ShopGoods> {
padding: EdgeInsets.symmetric(vertical: 5.h), padding: EdgeInsets.symmetric(vertical: 5.h),
callback: () { callback: () {
widget.queryMiNiDetail( widget.queryMiNiDetail(
widget.productListBean != null widget.productListBean != null
? widget.productListBean.id ? widget.productListBean.id
: widget.shoppingCartSkuItemListBean : widget.shoppingCartSkuItemListBean
.productId); .productId,
);
}, },
), ),
), ),

4
lib/web/web_page.dart

@ -209,7 +209,7 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
} }
commentKey.currentState.setState(() {}); commentKey.currentState.setState(() {});
} else { } else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center); // SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
} }
} }
@ -272,7 +272,7 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
CommentList( CommentList(
commentKey, commentKey,
article?.likes ?? activity?.likes ?? 0, article?.likes ?? activity?.likes ?? 0,
article?.id ?? activity?.id, widget.arguments["activityId"] ?? widget.arguments["articleId"],
isKeyBoardShow, isKeyBoardShow,
_reply, _reply,
_delCommentTips, _delCommentTips,

2
lib/web/web_view/comment_list.dart

@ -233,7 +233,7 @@ class CommentListState extends State<CommentList> {
if (type == "huifu") { if (type == "huifu") {
widget.reply(memberComment); widget.reply(memberComment);
} else if (type == "shanchu") { } else if (type == "shanchu") {
widget.delCommentTips(); widget.delCommentTips(memberComment);
} }
}, },
isSelf: userId == value.getString("userId"), isSelf: userId == value.getString("userId"),

100
lib/web/web_view/web_content.dart

@ -53,58 +53,54 @@ class _WebContent extends State<WebContent> {
}, },
), ),
}, },
// customRender: { customRender: {
// "video": "video":
// (context, parsedChild) { (context, parsedChild) {
// var src = attributes['src']; var src = context.tree.element.attributes["src"];
// parsedChild.toString() return videoWidget(
// return videoWidget( double.tryParse(context.tree.element.attributes["width"] ?? ""),
// double.tryParse(attributes['width'] ?? ""), double.tryParse(
// double.tryParse( context.tree.element.attributes["height"] ?? ""),
// element.attributes['height'] ?? ""), (src != null &&
// (src != null && src != "" &&
// src != "" && src.endsWith(".mp4"))
// src.endsWith(".mp4")) ? src
// ? src : context.tree.children.first.attributes["src"],
// : element context.tree.attributes["sandbox"]);
// .children.first.attributes["src"], },
// element.attributes["sandbox"]); "iframe":
// }, (context, parsedChild) {
// "iframe": var src = context.tree.element.children.firstWhere((element) => element.localName == "source").attributes["src"];
// (context, parsedChild) { return videoWidget(
// var src = attributes['src']; double.tryParse(context.style.width ?? ""),
// return videoWidget( double.tryParse(context.style.height ?? ""),
// double.tryParse(attributes['width'] ?? ""), (src != null &&
// double.tryParse( src != "" &&
// element.attributes['height'] ?? ""), src.endsWith(".mp4"))
// (src != null && ? src
// src != "" && : context.tree.children.first.attributes["src"],
// src.endsWith(".mp4")) context.tree.attributes["sandbox"]);
// ? src },
// : element "audio":
// .children.first.attributes["src"], (context, parsedChild) {
// element.attributes["sandbox"]); final sources = <String>[
// }, if (context.tree.attributes['src'] != null)
// "audio": context.tree.attributes['src'],
// (context, parsedChild) { ];
// final sources = <String>[ if (sources == null ||
// if (element.attributes['src'] != null) sources.isEmpty ||
// element.attributes['src'], sources.first == null) {
// ]; return EmptyContentElement();
// if (sources == null || }
// sources.isEmpty || return audioWidget(
// sources.first == null) { context.tree.attributes['controls'] != null,
// return EmptyContentElement(); context.tree.attributes['loop'] != null,
// } context.tree.attributes['autoplay'] != null,
// return audioWidget( sources,
// attributes['controls'] != null, context.style.width ?? 300.w,
// attributes['loop'] != null, );
// attributes['autoplay'] != null, },
// sources, },
// context.style.width ?? 300.w,
// );
// },
// },
); );
} }

Loading…
Cancel
Save