diff --git a/lib/community/community_details.dart b/lib/community/community_details.dart index 4b9b3789..81e3151e 100644 --- a/lib/community/community_details.dart +++ b/lib/community/community_details.dart @@ -197,7 +197,7 @@ class _CommunityDetails extends State with WidgetsBindingObser comunity.selfLike = !comunity.selfLike ?? false; }); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + // SmartDialog.showToast(baseData.msg, alignment: Alignment.center); } } @@ -210,7 +210,8 @@ class _CommunityDetails extends State with WidgetsBindingObser "relationalType": 1 }).catchError((error) {}); if (baseData != null && baseData.isSuccess) { - commentKey.currentState.initState(); + CommentListState state = commentKey.currentState; + state.queryMemberCommentList(); commentTextController.text = ""; FocusScope.of(context).unfocus(); _queryMemberCommentList(); @@ -254,17 +255,18 @@ class _CommunityDetails extends State with WidgetsBindingObser } ///删除评论的提示 - _delCommentTips() { + _delCommentTips(memberComment) { SmartDialog.show(widget: Tips(() { - delComment(); + delComment(memberComment); })); } ///删除评论 - delComment() async { - BaseData baseData = await apiService.delComment(""); + delComment(memberComment) async { + BaseData baseData = await apiService.delComment(memberComment.id); if (baseData != null && baseData.isSuccess) { - commentKey.currentState.initState(); + CommentListState state = commentKey.currentState; + state.queryMemberCommentList(); } } diff --git a/lib/community/community_view/community_dynamic.dart b/lib/community/community_view/community_dynamic.dart index e9ad6b2c..e53ef50c 100644 --- a/lib/community/community_view/community_dynamic.dart +++ b/lib/community/community_view/community_dynamic.dart @@ -120,7 +120,7 @@ class _CommunityDynamic extends State { widget.exitFull(); SmartDialog.showToast("关注成功", alignment: Alignment.center); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + // SmartDialog.showToast(baseData.msg, alignment: Alignment.center); } } @@ -131,7 +131,7 @@ class _CommunityDynamic extends State { widget.exitFull(); SmartDialog.showToast("删除成功", alignment: Alignment.center); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + // SmartDialog.showToast(baseData.msg, alignment: Alignment.center); } } diff --git a/lib/home/home_view/coupon.dart b/lib/home/home_view/coupon.dart index 63718bef..0f1f42b8 100644 --- a/lib/home/home_view/coupon.dart +++ b/lib/home/home_view/coupon.dart @@ -59,7 +59,7 @@ class _CouponView extends State { @override Widget build(BuildContext context) { - return Column( + return (coupons == null || coupons.length == 0) ? Container(height: 20,) : Column( children: [ SizedBox( height: 20.h, diff --git a/lib/home/home_view/featured_acticvity.dart b/lib/home/home_view/featured_acticvity.dart index 0782343e..7a454594 100644 --- a/lib/home/home_view/featured_acticvity.dart +++ b/lib/home/home_view/featured_acticvity.dart @@ -69,19 +69,25 @@ class _FeaturedActivity extends State { child: Row( children: [ if (activityList != null && activityList.length > 0) - Container( - child: stackItem(18.sp, activityList[0]), - margin: EdgeInsets.symmetric(horizontal: 5.w), - width: (MediaQuery.of(context).size.width - 42) / 2, - height: 190.h, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(4), - color: Colors.red, - image: DecorationImage( - image: NetworkImage( - activityList[0].coverImg, + GestureDetector( + onTap: () { + Navigator.of(context).pushNamed('/router/web_page', + arguments: {"activityId": activityList[0].id}); + }, + child: Container( + child: stackItem(18.sp, activityList[0]), + margin: EdgeInsets.symmetric(horizontal: 5.w), + width: (MediaQuery.of(context).size.width - 42) / 2, + height: 190.h, + 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 { child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - Container( - child: stackItem(12.sp, activityList[1]), - margin: EdgeInsets.symmetric(horizontal: 5.w), - width: (MediaQuery.of(context).size.width - 42) / 2, - height: 190.h / 2, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(4), - color: Colors.green, - image: DecorationImage( - image: NetworkImage( - activityList[2].coverImg, + GestureDetector( + onTap: () { + Navigator.of(context).pushNamed('/router/web_page', + arguments: {"activityId": activityList[1].id}); + }, + child: Container( + child: stackItem(12.sp, activityList[1]), + margin: EdgeInsets.symmetric(horizontal: 5.w), + width: (MediaQuery.of(context).size.width - 42) / 2, + height: 190.h / 2, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(4), + color: Colors.green, + image: DecorationImage( + image: NetworkImage( + activityList[1].coverImg, + ), + fit: BoxFit.cover, ), - fit: BoxFit.cover, ), ), ), SizedBox( height: 5, ), - Container( - child: stackItem(12.sp, activityList[2]), - margin: EdgeInsets.symmetric(horizontal: 5.w), - width: (MediaQuery.of(context).size.width - 42) / 2, - height: 190.h / 2, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(4), - color: Colors.blue, - image: DecorationImage( - image: NetworkImage( - activityList[2].coverImg, + GestureDetector( + onTap: () { + Navigator.of(context).pushNamed('/router/web_page', + arguments: {"activityId": activityList[2].id}); + }, + child: Container( + child: stackItem(12.sp, activityList[2]), + margin: EdgeInsets.symmetric(horizontal: 5.w), + width: (MediaQuery.of(context).size.width - 42) / 2, + height: 190.h / 2, + 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 { borderRadius: BorderRadius.circular(20), ), alignment: Alignment.center, - child: - GestureDetector( - onTap: (){ - Navigator.of(context).pushNamed('/router/web_page', - arguments: {"activityId": activity.id}); - }, - child:Row( + child: Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ @@ -208,7 +220,7 @@ class _FeaturedActivity extends State { size: 12, ), ], - )), + ), ), ], ); diff --git a/lib/home/home_view/home_integral_store.dart b/lib/home/home_view/home_integral_store.dart index 652b349e..7685ccdb 100644 --- a/lib/home/home_view/home_integral_store.dart +++ b/lib/home/home_view/home_integral_store.dart @@ -45,56 +45,12 @@ class _HomeIntegralStore extends State { ), child: Column( 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( text: "大家都在兑换", imgPath: "assets/image/icon_points_mall.png", ), SizedBox( - height: 14.h, + height: 10.h, ), Divider( thickness: 1, diff --git a/lib/mine/mine_page.dart b/lib/mine/mine_page.dart index 8163572b..5c6380ae 100644 --- a/lib/mine/mine_page.dart +++ b/lib/mine/mine_page.dart @@ -331,7 +331,7 @@ class _MinePage extends State with AutomaticKeepAliveClientMixin { ), ), Text( - "(" + (infoNumber != null ?infoNumber.follow.toString() :"()") +")", + "(" + (infoNumber != null ?infoNumber.follow.toString() :"0") +")", style: TextStyle( color: Color(0xFF000000), fontSize: 15.sp, @@ -351,7 +351,7 @@ class _MinePage extends State with AutomaticKeepAliveClientMixin { ), ), Text( - "(" + (infoNumber != null ?infoNumber.fans.toString() :"()") +")", + "(" + (infoNumber != null ?infoNumber.fans.toString() :"0") +")", style: TextStyle( color: Color(0xFF000000), fontSize: 15.sp, diff --git a/lib/order/order_detail_page.dart b/lib/order/order_detail_page.dart index 403d40f6..8913271d 100644 --- a/lib/order/order_detail_page.dart +++ b/lib/order/order_detail_page.dart @@ -115,84 +115,87 @@ class _OrderDetailPage extends State { @override Widget build(BuildContext context) { - return Stack( - children: [ - Positioned( - top: 0, - left: 0, - right: 0, - child: Container( - height: (orderStatus >= 4 ? 118.h : 118.h) + - MediaQuery.of(context).padding.top + - kToolbarHeight + - 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, + return Container( + color: Colors.white, + child: Stack( + children: [ + Positioned( + top: 0, + left: 0, + right: 0, + child: Container( + height: (orderStatus >= 4 ? 118.h : 118.h) + + MediaQuery.of(context).padding.top + + kToolbarHeight + + 48.h, + color: Color(0xFF3A405A), + width: MediaQuery.of(context).size.width, ), - body: Container( - child: SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Container( - child: Column( - children: [ - ///订单状态显示 - OrderStatus( - orderStatus, - isTakeOut, - sendStatus, - payStatus, - refundStatus, - title, - center, - orderInfo, - ), + ), + 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( + physics: BouncingScrollPhysics(), + child: Container( + child: Column( + children: [ + ///订单状态显示 + OrderStatus( + orderStatus, + isTakeOut, + sendStatus, + payStatus, + refundStatus, + title, + center, + orderInfo, + ), - ///订单取货地址,或, 收货地址 - OrderAddress( - orderStatus, - isTakeOut, - sendStatus, - payStatus, - refundStatus, - title, - center, - paySelected, - _orderCancel, - orderInfo, - ), + ///订单取货地址,或, 收货地址 + OrderAddress( + orderStatus, + isTakeOut, + sendStatus, + payStatus, + refundStatus, + title, + center, + paySelected, + _orderCancel, + orderInfo, + ), - ///订单商品 - OrderCommodity(orderInfo), + ///订单商品 + OrderCommodity(orderInfo), - ///显示订单信息 - OrderInfoView(orderInfo), + ///显示订单信息 + OrderInfoView(orderInfo), - Container( - height: 42.h, - ), - ], + Container( + 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 { }, ); if (payChannel != null && payChannel > 0) { - OrderUtils.carryOnPay(payChannel, minService, orderInfo, queryDetails); + OrderUtils.carryOnPay(payChannel, minService, orderInfo, payResult); } } + payResult(BaseData baseData) { + queryDetails(); + SmartDialog.showToast("订单支付成功"); + } + statusTitle() { if (isTakeOut == 0) { if (payStatus == 0) { diff --git a/lib/order/order_history_page.dart b/lib/order/order_history_page.dart index 3a8477c0..3d003bae 100644 --- a/lib/order/order_history_page.dart +++ b/lib/order/order_history_page.dart @@ -524,10 +524,14 @@ class _OrderHistoryList extends State Future.delayed(Duration(seconds: 1), () { _onRefresh(); }); - }); + },); } } + payResult(BaseData baseData) { + + } + orderCancel(String orderId) async { BaseData baseData = await apiService.orderCancel(orderId); if (baseData != null && baseData.isSuccess) { diff --git a/lib/order/order_utils.dart b/lib/order/order_utils.dart index 150e1df0..743b21f5 100644 --- a/lib/order/order_utils.dart +++ b/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:huixiang/retrofit/data/base_data.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/min_api.dart'; import 'package:huixiang/utils/min.dart'; -import 'package:huixiang/view_widget/tips_dialog.dart'; class OrderUtils { @@ -75,12 +71,7 @@ class OrderUtils { BaseData baseData = await minService .settlementApi(placeOrderFirst.toJson()) .catchError((error) {}); - // if (baseData != null && baseData.isSuccess) { - // - // } else { - queryDetails(); - SmartDialog.show(widget: Tips((){}, text: "${baseData.msg}",)); - // } + queryDetails(baseData); } } diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index 92b5cdab..bd386bcc 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -21,14 +21,12 @@ import 'data/shoppingCart.dart'; part 'min_api.g.dart'; -// const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///正式 -// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///正式 - -const base_url = "http://192.168.10.236:8765/app/"; +const base_url = "https://pos.api.lotus-wallet.com/app/"; ///正式 +const baseUrl = "https://pos.api.lotus-wallet.com/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/"; diff --git a/lib/retrofit/min_api.g.dart b/lib/retrofit/min_api.g.dart index 1c1cc751..02d9988a 100644 --- a/lib/retrofit/min_api.g.dart +++ b/lib/retrofit/min_api.g.dart @@ -9,7 +9,7 @@ part of 'min_api.dart'; class _MinApiService implements MinApiService { _MinApiService(this._dio, {this.baseUrl}) { ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= 'http://192.168.10.236:8765/app/'; + baseUrl ??= 'https://pos.api.lotus-wallet.com/app/'; } final Dio _dio; diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index 80849133..8df47f39 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -40,11 +40,11 @@ import 'data/wx_pay.dart'; part 'retrofit_api.g.dart'; -// const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///正式 -// const baseUrl = "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 base_url = "http://192.168.10.236:8766/app/"; ///费韬 -const baseUrl = "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 base_url = "http://192.168.10.37:8766/app/"; // const baseUrl = "http://192.168.10.37:8766/app/"; @@ -343,7 +343,7 @@ abstract class ApiService { Future commentLike(@Path("id") String id); ///评论删除 - @GET("/memberComment/delete/{id}") + @DELETE("/memberComment/{id}") Future delComment(@Path("id") String id); ///查询物流轨迹 diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index 1024cdf2..3c96e516 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -9,7 +9,7 @@ part of 'retrofit_api.dart'; class _ApiService implements ApiService { _ApiService(this._dio, {this.baseUrl}) { ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= 'http://192.168.10.236:8766/app/'; + baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/'; } final Dio _dio; @@ -1101,10 +1101,10 @@ class _ApiService implements ApiService { final queryParameters = {}; final _data = {}; final _result = await _dio.request>( - '/memberComment/delete/$id', + '/memberComment/$id', queryParameters: queryParameters, options: RequestOptions( - method: 'GET', + method: 'DELETE', headers: {}, extra: _extra, baseUrl: baseUrl), diff --git a/lib/settlement/settlement.dart b/lib/settlement/settlement.dart index 85c25e69..c8cfa1eb 100644 --- a/lib/settlement/settlement.dart +++ b/lib/settlement/settlement.dart @@ -325,138 +325,142 @@ class _Settlement extends State { @override Widget build(BuildContext context) { - return Stack( - children: [ - Positioned( - top: 0, - left: 0, - right: 0, - child: Container( - 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, + return Container( + color: Colors.white, + child: Stack( + children: [ + Positioned( + top: 0, + left: 0, + right: 0, + child: Container( + height: 175.h, + color: Color(0xFF3A405A), + width: MediaQuery.of(context).size.width, ), - body: Container( - child: Column( - children: [ - Expanded( - child: Container( - child: SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Container( - child: Column( - children: [ - DistributionMode( - queryOrderInfo, - queryAddress, - storeInfo, - address, - ), - - SizedBox( - height: 16, - ), - - /// 预留的手机号, 可修改 - EditPhoneWidget( - storeInfo, - mobileChange, - ), - - ///订单商品 - SettlementOrderCommodity( - selectedBtn, - settleOrderInfo, - minOrderInfo, - ), - - ///优惠券/备注 - ActivityCouponRemarks( - couponCart, - activityCart, - settleOrderInfo, - coupons, - promotions, - couponCount(), - ), - - if (placeOrder) ///支付方式 - PayMethod(payChannelCheck), - ], + ), + 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( + children: [ + Expanded( + child: Container( + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Container( + child: Column( + children: [ + DistributionMode( + queryOrderInfo, + queryAddress, + storeInfo, + address, + ), + + SizedBox( + height: 16, + ), + + /// 预留的手机号, 可修改 + EditPhoneWidget( + storeInfo, + mobileChange, + ), + + ///订单商品 + SettlementOrderCommodity( + selectedBtn, + settleOrderInfo, + minOrderInfo, + ), + + ///优惠券/备注 + ActivityCouponRemarks( + couponCart, + activityCart, + settleOrderInfo, + coupons, + promotions, + couponCount(), + placeOrder, + ), + + if (placeOrder) ///支付方式 + PayMethod(payChannelCheck), + ], + ), ), ), ), + flex: 1, ), - flex: 1, - ), - Container( - height: 54.h, - color: Colors.white, - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Spacer(), - Text( - S.of(context).heji, - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Colors.black, + Container( + height: 54.h, + color: Colors.white, + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Spacer(), + Text( + S.of(context).heji, + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Colors.black, + ), ), - ), - Text( - minOrderInfo != null - ? "¥${minOrderInfo.orderSumPrice}" - : "¥${settleOrderInfo == null ? "0" : settleOrderInfo.price}", - style: TextStyle( - fontSize: 20.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF32A060), + Text( + minOrderInfo != null + ? "¥${minOrderInfo.orderSumPrice}" + : "¥${settleOrderInfo == null ? "0" : settleOrderInfo.price}", + style: TextStyle( + fontSize: 20.sp, + fontWeight: MyFontWeight.semi_bold, + color: Color(0xFF32A060), + ), ), - ), - SizedBox( - 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, + SizedBox( + width: 28, ), - callback: () { - queryPlaceOrderFirst(); - }, - ), - ], + 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: () { + queryPlaceOrderFirst(); + }, + ), + ], + ), ), - ), - ], + ], + ), ), ), + left: 0, + right: 0, + top: 0, + bottom: 0, ), - left: 0, - right: 0, - top: 0, - bottom: 0, - ), - ], + ], + ), ); } diff --git a/lib/settlement/settlement_view/activity_coupon_remarks.dart b/lib/settlement/settlement_view/activity_coupon_remarks.dart index 52eedfaf..aae17cc0 100644 --- a/lib/settlement/settlement_view/activity_coupon_remarks.dart +++ b/lib/settlement/settlement_view/activity_coupon_remarks.dart @@ -12,6 +12,7 @@ class ActivityCouponRemarks extends StatefulWidget { final String promotions; final SettleOrderInfo settleOrderInfo; final int couponCount; + final bool placeOrder; ActivityCouponRemarks( this.couponCart, @@ -20,6 +21,7 @@ class ActivityCouponRemarks extends StatefulWidget { this.coupons, this.promotions, this.couponCount, + this.placeOrder, ); @override @@ -29,6 +31,7 @@ class ActivityCouponRemarks extends StatefulWidget { } class _ActivityCouponRemarks extends State { + @override Widget build(BuildContext context) { return Container( @@ -44,7 +47,7 @@ class _ActivityCouponRemarks extends State { ], borderRadius: BorderRadius.circular(8), ), - height: 122.h, + height: 122.h / (!widget.placeOrder ? 2 : 1), margin: EdgeInsets.only( left: 16, right: 16, @@ -60,6 +63,7 @@ class _ActivityCouponRemarks extends State { mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.center, children: [ + if (widget.placeOrder) InkWell( onTap: () { widget.activityCart(); @@ -95,9 +99,11 @@ class _ActivityCouponRemarks extends State { ], ), ), + if (widget.placeOrder) SizedBox( height: 13, ), + if (widget.placeOrder) InkWell( onTap: () { widget.couponCart(); @@ -133,38 +139,44 @@ class _ActivityCouponRemarks extends State { ], ), ), + if (widget.placeOrder) SizedBox( height: 13, ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - flex: 1, - child: Text( - S.of(context).beizhu, + InkWell( + onTap: () { + + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + 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( - fontWeight: MyFontWeight.regular, fontSize: 14.sp, color: Color(0xFF353535), + fontWeight: MyFontWeight.semi_bold, ), ), - ), - Text( - "口味、面包硬度等", - textAlign: TextAlign.end, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF353535), - fontWeight: MyFontWeight.semi_bold, + Icon( + Icons.keyboard_arrow_right, + size: 16, ), - ), - Icon( - Icons.keyboard_arrow_right, - size: 16, - ), - ], + ], + ), ), ], ), diff --git a/lib/settlement/settlement_view/pay_method.dart b/lib/settlement/settlement_view/pay_method.dart index aaef5b4f..e6a74e04 100644 --- a/lib/settlement/settlement_view/pay_method.dart +++ b/lib/settlement/settlement_view/pay_method.dart @@ -84,7 +84,7 @@ class _PayMethod extends State { }, child: Row( mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, children: [ checkView(1), Expanded( @@ -125,7 +125,7 @@ class _PayMethod extends State { }, child: Row( mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, children: [ checkView(2), Expanded( diff --git a/lib/store/store_order.dart b/lib/store/store_order.dart index 809352fb..5c7dd366 100644 --- a/lib/store/store_order.dart +++ b/lib/store/store_order.dart @@ -710,7 +710,7 @@ class _StoreOrderPage extends State "productName": miNiDetail.productName, "skuName": skuValue, "storeId": storeInfo.id, - "skuPrice": productSku.applyPrice, + "skuPrice": productSku.skuPrice, "skuStock": productSku.skuStock, "tableId": tableId, }, diff --git a/lib/store/store_view/shop_goods.dart b/lib/store/store_view/shop_goods.dart index d3d97bb1..3ebae265 100644 --- a/lib/store/store_view/shop_goods.dart +++ b/lib/store/store_view/shop_goods.dart @@ -81,9 +81,6 @@ class _ShopGoods extends State { SizedBox( 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( children: [ Expanded( @@ -110,57 +107,29 @@ class _ShopGoods extends State { ), Row( children: [ - // Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - Row( - children: [ - Text( - S.of(context).huiyuanjia, - style: TextStyle( - color: Color(0xFFFF7A1A), - fontSize: 10.sp, - fontWeight: MyFontWeight.medium, - ), - ), - SizedBox( - width: 4, - ), - Text( - "¥${widget.isShopCart ? widget.shoppingCartSkuItemListBean.skuPrice : widget.productListBean.price}", - style: TextStyle( - color: Color(0xFFFF7A1A), - fontSize: 11.sp, - fontWeight: MyFontWeight.medium, - ), - ), - ], + Row( + children: [ + Text( + S.of(context).huiyuanjia, + style: TextStyle( + color: Color(0xFFFF7A1A), + fontSize: 10.sp, + fontWeight: MyFontWeight.medium, + ), + ), + SizedBox( + width: 4, ), - // Row( - // children: [ - // Text( - // S.of(context).yuanjia, - // style: TextStyle( - // color: Color(0xFFA29E9E), - // 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, - // ), - // ), - // ], - // ), - // ], - // ), + Text( + "¥${widget.isShopCart ? widget.shoppingCartSkuItemListBean.skuPrice : widget.productListBean.price}", + style: TextStyle( + color: Color(0xFFFF7A1A), + fontSize: 11.sp, + fontWeight: MyFontWeight.medium, + ), + ), + ], + ), Spacer(), if (!widget.isShopCart) Stack( @@ -178,10 +147,11 @@ class _ShopGoods extends State { padding: EdgeInsets.symmetric(vertical: 5.h), callback: () { widget.queryMiNiDetail( - widget.productListBean != null - ? widget.productListBean.id - : widget.shoppingCartSkuItemListBean - .productId); + widget.productListBean != null + ? widget.productListBean.id + : widget.shoppingCartSkuItemListBean + .productId, + ); }, ), ), diff --git a/lib/web/web_page.dart b/lib/web/web_page.dart index 438b4c40..70df4568 100644 --- a/lib/web/web_page.dart +++ b/lib/web/web_page.dart @@ -209,7 +209,7 @@ class _WebPage extends State with WidgetsBindingObserver { } commentKey.currentState.setState(() {}); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + // SmartDialog.showToast(baseData.msg, alignment: Alignment.center); } } @@ -272,7 +272,7 @@ class _WebPage extends State with WidgetsBindingObserver { CommentList( commentKey, article?.likes ?? activity?.likes ?? 0, - article?.id ?? activity?.id, + widget.arguments["activityId"] ?? widget.arguments["articleId"], isKeyBoardShow, _reply, _delCommentTips, diff --git a/lib/web/web_view/comment_list.dart b/lib/web/web_view/comment_list.dart index a5b5da8e..10dd6fd0 100644 --- a/lib/web/web_view/comment_list.dart +++ b/lib/web/web_view/comment_list.dart @@ -233,7 +233,7 @@ class CommentListState extends State { if (type == "huifu") { widget.reply(memberComment); } else if (type == "shanchu") { - widget.delCommentTips(); + widget.delCommentTips(memberComment); } }, isSelf: userId == value.getString("userId"), diff --git a/lib/web/web_view/web_content.dart b/lib/web/web_view/web_content.dart index 43195e03..54c1519d 100644 --- a/lib/web/web_view/web_content.dart +++ b/lib/web/web_view/web_content.dart @@ -53,58 +53,54 @@ class _WebContent extends State { }, ), }, - // customRender: { - // "video": - // (context, parsedChild) { - // var src = attributes['src']; - // parsedChild.toString() - // return videoWidget( - // double.tryParse(attributes['width'] ?? ""), - // double.tryParse( - // element.attributes['height'] ?? ""), - // (src != null && - // src != "" && - // src.endsWith(".mp4")) - // ? src - // : element - // .children.first.attributes["src"], - // element.attributes["sandbox"]); - // }, - // "iframe": - // (context, parsedChild) { - // var src = attributes['src']; - // return videoWidget( - // double.tryParse(attributes['width'] ?? ""), - // double.tryParse( - // element.attributes['height'] ?? ""), - // (src != null && - // src != "" && - // src.endsWith(".mp4")) - // ? src - // : element - // .children.first.attributes["src"], - // element.attributes["sandbox"]); - // }, - // "audio": - // (context, parsedChild) { - // final sources = [ - // if (element.attributes['src'] != null) - // element.attributes['src'], - // ]; - // if (sources == null || - // sources.isEmpty || - // sources.first == null) { - // return EmptyContentElement(); - // } - // return audioWidget( - // attributes['controls'] != null, - // attributes['loop'] != null, - // attributes['autoplay'] != null, - // sources, - // context.style.width ?? 300.w, - // ); - // }, - // }, + customRender: { + "video": + (context, parsedChild) { + var src = context.tree.element.attributes["src"]; + return videoWidget( + double.tryParse(context.tree.element.attributes["width"] ?? ""), + double.tryParse( + context.tree.element.attributes["height"] ?? ""), + (src != null && + src != "" && + src.endsWith(".mp4")) + ? src + : context.tree.children.first.attributes["src"], + context.tree.attributes["sandbox"]); + }, + "iframe": + (context, parsedChild) { + var src = context.tree.element.children.firstWhere((element) => element.localName == "source").attributes["src"]; + return videoWidget( + double.tryParse(context.style.width ?? ""), + double.tryParse(context.style.height ?? ""), + (src != null && + src != "" && + src.endsWith(".mp4")) + ? src + : context.tree.children.first.attributes["src"], + context.tree.attributes["sandbox"]); + }, + "audio": + (context, parsedChild) { + final sources = [ + if (context.tree.attributes['src'] != null) + context.tree.attributes['src'], + ]; + if (sources == null || + sources.isEmpty || + sources.first == null) { + return EmptyContentElement(); + } + return audioWidget( + context.tree.attributes['controls'] != null, + context.tree.attributes['loop'] != null, + context.tree.attributes['autoplay'] != null, + sources, + context.style.width ?? 300.w, + ); + }, + }, ); }