From 97088781d144ef8458a0a01205dfce9f0cc1c869 Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Thu, 15 Jun 2023 10:05:14 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=8A=A8=E6=80=81=E8=AF=A6=E6=83=85=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=AF=84=E8=AE=BA=EF=BC=8C=E9=AB=98=E4=BA=8E=E4=B8=80?= =?UTF-8?q?=E6=9D=A1=E8=AF=84=E8=AE=BA=E6=89=8D=E6=98=BE=E7=A4=BA=E2=80=9C?= =?UTF-8?q?=E4=BB=A5=E6=98=BE=E7=A4=BA=E5=85=A8=E9=83=A8=E2=80=9D=EF=BC=9B?= =?UTF-8?q?=202.=E5=8A=A8=E6=80=81=E5=88=97=E8=A1=A8=EF=BC=8C=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E7=82=B9=E5=87=BB=E7=BD=AE=E9=A1=B6=EF=BC=9B=203.?= =?UTF-8?q?=E7=A7=AF=E5=88=86=E5=85=91=E6=8D=A2=EF=BC=8C=E9=9B=86=E6=8D=A2?= =?UTF-8?q?=E5=8D=A1=E5=88=9B=E5=BB=BA=E8=AE=A2=E5=8D=95=E9=83=A8=E5=88=86?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9B=204.=E4=BC=9A=E5=91=98=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E4=BC=9A=E5=91=98=E5=8D=A1=E9=83=A8=E5=88=86=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=E4=BC=98=E5=8C=96=EF=BC=9B=205.=E5=A5=97=E9=A4=90?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=8C=E5=A5=97=E9=A4=90=E5=86=85=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=EF=BC=8C=E5=8F=AF=E8=83=BD=E9=9C=80=E8=A6=81=E6=96=B0?= =?UTF-8?q?=E5=A2=9EbuyNumber=E6=95=B0=E9=87=8F=E4=BC=A0=E8=BF=87=E5=8E=BB?= =?UTF-8?q?=EF=BC=9B=EF=BC=88=E6=88=91=E8=BF=99=E8=BE=B9=E6=9A=82=E6=97=B6?= =?UTF-8?q?=E6=B2=A1=E5=8A=A0=EF=BC=89=206.=E9=80=89=E8=A7=84=E6=A0=BC?= =?UTF-8?q?=EF=BC=8C=E4=BC=9A=E5=91=98=E4=BB=B7=E4=BF=AE=E6=94=B9=EF=BC=9B?= =?UTF-8?q?=207.=E8=AE=A2=E5=8D=95=E7=BB=93=E7=AE=97=E9=A1=B5=E9=83=A8?= =?UTF-8?q?=E5=88=86=E8=B0=83=E6=95=B4=EF=BC=9B=208.=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E9=A1=B5=E5=A4=9A=E8=A7=84=E6=A0=BC=E6=98=BE=E7=A4=BA=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=9B=209.=E5=BA=93=E5=AD=98=E4=B8=8D=E8=B6=B3?= =?UTF-8?q?=E7=9A=84=E5=88=A4=E6=96=AD=E6=9A=82=E6=97=B6=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=EF=BC=9B=2010.=E8=B4=AD=E7=89=A9=E8=BD=A6=E5=A5=97=E9=A4=90?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=BF=AE=E6=94=B9=EF=BC=9B=2011.=E9=9B=86?= =?UTF-8?q?=E6=8D=A2=E5=8D=A1=E6=96=B0=E5=A2=9E=E4=B8=8B=E6=8B=89=E5=88=B7?= =?UTF-8?q?=E6=96=B0=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/community/community_child_page.dart | 55 +- lib/home/trading_card_page.dart | 6 + lib/main_page.dart | 1 + lib/mine/mine_vip/mine_vip_core.dart | 627 ++++++++++-------- lib/order/exchange_order_page.dart | 4 +- lib/settlement/settlement.dart | 33 +- .../settlement_order_commodity.dart | 138 ++-- lib/store/store_view/product_meals_sku.dart | 3 +- lib/store/store_view/product_sku.dart | 2 +- lib/store/store_view/shop_goods.dart | 39 +- lib/store/store_view/shop_goods_car.dart | 83 ++- lib/view_widget/mine_vip_entry.dart | 2 +- lib/web/web_view/comment_list.dart | 2 +- 13 files changed, 561 insertions(+), 434 deletions(-) diff --git a/lib/community/community_child_page.dart b/lib/community/community_child_page.dart index 6982bc7a..07155e72 100644 --- a/lib/community/community_child_page.dart +++ b/lib/community/community_child_page.dart @@ -17,6 +17,7 @@ import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import '../utils/flutter_utils.dart'; +import '../utils/font_weight.dart'; class CommunityChildPage extends StatefulWidget { final String typeStr; @@ -43,12 +44,18 @@ class CommunityChildPageState extends State bool isLoadingData = false; ScrollController sc = ScrollController(); List
articles = []; + int _currentIndex = 0; @override void initState() { super.initState(); sc.addListener(() { widget.onScroll(); + if (sc.offset >= 500) { + _currentIndex =1; + }else if(sc.offset <= 500){ + _currentIndex = 0; + } }); onRefresh(); } @@ -196,9 +203,11 @@ class CommunityChildPageState extends State userId: userId, isList: true, exitFull: () { - setState(() { - onRefresh(); - }); + // setState(() { + // onRefresh(); + // }); + + queryCommunity(articles[position].id); }, ), onTap: () { @@ -209,10 +218,11 @@ class CommunityChildPageState extends State "userId": userId, }, ).then((value) { - onRefresh(); - setState(() {}); + // onRefresh(); + // setState(() {}); + queryCommunity(articles[position].id); }); - setState(() {}); + // setState(() {}); }, ); @@ -232,7 +242,38 @@ class CommunityChildPageState extends State height: 55, ), ), - ) + ), + if(_currentIndex == 1) + GestureDetector( + onTap: () { + sc.jumpTo(0); + setState(() {}); + }, + child: Container( + margin: EdgeInsets.only(bottom:120.h, right: 14.w), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(100), + color: Colors.white, + ), + height:48, + width: 48, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Icon(Icons.arrow_upward,size: 16,color: Color(0xFF808080),), + Text( + "顶部", + textAlign: TextAlign.center, + style: TextStyle( + color: Color(0xFF808080), + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + ), + ), + ], + ), + ), + ), ], ); }, diff --git a/lib/home/trading_card_page.dart b/lib/home/trading_card_page.dart index 49ba44b6..e6778fb9 100644 --- a/lib/home/trading_card_page.dart +++ b/lib/home/trading_card_page.dart @@ -37,6 +37,12 @@ class _TradingCardPage extends State { }); } + @override + void dispose() { + super.dispose(); + refreshController.dispose(); + } + ///查询会员信息 queryUserBalance() async { BaseData baseData = diff --git a/lib/main_page.dart b/lib/main_page.dart index e1d4dfa6..678a4389 100644 --- a/lib/main_page.dart +++ b/lib/main_page.dart @@ -374,6 +374,7 @@ class _MainPage extends State with WidgetsBindingObserver { ).queryInfo().catchError((onError) {}); sharedPreferences.setString('user', jsonEncode(baseDate.data)); + //用户登录时,注册推送的标识是手机号 String mobile = baseDate.data.phone; if (mobile != null && mobile != "") { xgFlutterPlugin.setAccount(mobile, AccountType.PHONE_NUMBER); diff --git a/lib/mine/mine_vip/mine_vip_core.dart b/lib/mine/mine_vip/mine_vip_core.dart index 3f4f0bd1..b32cd89e 100644 --- a/lib/mine/mine_vip/mine_vip_core.dart +++ b/lib/mine/mine_vip/mine_vip_core.dart @@ -23,9 +23,12 @@ import 'package:huixiang/view_widget/mine_vip_view.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/vip_dialog.dart'; +import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; import '../../retrofit/data/user_info.dart'; +import '../../view_widget/classic_header.dart'; +import '../../view_widget/my_footer.dart'; class MineVipCore extends StatefulWidget { final Map arguments; @@ -46,6 +49,7 @@ class _MineVipCore extends State { int checkIndex = 0; UserInfo userInfo; int rankNameIndex; + final RefreshController refreshController = RefreshController(); final SwiperController controller = SwiperController(); @@ -104,7 +108,9 @@ class _MineVipCore extends State { ///会员等级列表 queryVipLevel() async { - BaseData> rankData = await apiService.rankList().catchError((onError) {}); + BaseData> rankData = await apiService.rankList().catchError((onError) { + refreshController.refreshFailed(); + refreshController.loadFailed();}); if (rankData != null && rankData.isSuccess) { ranks.clear(); ranks.addAll(rankData.data); @@ -114,21 +120,29 @@ class _MineVipCore extends State { setState(() { controller.move((widget.arguments["rankLevel"] - 1), animation: false); }); + refreshController.refreshCompleted(); + refreshController.loadComplete(); } else { SmartDialog.showToast(rankData?.msg??"", alignment: Alignment.center); + refreshController.refreshFailed(); + refreshController.loadFailed(); } } ///会员权益列表 queryBenefitList() async { BaseData> baseData = - await apiService.benefitList().catchError((onError) {}); + await apiService.benefitList().catchError((onError) { + refreshController.refreshFailed(); + refreshController.loadFailed();}); if (baseData != null && baseData.isSuccess) { setState(() { vipBenefitList.clear(); vipBenefitList.addAll(baseData.data); vipBenefitList.sort((a, b) => (a.sort).compareTo(b.sort)); }); + refreshController.refreshCompleted(); + refreshController.loadComplete(); } EasyLoading.dismiss(); } @@ -136,11 +150,15 @@ class _MineVipCore extends State { ///会员权益介绍/规则/说明/储值说明 queryRuleDetails() async { BaseData baseData = - await apiService.vipBenefit().catchError((onError) {}); + await apiService.vipBenefit().catchError((onError) { + refreshController.refreshFailed(); + refreshController.loadFailed();}); if (baseData != null && baseData.isSuccess) { setState(() { vipRuleDetails = baseData.data; }); + refreshController.refreshCompleted(); + refreshController.loadComplete(); } EasyLoading.dismiss(); } @@ -180,6 +198,13 @@ class _MineVipCore extends State { } } + _onRefresh() async { + await queryVipLevel(); + await queryBenefitList(); + await queryRuleDetails(); + } + + @override Widget build(BuildContext context) { return Container( @@ -259,310 +284,328 @@ class _MineVipCore extends State { ), ), Expanded(child: - SingleChildScrollView( + SmartRefresher( + controller: refreshController, + enablePullDown: true, + enablePullUp: false, + header: MyHeader( + color: Colors.white, + ), + footer: CustomFooter( + builder: (context, mode) { + return MyFooter(mode); + }, + ), + onRefresh: () { + _onRefresh(); + }, physics: BouncingScrollPhysics(), - child: Column( - children: [ - ///会员卡 - if(ranks.length > 0) - Container( - height: (MediaQuery.of(context).size.width) / - 1.78 * - AppUtils.textScale(context), - child: Swiper( - viewportFraction: 0.95, - loop: false, - physics: BouncingScrollPhysics(), - index: checkIndex, - controller: controller, - onIndexChanged: (index) { - setState(() { - checkIndex = index; - }); - }, - itemBuilder: (context, position) { - return vipCar(position); - // MineVipView( - // vipLevel: !(ranks != null && ranks.isNotEmpty) - // ? widget.arguments["rankLevel"] - // : position + 1, - // curLevel: widget.arguments["rankLevel"], - // tag: (widget.arguments["rankLevel"] == (position + 1) || - // !(ranks != null && ranks.isNotEmpty)) - // ? "vip" - // : "", - // padding: 6.w, - // // rank: !(ranks != null && ranks.isNotEmpty) - // // ? 0 - // // : widget.arguments["expendAmount"] ?? 0, - // rankMax: !(ranks != null && ranks.isNotEmpty) - // ? 0 - // : ranks[position].rankOrigin, - // createTime: widget.arguments["createTime"], - // showRank: false, - // price: !(ranks != null && ranks.isNotEmpty) - // ? "0" - // : ranks[position].price, - // ); - }, - itemCount: - (ranks != null && ranks.isNotEmpty) ? ranks.length : 1, + scrollController: ScrollController(), + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Column( + children: [ + ///会员卡 + if(ranks.length > 0) + Container( + height: (MediaQuery.of(context).size.width) / + 1.78 * + AppUtils.textScale(context), + child: Swiper( + viewportFraction: 0.95, + loop: false, + physics: BouncingScrollPhysics(), + index: checkIndex, + controller: controller, + onIndexChanged: (index) { + setState(() { + checkIndex = index; + }); + }, + itemBuilder: (context, position) { + return vipCar(position); + // MineVipView( + // vipLevel: !(ranks != null && ranks.isNotEmpty) + // ? widget.arguments["rankLevel"] + // : position + 1, + // curLevel: widget.arguments["rankLevel"], + // tag: (widget.arguments["rankLevel"] == (position + 1) || + // !(ranks != null && ranks.isNotEmpty)) + // ? "vip" + // : "", + // padding: 6.w, + // // rank: !(ranks != null && ranks.isNotEmpty) + // // ? 0 + // // : widget.arguments["expendAmount"] ?? 0, + // rankMax: !(ranks != null && ranks.isNotEmpty) + // ? 0 + // : ranks[position].rankOrigin, + // createTime: widget.arguments["createTime"], + // showRank: false, + // price: !(ranks != null && ranks.isNotEmpty) + // ? "0" + // : ranks[position].price, + // ); + }, + itemCount: + (ranks != null && ranks.isNotEmpty) ? ranks.length : 1, + ), ), - ), - ///会员权益 - if(vipBenefitList != null) - Container( - margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), - padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(8), - topRight: Radius.circular(8), - ), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( + ///会员权益 + if(vipBenefitList != null) + Container( + margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), + padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(8), + topRight: Radius.circular(8), + ), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Container( - width: 4.w, - height: 18.h, - decoration: BoxDecoration( - gradient: new LinearGradient( - begin: Alignment.bottomCenter, - end: Alignment.topCenter, - colors: [ - Color(0xFF000000), - Color(0xFF585858), - ]), - ), + Row( + children: [ + Container( + width: 4.w, + height: 18.h, + decoration: BoxDecoration( + gradient: new LinearGradient( + begin: Alignment.bottomCenter, + end: Alignment.topCenter, + colors: [ + Color(0xFF000000), + Color(0xFF585858), + ]), + ), + ), + SizedBox( + width: 4.w, + ), + Text( + S.of(context).huiyuanquanyi, + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 16.sp, + color: Colors.black, + ), + ), + ], ), SizedBox( - width: 4.w, - ), - Text( - S.of(context).huiyuanquanyi, - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 16.sp, - color: Colors.black, - ), + height: 12.h, ), + vipLegalRight(), ], ), - SizedBox( - height: 12.h, - ), - vipLegalRight(), - ], - ), - ), - - ///会员规则说明 - if(vipRuleDetails != null) - Container( - margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), - padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(8), - topRight: Radius.circular(8), ), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( + + ///会员规则说明 + if(vipRuleDetails != null) + Container( + margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), + padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(8), + topRight: Radius.circular(8), + ), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Container( - width: 4.w, - height: 18.h, - decoration: BoxDecoration( - gradient: new LinearGradient( - begin: Alignment.bottomCenter, - end: Alignment.topCenter, - colors: [ - Color(0xFF000000), - Color(0xFF585858), - ]), - ), + Row( + children: [ + Container( + width: 4.w, + height: 18.h, + decoration: BoxDecoration( + gradient: new LinearGradient( + begin: Alignment.bottomCenter, + end: Alignment.topCenter, + colors: [ + Color(0xFF000000), + Color(0xFF585858), + ]), + ), + ), + SizedBox( + width: 4.w, + ), + Text( + S.of(context).huiyuanguize, + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 16.sp, + color: Colors.black, + ), + ), + ], ), SizedBox( - width: 4.w, + height: 12.h, ), - Text( - S.of(context).huiyuanguize, - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 16.sp, - color: Colors.black, + if (vipRuleDetails?.qa != null && vipRuleDetails.qa != "") + Container( + color: Colors.white, + padding: EdgeInsets.only(left: 8.w), + child: Html( + data: vipRuleDetails?.qa ?? "", + customImageRenders: { + networkSourceMatcher(): networkImageRender( + loadingWidget: () { + return Container(); + }, + ), + }, + ), ), - ), ], ), - SizedBox( - height: 12.h, - ), - if (vipRuleDetails?.qa != null && vipRuleDetails.qa != "") - Container( - color: Colors.white, - padding: EdgeInsets.only(left: 8.w), - child: Html( - data: vipRuleDetails?.qa ?? "", - customImageRenders: { - networkSourceMatcher(): networkImageRender( - loadingWidget: () { - return Container(); - }, - ), - }, - ), - ), - ], - ), - ), - - ///会员级别对照表 - if(vipRuleDetails != null) - Container( - margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), - padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(8), - topRight: Radius.circular(8), ), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( + + ///会员级别对照表 + if(vipRuleDetails != null) + Container( + margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), + padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(8), + topRight: Radius.circular(8), + ), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Container( - width: 4.w, - height: 18.h, - decoration: BoxDecoration( - gradient: new LinearGradient( - begin: Alignment.bottomCenter, - end: Alignment.topCenter, - colors: [ - Color(0xFF000000), - Color(0xFF585858), - ]), - ), + Row( + children: [ + Container( + width: 4.w, + height: 18.h, + decoration: BoxDecoration( + gradient: new LinearGradient( + begin: Alignment.bottomCenter, + end: Alignment.topCenter, + colors: [ + Color(0xFF000000), + Color(0xFF585858), + ]), + ), + ), + SizedBox( + width: 4.w, + ), + Text( + S.of(context).huiyuanjibieduizhao, + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 16.sp, + color: Colors.black, + ), + ), + ], ), SizedBox( - width: 4.w, + height: 12.h, ), - Text( - S.of(context).huiyuanjibieduizhao, - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 16.sp, - color: Colors.black, - ), + MImage( + vipRuleDetails?.contrast ?? "", + width: double.infinity, + height: 281.h, + errorSrc: "assets/image/default_1.webp", + fadeSrc: "assets/image/default_1.webp", + ), + SizedBox( + height: 16.h, ), ], ), - SizedBox( - height: 12.h, - ), - MImage( - vipRuleDetails?.contrast ?? "", - width: double.infinity, - height: 281.h, - errorSrc: "assets/image/default_1.webp", - fadeSrc: "assets/image/default_1.webp", - ), - SizedBox( - height: 16.h, - ), - ], - ), - ), - - ///会员如何获得积分 - if(vipRuleDetails != null) - Container( - margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(8), - topRight: Radius.circular(8), ), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( + + ///会员如何获得积分 + if(vipRuleDetails != null) + Container( + margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(8), + topRight: Radius.circular(8), + ), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Container( - width: 4.w, - height: 18.h, - decoration: BoxDecoration( - gradient: new LinearGradient( - begin: Alignment.bottomCenter, - end: Alignment.topCenter, - colors: [ - Color(0xFF000000), - Color(0xFF585858), - ]), - ), + Row( + children: [ + Container( + width: 4.w, + height: 18.h, + decoration: BoxDecoration( + gradient: new LinearGradient( + begin: Alignment.bottomCenter, + end: Alignment.topCenter, + colors: [ + Color(0xFF000000), + Color(0xFF585858), + ]), + ), + ), + SizedBox( + width: 4.w, + ), + Text( + S.of(context).huiyuanhuodejifen, + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 16.sp, + color: Colors.black, + ), + ), + ], ), SizedBox( - width: 4.w, + height: 12.h, ), - Text( - S.of(context).huiyuanhuodejifen, - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 16.sp, - color: Colors.black, + if (vipRuleDetails?.rule != null && + vipRuleDetails.rule != "") + Container( + color: Colors.white, + child: Html( + data: vipRuleDetails?.rule ?? "", + customImageRenders: { + networkSourceMatcher(): networkImageRender( + loadingWidget: () { + return Container(); + }, + ), + }, + ), ), - ), ], ), - SizedBox( - height: 12.h, - ), - if (vipRuleDetails?.rule != null && - vipRuleDetails.rule != "") - Container( - color: Colors.white, - child: Html( - data: vipRuleDetails?.rule ?? "", - customImageRenders: { - networkSourceMatcher(): networkImageRender( - loadingWidget: () { - return Container(); - }, - ), - }, - ), - ), - ], - ), + ), + ], ), - ], - ), - ), - ], + ), + ], + ), ), )), ], @@ -618,8 +661,8 @@ class _MineVipCore extends State { decoration: BoxDecoration( gradient: LinearGradient( colors: [ - AppUtils.getLighterColor(ranks[position]?.color ?? ""), - Color(int.parse((ranks[position]?.color ?? "").replaceAll("#", "FF"), radix: 16)), + AppUtils.getLighterColor(ranks[position]?.color ?? "#85C9DD"), + Color(int.parse((ranks[position]?.color ?? "#85C9DD").replaceAll("#", "FF"), radix: 16)), ], begin: Alignment.topLeft, end: Alignment.bottomRight, @@ -698,14 +741,12 @@ class _MineVipCore extends State { ), child: Column( mainAxisAlignment: - (userInfo?.memberRankVo?.rankName != ranks[position].rankName || (userInfo?.memberRankVo?.rankName == "共创会员" && ranks[position].rankName == "共创会员"))? - MainAxisAlignment.spaceAround: - MainAxisAlignment.end, + MainAxisAlignment.spaceAround, children: [ if(userInfo?.memberRankVo?.rankName != ranks[position].rankName || (userInfo?.memberRankVo?.rankName == "共创会员" && ranks[position].rankName == "共创会员")) Align(alignment: Alignment.centerRight, child: Text( - (ranks[position].rankName == "共创会员") ? "¥${AppUtils.calculateDouble(double.tryParse(ranks[position].price??""))}/永久" : (ranks[position]?.originScore ?? 0).toString(), + (ranks[position].rankName == "共创会员") ? "永久VIP" : (ranks[position]?.originScore ?? 0).toString(), overflow: TextOverflow.ellipsis, style: TextStyle( color:Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16)), @@ -734,7 +775,7 @@ class _MineVipCore extends State { TextSpan( text:"${AppUtils.calculateDouble(double.tryParse(userInfo.expendAmount??"0"))}", style: TextStyle( - fontSize: 26.sp, + fontSize: 24.sp, fontWeight: MyFontWeight.medium, color: Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16)), ), @@ -752,19 +793,19 @@ class _MineVipCore extends State { ), ], ),), - // if(userInfo?.memberRankVo?.rankName == ranks[position].rankName && (userInfo?.memberRankVo?.rankName != "共创会员" && ranks[position].rankName != "共创会员")) - // Container( - // height: 8.h, - // child: ClipRRect( - // borderRadius: BorderRadius.circular(6.5), - // child: LinearProgressIndicator( - // value: (userInfo?.memberRankVo?.nextOrigin ?? 0) > (double.tryParse(userInfo?.expendAmount ?? "0").toInt())? ((checkIndex < rankNameIndex) ? - // (userInfo?.memberRankVo?.nextOrigin ?? 0)/(userInfo?.memberRankVo?.nextOrigin ?? 0): (double.tryParse(userInfo?.expendAmount ?? "0").toInt()) / (userInfo?.memberRankVo?.nextOrigin ?? 0)) : 0, - // backgroundColor: Colors.white, - // color: AppUtils.getLighterColor(ranks[position]?.color ?? ""), - // ), - // ), - // ), + if(userInfo?.memberRankVo?.rankName == ranks[position].rankName && (userInfo?.memberRankVo?.rankName != "共创会员" && ranks[position].rankName != "共创会员")) + Container( + height: 8.h, + child: ClipRRect( + borderRadius: BorderRadius.circular(6.5), + child: LinearProgressIndicator( + value: (userInfo?.memberRankVo?.nextOrigin ?? 0) > (double.tryParse(userInfo?.expendAmount ?? "0").toInt())? ((checkIndex < rankNameIndex) ? + (userInfo?.memberRankVo?.nextOrigin ?? 0)/(userInfo?.memberRankVo?.nextOrigin ?? 0): (double.tryParse(userInfo?.expendAmount ?? "0").toInt()) / (userInfo?.memberRankVo?.nextOrigin ?? 0)) : 0, + backgroundColor: Colors.white, + color: AppUtils.getLighterColor(ranks[position]?.color ?? ""), + ), + ), + ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, diff --git a/lib/order/exchange_order_page.dart b/lib/order/exchange_order_page.dart index fdc06825..cf9670a3 100644 --- a/lib/order/exchange_order_page.dart +++ b/lib/order/exchange_order_page.dart @@ -1213,8 +1213,8 @@ class _ExchangeOrderPage extends State { "price": realPay.contains(S.of(context).jifen) ? realPay.substring(0, realPay.indexOf(S.of(context).jifen)) : "0", - "happyBeanPrice":realPay.contains(S.of(context).xiaofeijihuanka) - ? realPay.substring(0, realPay.indexOf(S.of(context).xiaofeijihuanka)) + "happyBeanPrice":realPay.contains(S.of(context).jihuanka) + ? realPay.substring(0, realPay.indexOf(S.of(context).jihuanka)) : "0", "realPay": realPay, "points": points, diff --git a/lib/settlement/settlement.dart b/lib/settlement/settlement.dart index f2e8e254..fc61328c 100644 --- a/lib/settlement/settlement.dart +++ b/lib/settlement/settlement.dart @@ -874,6 +874,7 @@ class _Settlement extends State { height: 16.h, ), + ///堂食/打包 if ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && @@ -1098,13 +1099,17 @@ class _Settlement extends State { ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2) ? diningStatus : selectedBtn, + (settleOrderInfo.isRaise || payChannel == 5) + ? "" + : couponListBean?.id, 0, - 0, - productId ?? 0, + (settleOrderInfo.isRaise || payChannel == 5) + ? "" + : promotion?.id ?? productId, productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - "AUTO", + ((promotion?.id ?? productId ?? "") != "") ? "ACTIVITY" : ((couponListBean?.id ?? "") != "" ? "COUPON":"AUTO"), // useVipPriceSelect, // useBenefitSelect, count1, @@ -1180,13 +1185,17 @@ class _Settlement extends State { ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2) ? diningStatus : selectedBtn, + (settleOrderInfo.isRaise || payChannel == 5) + ? "" + : couponListBean?.id, 0, - 0, - productId ?? 0, + (settleOrderInfo.isRaise || payChannel == 5) + ? "" + : promotion?.id ?? productId, productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - "AUTO", + ((promotion?.id ?? productId ?? "") != "") ? "ACTIVITY" : ((couponListBean?.id ?? "") != "" ? "COUPON":"AUTO"), // useVipPriceSelect, // useBenefitSelect, count1, @@ -1296,13 +1305,13 @@ class _Settlement extends State { String preferentialType(){ if(settleOrderInfo.isRaise || payChannel == 5) return "NONE"; - if((((promotion?.id ?? productId) ?? "") != "")){ + if((((promotion?.id ?? productId) ?? "") != "") && (couponListBean?.id ?? "") == ""){ return "ACTIVITY"; - }else if((couponListBean?.id ?? "") != ""){ + }else if((couponListBean?.id ?? "") != "" && (((promotion?.id ?? productId) ?? "") == "")){ return "COUPON"; - }else if(useVipPriceSelect == true && couponListBean?.id == "" && ((promotion?.id ?? productId) == "")){ + }else if(useVipPriceSelect == true && (couponListBean?.id ?? "") == "" && ((promotion?.id ?? productId ??"") == "")){ return "VIP"; - }if(useVipPriceSelect == false && couponListBean?.id == "" && ((promotion?.id ?? productId) == "")){ + }if(useVipPriceSelect == false && (couponListBean?.id ?? "") == "" && ((promotion?.id ?? productId ?? "") == "")){ return "MEMBER_RANK"; }else { return "AUTO"; @@ -1412,7 +1421,7 @@ class _Settlement extends State { actProductId ?? "", actProductSkuId ?? "", (couponBean?.id ?? 0) == 0 - ? ((isVips == false && vipLevelName == "黄金会员") + ? ((isVips == false) ? "MEMBER_RANK" : "AUTO") : "COUPON", @@ -1453,7 +1462,7 @@ class _Settlement extends State { actProductId ?? "", actProductSkuId ?? "", ((pro?.id ?? 0) ?? productId) == 0 - ? ((isVips == false && vipLevelName == "黄金会员") + ? ((isVips == false) ? "MEMBER_RANK" : "AUTO") : "ACTIVITY", diff --git a/lib/settlement/settlement_view/settlement_order_commodity.dart b/lib/settlement/settlement_view/settlement_order_commodity.dart index 2735cbd3..8aeab279 100644 --- a/lib/settlement/settlement_view/settlement_order_commodity.dart +++ b/lib/settlement/settlement_view/settlement_order_commodity.dart @@ -134,19 +134,36 @@ class _SettlementOrderCommodity extends State { if (widget.useVipPriceSelect && widget.settleOrderInfo.memberVO.isVip && - (widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) && - (widget?.settleOrderInfo?.discountType == "VIP" && widget?.settleOrderInfo?.vipDiscountAmount != "0")) { - widgets.add(vipItem(Color(0xFFFF7A1A), "VIP优惠", - (widget.minOrderInfo != null && widget.minOrderInfo.orderProductVOList != null) ? (widget.minOrderInfo?.discountAmount ?? ""):(widget?.settleOrderInfo?.vipDiscountAmount ?? ""))); + (widget.tableId > 0 + ? !(widget?.minOrderInfo?.isRaise ?? false) + : !(widget?.settleOrderInfo?.isRaise ?? false)) && + (widget?.settleOrderInfo?.discountType == "VIP" && + widget?.settleOrderInfo?.vipDiscountAmount != "0")) { + widgets.add(vipItem( + Color(0xFFFF7A1A), + "VIP优惠", + AppUtils.calculateDouble(double.tryParse( + (widget.minOrderInfo != null && + widget.minOrderInfo.orderProductVOList != null) + ? (widget.minOrderInfo?.discountAmount ?? "") + : (widget?.settleOrderInfo?.vipDiscountAmount ?? ""))))); } if (widget.useBenefitSelect && - ((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?.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), + "会员优惠金额", + AppUtils.calculateDouble(double.tryParse( + (widget.minOrderInfo != null && + widget.minOrderInfo.orderProductVOList != null) + ? (widget.minOrderInfo?.benefitDiscountAmount ?? "") + : (widget?.settleOrderInfo?.benefitDiscountAmount ?? ""))))); } if (widget.showVipTips) { @@ -266,15 +283,23 @@ class _SettlementOrderCommodity extends State { 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"))), + ? 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") + if (productList.discountAmount != null && + productList.discountAmount != "0") Text( S.of(context).yuan_(productList.sellPrice), style: TextStyle( @@ -289,7 +314,7 @@ class _SettlementOrderCommodity extends State { ), ], ), - if(productList.setMealDataList.length != 0) + if (productList.setMealDataList.length != 0) ListView.builder( itemCount: productList.setMealDataList.length, scrollDirection: Axis.vertical, @@ -306,48 +331,53 @@ class _SettlementOrderCommodity extends State { } Widget orderMealsItem(SetMealDataList setMealDataList) { - return Container( - margin: EdgeInsets.symmetric(vertical:10.h,), - child: Row( - children: [ - Expanded( - flex:2, - child: Text( - setMealDataList.productInfoList[0].productName, - overflow: TextOverflow.ellipsis, - maxLines: 1, - style: TextStyle( - color: Color(0xffA29E9E), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, + return Column(children: setMealDataList.productInfoList.map((e) { + return Container( + margin: EdgeInsets.symmetric( + vertical: 10.h, + ), + child: Row( + children: [ + Expanded( + flex: 2, + child: Text( + e.productName, + overflow: TextOverflow.ellipsis, + maxLines: 1, + style: TextStyle( + color: Color(0xffA29E9E), + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + ), ), ), - ), - Expanded(flex:3, - child: Text( - "${(setMealDataList.productInfoList[0].skuName == "") ? "": setMealDataList.productInfoList[0].skuName}", + Expanded( + flex: 3, + child: Text( + "${(e.skuName == "") ? "" : e.skuName}", + overflow: TextOverflow.ellipsis, + maxLines: 1, + style: TextStyle( + color: Color(0xffA29E9E), + fontSize: 13.sp, + fontWeight: MyFontWeight.regular, + ), + ), + ), + Text( + "x${e.buyNumber.toString()}", overflow: TextOverflow.ellipsis, maxLines: 1, style: TextStyle( - color: Color(0xffA29E9E), + color: Color(0xffFF7A1A), fontSize: 13.sp, fontWeight: MyFontWeight.regular, ), ), - ), - Text( - "x${setMealDataList.productInfoList[0].buyNumber.toString()}", - overflow: TextOverflow.ellipsis, - maxLines: 1, - style: TextStyle( - color: Color(0xffFF7A1A), - fontSize: 13.sp, - fontWeight: MyFontWeight.regular, - ), - ), - ], - ), - ); + ], + ), + ); + }).toList(),); } Widget discountItem(Color color, textName, condition, amount) { @@ -545,7 +575,7 @@ class _SettlementOrderCommodity extends State { ), Container( child: Text( - "已优惠:¥${(widget.tableId > 0 ? (widget?.minOrderInfo?.isRaise ?? false) : (widget?.settleOrderInfo?.isRaise ?? false)) ? "0": discountPrice()}", + "已优惠:¥${(widget.tableId > 0 ? (widget?.minOrderInfo?.isRaise ?? false) : (widget?.settleOrderInfo?.isRaise ?? false)) ? "0" : discountPrice()}", style: TextStyle( fontSize: 12.sp, fontFamily: 'JDZhengHT', @@ -588,20 +618,24 @@ class _SettlementOrderCommodity extends State { ///已优惠金额 String discountPrice() { if (widget.minOrderInfo != null) { - return AppUtils.calculateDouble(double.tryParse(widget.minOrderInfo?.totalDiscountPrice ?? "0")); + return AppUtils.calculateDouble( + double.tryParse(widget.minOrderInfo?.totalDiscountPrice ?? "0")); } else if (widget.tableId < 0) { return "0"; } else { - return AppUtils.calculateDouble(double.tryParse(widget?.settleOrderInfo?.totalDiscountAmount ?? "0")); + return AppUtils.calculateDouble( + double.tryParse(widget?.settleOrderInfo?.totalDiscountAmount ?? "0")); } } String totalPrice() { if (widget.minOrderInfo != null && widget.minOrderInfo.orderProductVOList != null) { - return "¥${widget.minOrderInfo.finalPayPrice}"; + return "¥${AppUtils.calculateDouble( + double.tryParse(widget.minOrderInfo.finalPayPrice))}"; } if (widget.settleOrderInfo.orderProductList == null) return ""; - return "¥${widget.settleOrderInfo.price}"; + return "¥${AppUtils.calculateDouble( + double.tryParse(widget.settleOrderInfo.price ?? ""))}"; } } diff --git a/lib/store/store_view/product_meals_sku.dart b/lib/store/store_view/product_meals_sku.dart index 30d6bf80..48e69a00 100644 --- a/lib/store/store_view/product_meals_sku.dart +++ b/lib/store/store_view/product_meals_sku.dart @@ -93,7 +93,8 @@ class _ProductMealsSku extends State { "productId": ele.productId, "skuId": ele.skuInfoList.length == 1 ? ele.skuInfoList.first.id - : ele.skuInfoList.firstWhere((e2) => e2.isSelected).id + : ele.skuInfoList.firstWhere((e2) => e2.isSelected).id, + // "buyNumber":1, }); } }); diff --git a/lib/store/store_view/product_sku.dart b/lib/store/store_view/product_sku.dart index 53576f7f..45144057 100644 --- a/lib/store/store_view/product_sku.dart +++ b/lib/store/store_view/product_sku.dart @@ -57,7 +57,7 @@ class _ProductSku extends State { return; } if (productSku == null) return; - selectedPrice = productSku.vipPrice; + selectedPrice = productSku.vipPrice ?? productSku.skuPrice ?? ""; String skuId = productSku.id; if (widget.shopCarGoods == null || widget.shopCarGoods.shoppingCartSkuItemList == null) return; diff --git a/lib/store/store_view/shop_goods.dart b/lib/store/store_view/shop_goods.dart index 4babbd7c..10b28b56 100644 --- a/lib/store/store_view/shop_goods.dart +++ b/lib/store/store_view/shop_goods.dart @@ -351,14 +351,15 @@ class _ShopGoods extends State { widget.tableId == 0) { showDeleteDialog(); } else { - if ((widget?.productListBean?.oversold ?? 0) == 0 && - widget.count >= - (widget?.shoppingCartSkuItemListBean - ?.skuStock ?? - 0)) { - SmartDialog.showToast("库存不足", - alignment: Alignment.center); - } else if (_jumpType == -1) + // if ((widget?.productListBean?.oversold ?? 0) == 0 && + // widget.count >= + // (widget?.shoppingCartSkuItemListBean + // ?.skuStock ?? + // 0)) { + // SmartDialog.showToast("库存不足", + // alignment: Alignment.center); + // } else + if (_jumpType == -1) queryMiNiDetail(widget.productListBean.id); else if (_jumpType == 0) widget.add(widget.shoppingCartSkuItemListBean); @@ -431,16 +432,18 @@ class _ShopGoods extends State { "NORMALSTORE" && widget.tableId == 0) { showDeleteDialog(); - } else if ((widget?.productListBean?.oversold ?? - 0) == - 0 && - widget.count >= - (widget?.shoppingCartSkuItemListBean - ?.skuStock ?? - 0)) { - SmartDialog.showToast("库存不足", - alignment: Alignment.center); - } else { + } + // else if ((widget?.productListBean?.oversold ?? + // 0) == + // 0 && + // widget.count >= + // (widget?.shoppingCartSkuItemListBean + // ?.skuStock ?? + // 0)) { + // SmartDialog.showToast("库存不足", + // alignment: Alignment.center); + // } + else { await Navigator.of(context).pushNamed( '/router/product_meals_sku', arguments: { diff --git a/lib/store/store_view/shop_goods_car.dart b/lib/store/store_view/shop_goods_car.dart index b7dfb200..f9d82847 100644 --- a/lib/store/store_view/shop_goods_car.dart +++ b/lib/store/store_view/shop_goods_car.dart @@ -250,18 +250,7 @@ class _ShopGoodsCar extends State { (widget.productListBean?.attrStyle ?? 0) == 0) GestureDetector( onTap: () { - if ((widget?.productListBean?.oversold ?? 0) == - 0 && - widget.count >= - (widget?.shoppingCartSkuItemListBean - ?.skuStock ?? - 0)) { - SmartDialog.showToast("库存不足", - alignment: Alignment.center); - } else { - widget - .add(widget.shoppingCartSkuItemListBean); - } + widget.add(widget.shoppingCartSkuItemListBean); }, child: Image.asset( "assets/image/add.webp", @@ -310,48 +299,50 @@ class _ShopGoodsCar extends State { } Widget shopCarMealsItem(SetMealDataList setMealDataList) { - return Container( - margin: EdgeInsets.symmetric(vertical: 10.h, horizontal: 16.w), - child: Row( - children: [ - Expanded( - flex: 2, - child: Text( - setMealDataList.productInfoList[0].productName, - overflow: TextOverflow.ellipsis, - maxLines: 1, - style: TextStyle( - color: Color(0xffA29E9E), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, + return Column(children: setMealDataList.productInfoList.map((e) { + return Container( + margin: EdgeInsets.symmetric(vertical: 10.h, horizontal: 16.w), + child: Row( + children: [ + Expanded( + flex: 2, + child: Text( + e.productName, + overflow: TextOverflow.ellipsis, + maxLines: 1, + style: TextStyle( + color: Color(0xffA29E9E), + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + ), ), ), - ), - Expanded( - flex: 3, - child: Text( - "${(setMealDataList.productInfoList[0].skuName == "") ? "默认" : setMealDataList.productInfoList[0].skuName}", + Expanded( + flex: 3, + child: Text( + "${(e.skuName == "") ? "默认" : e.skuName}", + overflow: TextOverflow.ellipsis, + maxLines: 1, + style: TextStyle( + color: Color(0xffA29E9E), + fontSize: 13.sp, + fontWeight: MyFontWeight.regular, + ), + ), + ), + Text( + "x${e.buyNumber.toString()}", overflow: TextOverflow.ellipsis, maxLines: 1, style: TextStyle( - color: Color(0xffA29E9E), + color: Color(0xffFF7A1A), fontSize: 13.sp, fontWeight: MyFontWeight.regular, ), ), - ), - Text( - "x${setMealDataList.productInfoList[0].buyNumber.toString()}", - overflow: TextOverflow.ellipsis, - maxLines: 1, - style: TextStyle( - color: Color(0xffFF7A1A), - fontSize: 13.sp, - fontWeight: MyFontWeight.regular, - ), - ), - ], - ), - ); + ], + ), + ); + }).toList(),); } } diff --git a/lib/view_widget/mine_vip_entry.dart b/lib/view_widget/mine_vip_entry.dart index 2adabee6..f931d0de 100644 --- a/lib/view_widget/mine_vip_entry.dart +++ b/lib/view_widget/mine_vip_entry.dart @@ -31,7 +31,7 @@ class MineVipEntry extends StatelessWidget { this.createTime = ""}); String topLeft = ""; - String levelText = "普通用户"; + String levelText = "普卡用户"; Color logoColor = Color(0xFFCACACA); Color levelTextColor = Color(0xFFCACACA); Color levelTextBackdrop = Color(0xFFFFF8EC); diff --git a/lib/web/web_view/comment_list.dart b/lib/web/web_view/comment_list.dart index b5ae3473..6a5481a6 100644 --- a/lib/web/web_view/comment_list.dart +++ b/lib/web/web_view/comment_list.dart @@ -128,7 +128,7 @@ class CommentListState extends State { ); }, ), - // if (memberList != null && memberList.length > 10) + if (memberList != null && memberList.length >= 1) Container( decoration: BoxDecoration( color: Color(0xFFF2F2F2),