From 5a7f7f6203480f07bb38fda418660c2469c41abd Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Thu, 1 Jun 2023 14:15:32 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=B4=A6=E5=8F=B7=E4=B8=8E=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=AD=A3=E5=9C=A8?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E2=80=98=202.=E7=BB=93=E7=AE=97=E4=BC=9A?= =?UTF-8?q?=E5=91=98=E6=9B=B4=E6=94=B9=EF=BC=8C=E6=96=B0=E5=A2=9E=E4=BC=98?= =?UTF-8?q?=E6=83=A0=E7=B1=BB=E5=9E=8B=EF=BC=9ASURPRISE=EF=BC=9B=203.disco?= =?UTF-8?q?untType=20=3D=20=E2=80=9CMEMBER=5FRANK=E2=80=9D=E8=B7=9FSURPRIS?= =?UTF-8?q?E=E4=B8=80=E6=A0=B7=E7=9A=84=E6=84=8F=E6=80=9D,=E5=9C=A8?= =?UTF-8?q?=E5=A4=9A=E5=A4=84=E4=BC=9A=E5=91=98=E4=BC=98=E6=83=A0=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=A4=84=E6=96=B0=E5=A2=9ESURPRISE=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E4=B8=80=E8=B5=B7=E5=88=A4=E6=96=AD=EF=BC=9B=204.=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E6=89=8B=E6=9C=BA=E5=8F=B7=E7=A0=81=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=EF=BC=8C=E8=BE=93=E5=85=A5=E6=A1=86=E5=86=85=E5=AE=B9=E6=96=87?= =?UTF-8?q?=E5=AD=97=EF=BC=8C=E9=97=B4=E8=B7=9D=E4=BC=98=E5=8C=96=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=EF=BC=9B=205.=E5=8A=A8=E6=80=81=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=8C=E5=88=97=E8=A1=A8=E6=BB=91=E5=8A=A8?= =?UTF-8?q?=E6=97=B6=E5=A6=82=E8=8B=A5=E9=94=AE=E7=9B=98=E5=BC=B9=E5=87=BA?= =?UTF-8?q?=EF=BC=8C=E5=88=99=E6=94=B6=E8=B5=B7=EF=BC=9B=206.=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E9=A1=B5=E6=89=8B=E6=9C=BA=E5=8F=B7=E7=A0=81=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=A1=86=E9=97=B4=E8=B7=9D=E8=B0=83=E6=95=B4=EF=BC=9B?= =?UTF-8?q?=207.=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85=E9=A1=B5=EF=BC=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8D=95=E4=BB=B6=E5=95=86=E5=93=81=E6=8A=98?= =?UTF-8?q?=E5=90=8E=E4=BB=B7=E6=A0=BC=EF=BC=9B=208.VIP=E4=BB=B7=E6=A0=BC?= =?UTF-8?q?=E6=9A=82=E6=97=B6=E5=BA=9F=E5=BC=83=EF=BC=8C=E7=BB=8F=E5=8D=8F?= =?UTF-8?q?=E5=95=86=E5=B7=B2=E4=BB=8E=E5=95=86=E5=93=81=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=9A=82=E6=97=B6=E5=8E=BB=E6=8E=89=E8=AF=A5=E6=AE=B5=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/community/community_details.dart | 165 ++++++++++++------ lib/login/new_login_page.dart | 2 +- lib/order/order_view/order_commodity.dart | 114 ++++++------ lib/retrofit/retrofit_api.dart | 8 + lib/setting/account_security_page.dart | 6 +- lib/setting/binding_phone_page.dart | 27 +-- lib/settlement/settlement.dart | 6 +- .../activity_coupon_remarks.dart | 7 +- .../settlement_order_commodity.dart | 6 +- lib/store/store_view/shop_goods.dart | 61 +++---- 10 files changed, 240 insertions(+), 162 deletions(-) diff --git a/lib/community/community_details.dart b/lib/community/community_details.dart index 2d4ce3fd..e4cacff3 100644 --- a/lib/community/community_details.dart +++ b/lib/community/community_details.dart @@ -2,6 +2,7 @@ import 'dart:ui'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/community/community_view/community_dynamic.dart'; import 'package:huixiang/generated/l10n.dart'; @@ -15,8 +16,12 @@ import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/tips_dialog.dart'; import 'package:huixiang/web/web_view/comment_list.dart'; import 'package:huixiang/web/web_view/input_comment.dart'; +import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; +import '../view_widget/classic_header.dart'; +import '../view_widget/my_footer.dart'; + class CommunityDetails extends StatefulWidget { final Map arguments; @@ -54,6 +59,7 @@ class _CommunityDetails extends State double keyboard = -1; bool needShowSmiley = false; bool needHideSmiley = false; + final RefreshController refreshController = RefreshController(); void didChangeMetrics() { WidgetsBinding.instance.addPostFrameCallback((_) { @@ -94,11 +100,21 @@ class _CommunityDetails extends State void initState() { super.initState(); // comunity = widget.arguments["comment"]; + EasyLoading.show(status: S.current.zhengzaijiazai); businessId = widget.arguments["businessId"]; WidgetsBinding.instance.addObserver(this); commentFocus.addListener(_focusNodeListener); - - _queryMemberCommentList(); + scrollController.addListener(() { + //滚动监听,键盘如果弹起,滚动时收起 + if(MediaQuery.of(context).viewInsets.bottom > 0) + FocusScope.of(context).requestFocus(FocusNode()); + if(needShowSmiley && window.viewInsets.bottom > 0.1) + needHideSmiley = false; + setState(() { + emojiShowing = false; + }); + }); + _queryMemberCommentList(true); queryDetails(businessId); } @@ -130,9 +146,10 @@ class _CommunityDetails extends State @override void dispose(){ + super.dispose(); WidgetsBinding.instance.removeObserver(this); commentFocus.removeListener(_focusNodeListener); - super.dispose(); + refreshController.dispose(); } ///详情接口 @@ -147,14 +164,24 @@ class _CommunityDetails extends State BaseData
baseData = await apiService.informationInfo(id).catchError((onError) { debugPrint(onError.toString()); + refreshController.refreshFailed(); }); if (baseData != null && baseData.isSuccess) { setState(() { article = baseData.data; + EasyLoading.dismiss(); + refreshController.refreshCompleted(); }); + }else { + refreshController.refreshFailed(); } } + _onRefresh() { + queryDetails(businessId); + _queryMemberCommentList(true); + } + @override Widget build(BuildContext context) { double h = MediaQuery.of(context).viewInsets.bottom; @@ -186,61 +213,81 @@ class _CommunityDetails extends State child: Column( children: [ Expanded( - child: SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Column( - children: [ - if (article != null) - CommunityDynamic( - article, - 0, - exitFull: () { - setState(() {}); - }, - userId: widget.arguments != null - ? widget.arguments["userId"] - : widget.arguments["mid"], - itemCount: 3, - isDetails: true, - heightFun: (height) { - this.height = height + - MediaQuery.of(context).padding.top + - kToolbarHeight + - 24; - if (mounted) setState(() {}); + child: SmartRefresher( + controller: refreshController, + enablePullDown: true, + enablePullUp: false, + header: MyHeader(), + footer: CustomFooter( + builder: (context, mode) { + return MyFooter(mode); + }, + ), + onRefresh: () { + setState(() { + emojiShowing = false; + isKeyBoardShow = emojiShowing; + FocusScope.of(context).requestFocus(FocusNode()); + _onRefresh(); + }); + }, + scrollController:scrollController, + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Column( + children: [ + if (article != null) + CommunityDynamic( + article, + 0, + exitFull: () { + setState(() {}); + }, + userId: widget.arguments != null + ? widget.arguments["userId"] + : widget.arguments["mid"], + itemCount: 3, + isDetails: true, + heightFun: (height) { + this.height = height + + MediaQuery.of(context).padding.top + + kToolbarHeight + + 24; + if (mounted) setState(() {}); + }, + ), + CommentList( + commentKey, + article?.likes ?? 0, + businessId, + 4, + isKeyBoardShow, + _reply, + _delCommentTips, + 12.sp, + requestApiFinish: (total) { + setState(() { + commentTotal = total; + }); }, ), - CommentList( - commentKey, - article?.likes ?? 0, - businessId, - 4, - isKeyBoardShow, - _reply, - _delCommentTips, - 12.sp, - requestApiFinish: (total) { - setState(() { - commentTotal = total; - }); - }, - ), - if (memberList == null || memberList.length == 0) - Container( - width: double.infinity, - alignment: Alignment.topCenter, - margin: EdgeInsets.only(top: 40), - padding: EdgeInsets.all(22.h), - child: Text( - S.of(context).zanwupinglun, - style: TextStyle( - fontSize: 12, - fontWeight: FontWeight.bold, - color: Color(0xFFA0A0A0), + if (memberList == null || memberList.length == 0) + Container( + width: double.infinity, + alignment: Alignment.topCenter, + margin: EdgeInsets.only(top: 40), + padding: EdgeInsets.all(22.h), + child: Text( + S.of(context).zanwupinglun, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.bold, + color: Color(0xFFA0A0A0), + ), ), ), - ), - ], + ], + ), ), ), flex: 1, @@ -299,7 +346,7 @@ class _CommunityDetails extends State state.queryMemberCommentList(); commentTextController.text = ""; FocusScope.of(context).unfocus(); - _queryMemberCommentList(); + _queryMemberCommentList(false); } } @@ -351,14 +398,15 @@ class _CommunityDetails extends State } ///评论列表 - _queryMemberCommentList() async { + _queryMemberCommentList(bool isOnRefresh) async { + if (!isOnRefresh) EasyLoading.show(status: S.current.zhengzaijiazai); SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); if (apiService == null) apiService = ApiService( Dio(), context: context, token: sharedPreferences.getString("token"), - showLoading: true, + // showLoading: true, ); BaseData> baseData = await apiService.memberCommentList({ @@ -372,6 +420,9 @@ class _CommunityDetails extends State memberList = baseData.data.list; contentHeight(); if (mounted) setState(() {}); + EasyLoading.dismiss(); + }else { + refreshController.refreshFailed(); } } } diff --git a/lib/login/new_login_page.dart b/lib/login/new_login_page.dart index 8c99d87b..1157aae1 100644 --- a/lib/login/new_login_page.dart +++ b/lib/login/new_login_page.dart @@ -445,7 +445,7 @@ class _NewLoginPage extends State { Container( height: 30.h, width: MediaQuery.of(context).size.width - 100.w, - margin: EdgeInsets.only(bottom:10.h), + margin: EdgeInsets.only(bottom:Platform.isIOS ? 10.h:0), child: TextField( style: TextStyle( height: 1.h, diff --git a/lib/order/order_view/order_commodity.dart b/lib/order/order_view/order_commodity.dart index e83ac8e5..f251faa5 100644 --- a/lib/order/order_view/order_commodity.dart +++ b/lib/order/order_view/order_commodity.dart @@ -9,6 +9,8 @@ import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/separator.dart'; +import '../../utils/flutter_utils.dart'; + class OrderCommodity extends StatefulWidget { final OrderInfo orderInfo; @@ -181,12 +183,14 @@ class _OrderCommodity extends State { return Container( margin: EdgeInsets.only(top: 8.h, bottom: 8.h), child: Row( + crossAxisAlignment: CrossAxisAlignment.center, children: [ MImage( productList.skuImg, - width: 44.w, - height: 44, + width: 49, + height: 49, fit: BoxFit.cover, + radius: BorderRadius.circular(2), errorSrc: "assets/image/default_1.webp", fadeSrc: "assets/image/default_1.webp", ), @@ -194,68 +198,74 @@ class _OrderCommodity extends State { flex: 1, child: Container( margin: EdgeInsets.only( - left: 16.w, + left: 8.w, ), // height: 44.h, child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded(child:Text( - productList.productName, - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 14.sp, - color: Color(0xFF353535), - ), - )), - Text( - "x${productList.buyNum}", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF727272), - ), - ), - ], + Text( + productList.productName, + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 14.sp, + color: Color(0xFF353535), + ), + ), + SizedBox( + height: 4.h, + ), + Text( + productList.skuNameStr != null + ? "${productList.skuNameStr ?? ""}" + : "", + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 10.sp, + color: Color(0xFFA29E9E), + ), ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - flex: 1, - child: Text( - productList.skuNameStr != null - ? "${productList.skuNameStr}" - : "", - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFFA29E9E), - ), - ), - ), - Text( - S.of(context).yuan_(productList.sellPrice), - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 12.sp, - fontFamily: 'JDZhengHT', - color: Color(0xFF4C4C4C), - ), - ) - ], + Text( + "x${productList.buyNum}", + style: TextStyle( + fontSize: 12.sp, + color: Color(0xFF727272), + ), ), ], ), ), ), + Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Text( + productList.buyNum > 1 + ? S.of(context).yuan_(AppUtils.calculateDouble(double.tryParse(productList.sellPrice ?? "0") - AppUtils.stringAsFixedDouble2((double.tryParse(productList.discountAmount ?? "0") / productList.buyNum)))) + : S.of(context).yuan_(AppUtils.calculateDouble(double.tryParse(productList.sellPrice ?? "0") - double.tryParse(productList.discountAmount ?? "0"))), + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 14.sp, + color: Color(0xFF4C4C4C), + ), + ), + if (productList.discountAmount != null && productList.discountAmount != "0") + Text( + S.of(context).yuan_(productList.sellPrice), + style: TextStyle( + fontWeight: MyFontWeight.regular, + fontSize: 12.sp, + fontFamily: 'JDZhengHT', + decoration: TextDecoration.lineThrough, + color: Color(0xFFA29E9E), + ), + ) + ], + ), ], ), ); diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index f03753ed..0eb0ff9f 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -553,4 +553,12 @@ abstract class ApiService { ///通过code获取设置/助农列表 @GET("/raise/products") Future>> getConfig(); + + ///更换账户手机号码 + @POST("/auth/changePhone") + Future changePhone(@Body() Map param); + + ///修改手机号-发送验证码 + @GET("/auth/sendVerify/{mobile}") + Future changeSendVerify(@Path("mobile") String mobile); } diff --git a/lib/setting/account_security_page.dart b/lib/setting/account_security_page.dart index eb6819e3..98ef8f82 100644 --- a/lib/setting/account_security_page.dart +++ b/lib/setting/account_security_page.dart @@ -3,6 +3,7 @@ import 'dart:convert'; import 'package:dio/dio.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/user_info.dart'; @@ -25,10 +26,10 @@ class _AccountSecurityPage extends State { @override void initState() { super.initState(); + EasyLoading.show(status: S.current.zhengzaijiazai); SharedPreferences.getInstance().then((value) => { apiService = ApiService(Dio(), - context: context, token: value.getString("token"), - showLoading: true), + context: context, token: value.getString("token"),), queryUser(), }); @@ -46,6 +47,7 @@ class _AccountSecurityPage extends State { value.setString('user', jsonEncode(baseDate.data)), }, ); + EasyLoading.dismiss(); } } diff --git a/lib/setting/binding_phone_page.dart b/lib/setting/binding_phone_page.dart index 182dac4e..c753a57e 100644 --- a/lib/setting/binding_phone_page.dart +++ b/lib/setting/binding_phone_page.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:io'; import 'package:dio/dio.dart'; import 'package:flutter/cupertino.dart'; @@ -209,6 +210,7 @@ class _BindingPhonePage extends State { style: TextStyle( color: Color(0xFF353535), fontSize: 18.sp, + letterSpacing:1, fontWeight: MyFontWeight.bold, ),)), if(phoneState == 2) @@ -218,7 +220,8 @@ class _BindingPhonePage extends State { style: TextStyle( color: Color(0xFFA29E9E), fontSize: 14.sp, - fontWeight: MyFontWeight.regular, + letterSpacing:0.5, + fontWeight: MyFontWeight.medium, ),)), if(phoneState == 1) inputPhone(), @@ -349,7 +352,7 @@ class _BindingPhonePage extends State { Container( height: 30.h, width: MediaQuery.of(context).size.width - 100.w, - margin: EdgeInsets.only(bottom:10.h), + margin: EdgeInsets.only(bottom:Platform.isIOS ? 10.h:0), child: TextField( style: TextStyle( height: 1.h, @@ -374,10 +377,10 @@ class _BindingPhonePage extends State { errorBorder: InputBorder.none, focusedBorder: InputBorder.none, enabledBorder: InputBorder.none, - hintText: "", + hintText: S.of(context).qingshurushoujihao, // contentPadding: EdgeInsets.only(top: 12, bottom: 12, left: 12), hintStyle: TextStyle( - fontSize: 10.sp, + fontSize: 14.sp, color: Color(0xFFA29E9E), ), ), @@ -397,6 +400,7 @@ class _BindingPhonePage extends State { color: _controllerPhone.text == "" ? Color(0xFFE7E3E3) : Color(0xFF32A060), + margin: EdgeInsets.only(top: 10.h), ), SizedBox( height: 30.h, @@ -443,9 +447,9 @@ class _BindingPhonePage extends State { errorBorder: InputBorder.none, focusedBorder: InputBorder.none, enabledBorder: InputBorder.none, - hintText: "", + hintText:S.of(context).input_code_hide, hintStyle: TextStyle( - fontSize: 10.sp, + fontSize: 14.sp, color: Color(0xFFA29E9E), ), ), @@ -572,7 +576,7 @@ class _BindingPhonePage extends State { Container( height: 30.h, width: MediaQuery.of(context).size.width - 100.w, - margin: EdgeInsets.only(bottom:10.h), + margin: EdgeInsets.only(bottom:Platform.isIOS ? 10.h:0), child: TextField( style: TextStyle( height: 1.h, @@ -597,10 +601,10 @@ class _BindingPhonePage extends State { errorBorder: InputBorder.none, focusedBorder: InputBorder.none, enabledBorder: InputBorder.none, - hintText: "", + hintText: S.of(context).qingshurushoujihao, // contentPadding: EdgeInsets.only(top: 12, bottom: 12, left: 12), hintStyle: TextStyle( - fontSize: 10.sp, + fontSize: 14.sp, color: Color(0xFFA29E9E), ), ), @@ -620,6 +624,7 @@ class _BindingPhonePage extends State { color: _controllerNewPhone.text == "" ? Color(0xFFE7E3E3) : Color(0xFF32A060), + margin: EdgeInsets.only(top: 10.h), ), SizedBox( height: 30.h, @@ -667,9 +672,9 @@ class _BindingPhonePage extends State { errorBorder: InputBorder.none, focusedBorder: InputBorder.none, enabledBorder: InputBorder.none, - hintText: "", + hintText:S.of(context).input_code_hide, hintStyle: TextStyle( - fontSize: 10.sp, + fontSize: 14.sp, color: Color(0xFFA29E9E), ), ), diff --git a/lib/settlement/settlement.dart b/lib/settlement/settlement.dart index a5794108..ed3c53ba 100644 --- a/lib/settlement/settlement.dart +++ b/lib/settlement/settlement.dart @@ -186,10 +186,8 @@ class _Settlement extends State { productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - (isVips == false || !placeOrder) - ? ((vipLevelName == "黄金会员" && placeOrder) - ? "MEMBER_RANK" - : "NONE") + (!placeOrder) + ? "NONE" : "AUTO", // useVipPriceSelect, // (useVipPriceSelect == true && isVips) ? false:useBenefitSelect, diff --git a/lib/settlement/settlement_view/activity_coupon_remarks.dart b/lib/settlement/settlement_view/activity_coupon_remarks.dart index d80201bb..fd510c3b 100644 --- a/lib/settlement/settlement_view/activity_coupon_remarks.dart +++ b/lib/settlement/settlement_view/activity_coupon_remarks.dart @@ -122,7 +122,7 @@ class _ActivityCouponRemarks extends State { (widget.coupons != null && widget.coupons != "" || widget.promotions != null && widget.promotions != "" || - widget.payChannell == 5 || widget.payChannell == 7 ||(widget?.settleOrderInfo?.discountType ?? "") == "MEMBER_RANK" ) + widget.payChannell == 5 || widget.payChannell == 7 || ((widget?.settleOrderInfo?.discountType ?? "") == "MEMBER_RANK" || (widget?.settleOrderInfo?.discountType ?? "") == "SURPRISE") ) ? false : vipSelect, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, @@ -179,7 +179,8 @@ class _ActivityCouponRemarks extends State { widget.promotions != null && widget.promotions != "" || widget.payChannell == 5 || - widget.payChannell == 7 ||(widget?.settleOrderInfo?.discountType ?? "") == "MEMBER_RANK"|| (widget.payChannell == 4 && widget.settleOrderInfo.promotionInfoList.length <=0 && widget.settleOrderInfo.couponList.length <= 0)) + widget.payChannell == 7 ||((widget?.settleOrderInfo?.discountType ?? "") == "MEMBER_RANK" || (widget?.settleOrderInfo?.discountType ?? "") == "SURPRISE") + || (widget.payChannell == 4 && widget.settleOrderInfo.promotionInfoList.length <=0 && widget.settleOrderInfo.couponList.length <= 0)) ? false : vipSelect) ? "assets/image/vip_price.webp" @@ -278,7 +279,7 @@ class _ActivityCouponRemarks extends State { // ), // ), if (widget.placeOrder && - (widget?.settleOrderInfo?.discountType == "MEMBER_RANK" && widget?.settleOrderInfo?.benefitDiscountAmount != null && + ((widget?.settleOrderInfo?.discountType == "MEMBER_RANK" || widget?.settleOrderInfo?.discountType == "SURPRISE") && widget?.settleOrderInfo?.benefitDiscountAmount != null && widget?.settleOrderInfo?.benefitDiscountAmount != "0")) Container( margin: EdgeInsets.only(bottom: 13), diff --git a/lib/settlement/settlement_view/settlement_order_commodity.dart b/lib/settlement/settlement_view/settlement_order_commodity.dart index 0a1e95fc..ffc05c03 100644 --- a/lib/settlement/settlement_view/settlement_order_commodity.dart +++ b/lib/settlement/settlement_view/settlement_order_commodity.dart @@ -141,10 +141,12 @@ class _SettlementOrderCommodity extends State { } if (widget.useBenefitSelect && - (widget?.settleOrderInfo?.discountType == "MEMBER_RANK" && widget?.settleOrderInfo?.benefitDiscountAmount != "0") && ((widget.tableId > 0 + ((widget?.settleOrderInfo?.discountType == "MEMBER_RANK" || widget?.settleOrderInfo?.discountType == "SURPRISE") + && widget?.settleOrderInfo?.benefitDiscountAmount != "0") && ((widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)))) { widgets.add(vipItem(Color(0xFFFF7A1A), "会员优惠金额", - (widget.minOrderInfo != null && widget.minOrderInfo.orderProductVOList != null) ? (widget.minOrderInfo?.benefitDiscountAmount ?? "") :(widget?.settleOrderInfo?.benefitDiscountAmount ?? ""))); + (widget.minOrderInfo != null && widget.minOrderInfo.orderProductVOList != null) ? (widget.minOrderInfo?.benefitDiscountAmount ?? "") + :(widget?.settleOrderInfo?.benefitDiscountAmount ?? ""))); } if (widget.showVipTips) { diff --git a/lib/store/store_view/shop_goods.dart b/lib/store/store_view/shop_goods.dart index b4f2404e..4babbd7c 100644 --- a/lib/store/store_view/shop_goods.dart +++ b/lib/store/store_view/shop_goods.dart @@ -494,36 +494,37 @@ class _ShopGoods extends State { SizedBox( height: 4.h, ), - if (widget.productListBean.vipPrice != null) - Row( - children: [ - Container( - alignment: Alignment.center, - padding: EdgeInsets.symmetric(horizontal: 2.w), - margin: EdgeInsets.only(right: 4.w), - decoration: new BoxDecoration( - color: Color(0xff32A060), - borderRadius: BorderRadius.circular(4)), - child: Text( - "VIP", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFFFFFFFF), - ), - ), - ), - Text( - "¥${AppUtils.calculateDouble(double.tryParse(widget.productListBean.vipPrice ?? "0") ?? 0)}", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - fontFamily: 'JDZhengHT', - color: Color(0xff32A060), - ), - ), - ], - ), + ///VIP价格(暂时弃用) + // if (widget.productListBean.vipPrice != null) + // Row( + // children: [ + // Container( + // alignment: Alignment.center, + // padding: EdgeInsets.symmetric(horizontal: 2.w), + // margin: EdgeInsets.only(right: 4.w), + // decoration: new BoxDecoration( + // color: Color(0xff32A060), + // borderRadius: BorderRadius.circular(4)), + // child: Text( + // "VIP", + // style: TextStyle( + // fontSize: 12.sp, + // fontWeight: MyFontWeight.medium, + // color: Color(0xFFFFFFFF), + // ), + // ), + // ), + // Text( + // "¥${AppUtils.calculateDouble(double.tryParse(widget.productListBean.vipPrice ?? "0") ?? 0)}", + // style: TextStyle( + // fontSize: 14.sp, + // fontWeight: MyFontWeight.medium, + // fontFamily: 'JDZhengHT', + // color: Color(0xff32A060), + // ), + // ), + // ], + // ), // Text( // "¥${AppUtils.calculateDouble(double.tryParse(widget.isShopCart ? widget.shoppingCartSkuItemListBean.skuPrice : widget.productListBean.applyPrice) ?? 0)}", // style: TextStyle(