diff --git a/assets/image/2x/icon_mine_order_dfk.webp b/assets/image/2x/icon_mine_order_dfk.webp index 7bf28188..c045d5d5 100644 Binary files a/assets/image/2x/icon_mine_order_dfk.webp and b/assets/image/2x/icon_mine_order_dfk.webp differ diff --git a/assets/image/2x/icon_mine_order_qb.webp b/assets/image/2x/icon_mine_order_qb.webp index e496bbcc..facc258a 100644 Binary files a/assets/image/2x/icon_mine_order_qb.webp and b/assets/image/2x/icon_mine_order_qb.webp differ diff --git a/assets/image/2x/icon_mine_order_wwc.webp b/assets/image/2x/icon_mine_order_wwc.webp index f7f568e0..0b2c87bf 100644 Binary files a/assets/image/2x/icon_mine_order_wwc.webp and b/assets/image/2x/icon_mine_order_wwc.webp differ diff --git a/assets/image/2x/icon_mine_order_ywc.webp b/assets/image/2x/icon_mine_order_ywc.webp index 01bdf8ac..809b24ef 100644 Binary files a/assets/image/2x/icon_mine_order_ywc.webp and b/assets/image/2x/icon_mine_order_ywc.webp differ diff --git a/assets/image/2x/mine_bg.webp b/assets/image/2x/mine_bg.webp new file mode 100644 index 00000000..ad9e089c Binary files /dev/null and b/assets/image/2x/mine_bg.webp differ diff --git a/assets/image/2x/settlement_bg.webp b/assets/image/2x/settlement_bg.webp new file mode 100644 index 00000000..e7f6e862 Binary files /dev/null and b/assets/image/2x/settlement_bg.webp differ diff --git a/assets/image/3x/icon_mine_order_dfk.webp b/assets/image/3x/icon_mine_order_dfk.webp index b6c5de4c..286d4943 100644 Binary files a/assets/image/3x/icon_mine_order_dfk.webp and b/assets/image/3x/icon_mine_order_dfk.webp differ diff --git a/assets/image/3x/icon_mine_order_qb.webp b/assets/image/3x/icon_mine_order_qb.webp index 28a9e6d9..b162e448 100644 Binary files a/assets/image/3x/icon_mine_order_qb.webp and b/assets/image/3x/icon_mine_order_qb.webp differ diff --git a/assets/image/3x/icon_mine_order_wwc.webp b/assets/image/3x/icon_mine_order_wwc.webp index 05528d52..7deb51e4 100644 Binary files a/assets/image/3x/icon_mine_order_wwc.webp and b/assets/image/3x/icon_mine_order_wwc.webp differ diff --git a/assets/image/3x/icon_mine_order_ywc.webp b/assets/image/3x/icon_mine_order_ywc.webp index 8e4928ce..63c1be60 100644 Binary files a/assets/image/3x/icon_mine_order_ywc.webp and b/assets/image/3x/icon_mine_order_ywc.webp differ diff --git a/assets/image/3x/mine_bg.webp b/assets/image/3x/mine_bg.webp new file mode 100644 index 00000000..808237a5 Binary files /dev/null and b/assets/image/3x/mine_bg.webp differ diff --git a/assets/image/3x/settlement_bg.webp b/assets/image/3x/settlement_bg.webp new file mode 100644 index 00000000..ed3666f1 Binary files /dev/null and b/assets/image/3x/settlement_bg.webp differ diff --git a/assets/image/icon_mine_order_dfk.webp b/assets/image/icon_mine_order_dfk.webp index 6b872fed..47d49640 100644 Binary files a/assets/image/icon_mine_order_dfk.webp and b/assets/image/icon_mine_order_dfk.webp differ diff --git a/assets/image/icon_mine_order_qb.webp b/assets/image/icon_mine_order_qb.webp index bcea2e4b..d0509ed9 100644 Binary files a/assets/image/icon_mine_order_qb.webp and b/assets/image/icon_mine_order_qb.webp differ diff --git a/assets/image/icon_mine_order_wwc.webp b/assets/image/icon_mine_order_wwc.webp index 1710e117..53433273 100644 Binary files a/assets/image/icon_mine_order_wwc.webp and b/assets/image/icon_mine_order_wwc.webp differ diff --git a/assets/image/icon_mine_order_ywc.webp b/assets/image/icon_mine_order_ywc.webp index b96bf9a1..7155793b 100644 Binary files a/assets/image/icon_mine_order_ywc.webp and b/assets/image/icon_mine_order_ywc.webp differ diff --git a/assets/image/mine_bg.webp b/assets/image/mine_bg.webp new file mode 100644 index 00000000..f5751d47 Binary files /dev/null and b/assets/image/mine_bg.webp differ diff --git a/assets/image/settlement_bg.webp b/assets/image/settlement_bg.webp new file mode 100644 index 00000000..ecd59d02 Binary files /dev/null and b/assets/image/settlement_bg.webp differ diff --git a/lib/home/home_view/shortcut_operation.dart b/lib/home/home_view/shortcut_operation.dart index 7030beb5..0b802f2d 100644 --- a/lib/home/home_view/shortcut_operation.dart +++ b/lib/home/home_view/shortcut_operation.dart @@ -151,8 +151,8 @@ class _ShortcutOperation extends State { ), ), Expanded(child: GestureDetector( onTap: (){ - Navigator.of(context).pushNamed('/router/roll_center_page'); - // Navigator.of(context).pushNamed('/router/welfare_page'); + // Navigator.of(context).pushNamed('/router/roll_center_page'); + Navigator.of(context).pushNamed('/router/welfare_page'); }, child:Container( width: double.infinity, diff --git a/lib/home/welfare_page.dart b/lib/home/welfare_page.dart index 53ec1725..47ca1b87 100644 --- a/lib/home/welfare_page.dart +++ b/lib/home/welfare_page.dart @@ -34,172 +34,72 @@ class _WelfarePage extends State { } @override - // Widget build(BuildContext context) { - // return Stack( - // children: [ - // Positioned( - // child: Container( - // height: 155.h + kToolbarHeight + MediaQuery.of(context).padding.top, - // decoration: BoxDecoration( - // image: DecorationImage( - // fit: BoxFit.fill, - // image: AssetImage("assets/image/welfare_zx.webp"), - // ), - // ), - // ), - // top: 0, - // left: 0, - // right: 0, - // ), - // Scaffold( - // backgroundColor: Colors.transparent, - // appBar: MyAppBar( - // exit: (){}, - // background: Colors.transparent, - // leadingColor: Colors.white, - // title: "福利中心", - // titleColor: Colors.white, - // titleSize: 17.sp, - // brightness: Brightness.dark, - // ), - // body:SmartRefresher( - // controller: refreshController, - // enablePullDown: true, - // enablePullUp: false, - // header: MyHeader(), - // footer: CustomFooter( - // builder: (context, mode) { - // return MyFooter(mode); - // }, - // ), - // onRefresh:(){ - // setState(() { - // }); - // }, - // physics: BouncingScrollPhysics(), - // scrollController: scrollController, - // child: Container( - // child: SingleChildScrollView( - // physics: BouncingScrollPhysics(), - // child: FutureBuilder( - // // future: querySignInfo(), - // builder: (context, snap) { - // return Column( - // children: [ - // weekCoupons(), - // - // inviteFriends(), - // - // activityTask(), - // ], - // ); - // }, - // ), - // ), - // ), - // ), - // ), - // ], - // ); - // } Widget build(BuildContext context) { - return Container( - color: Colors.white, - child: Scaffold( - body: SmartRefresher( - controller: refreshController, - enablePullDown: true, - enablePullUp: false, - header: MyHeader(), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, + return Stack( + children: [ + Container( + decoration: BoxDecoration( + image: DecorationImage( + fit: BoxFit.fill, + image: AssetImage("assets/image/welfare_zx.webp"), + ), ), - onRefresh: () {}, - physics: BouncingScrollPhysics(), - scrollController: scrollController, - child: Container( - child: SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Stack( - children: [ - Container( - decoration: BoxDecoration( - image: DecorationImage( - fit: BoxFit.fill, - image: AssetImage("assets/image/welfare_zx.webp"), - ), - ), - width: double.infinity, - height: 385.h, - ), - Container( - width: double.infinity, - margin: EdgeInsets.only( - top: 23.h + MediaQuery.of(context).padding.top, - left: 14.w,right: 14.w), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context).pop(); - }, - child: Container( - // color: Colors.white, - alignment: Alignment.centerLeft, - child: Icon( - Icons.arrow_back_ios, - color: Colors.white, - size: 22, - ), - ), - ), - ), - Expanded( - child: Container( - alignment: Alignment.center, - child: Text( - "福利中心", - style: TextStyle( - color: Colors.white, - fontSize: 18.sp, - fontWeight: MyFontWeight.regular, - ), - )), - ), - Spacer(), - ], - ), - - weekCoupons(), + width: double.infinity, + height: 385.h, + ), + Scaffold( + backgroundColor: Colors.transparent, + appBar: MyAppBar( + background: Colors.transparent, + leadingColor: Colors.white, + title: "福利中心", + titleColor: Colors.white, + titleSize: 18.sp, + brightness: Brightness.dark, + ), + body:SmartRefresher( + controller: refreshController, + enablePullDown: true, + enablePullUp: false, + header: MyHeader(), + footer: CustomFooter( + builder: (context, mode) { + return MyFooter(mode); + }, + ), + onRefresh:(){ + setState(() { + }); + }, + physics: BouncingScrollPhysics(), + scrollController: scrollController, + child: Container( + margin: EdgeInsets.only(top: 125.h,left: 14,right: 14), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6), + color: Color(0xFFF9FAF7), + ), + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: FutureBuilder( + // future: querySignInfo(), + builder: (context, snap) { + return Column( + children: [ + weekCoupons(), - inviteFriends(), + inviteFriends(), - activityTask(), - ], - ), - ), - ], - ) - ], + activityTask(), + ], + ); + }, + ), ), ), ), ), - ), + ], ); } @@ -210,8 +110,16 @@ class _WelfarePage extends State { decoration: BoxDecoration( borderRadius: BorderRadius.circular(6), color: Colors.white, + boxShadow: [ + BoxShadow( + color: Color(0x08213303).withAlpha(12), + offset: Offset(0, 2), + blurRadius: 3, + spreadRadius: 0, + ), + ], ), - margin: EdgeInsets.only(top: 126.h), + // margin: EdgeInsets.only(top: 139.h), child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, @@ -292,18 +200,50 @@ class _WelfarePage extends State { Widget weekItem() { return Container( width:double.infinity, - height:95.h, + height:100.h, decoration: BoxDecoration( image: DecorationImage( fit: BoxFit.fill, image: AssetImage("assets/image/week_coupons.png"), ), ), - padding: EdgeInsets.symmetric(horizontal: 12.w,vertical: 12.h), + padding: EdgeInsets.symmetric(horizontal: 10.w,vertical: 10.h), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, children: [ + Expanded(child: + Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded(child: Text( + "百年川椒(哈乐城店)", + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.bold, + color: Color(0xFF0D0D0D), + ), + )), + Text( + "新人满减30元", + style: TextStyle( + fontSize: 11.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF4D4D4D), + ), + ), + SizedBox(height:4.h,), + Text( + "有效期至2022-09-10 12:00:00", + style: TextStyle( + fontSize: 11.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF4D4D4D), + ), + ), + ], + )), Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, @@ -322,7 +262,7 @@ class _WelfarePage extends State { TextSpan( text: "30", style: TextStyle( - fontSize: 26.sp, + fontSize: 24.sp, fontWeight: MyFontWeight.semi_bold, color: Color(0xFFFF4500), ), @@ -330,75 +270,41 @@ class _WelfarePage extends State { ], ), ), - Text( + Expanded(child: Text( "满30.1可用", style: TextStyle( - fontSize: 14.sp, + fontSize: 12.sp, fontWeight: MyFontWeight.regular, color: Color(0xFFFF4500), ), - ), - ], - ), - SizedBox(width: 30,), - Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "百年川椒(哈乐城店)", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - color: Color(0xFF0D0D0D), - ), - ), - SizedBox(height: 10,), - Text( - "新人满减30元", - style: TextStyle( - fontSize: 11.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF4D4D4D), + )), + Container( + width: 55.w, + height: 19.h, + decoration: BoxDecoration( + gradient: new LinearGradient( + begin: Alignment.bottomCenter, + end: Alignment.topCenter, + colors: [ + Color(0xFFFF4F00), + Color(0xFFFF2700), + ]), + // border: Border.all(color: Colors.white,width: 0.5), + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(3), ), - ), - SizedBox(height:4.h,), - Text( - "有效期至2022-09-10 12:00:00", - style: TextStyle( - fontSize: 11.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF4D4D4D), + alignment: Alignment.center, + child:Text( + "领取", + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFFFFFFFF), + ), ), - ), + ) ], ), - Expanded(child: - Container( - width: 55.w, - height: 19.h, - decoration: BoxDecoration( - gradient: new LinearGradient( - begin: Alignment.bottomCenter, - end: Alignment.topCenter, - colors: [ - Color(0xFFFF4F00), - Color(0xFFFF2700), - ]), - // border: Border.all(color: Colors.white,width: 0.5), - shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(12), - ), - alignment: Alignment.center, - child:Text( - "领取", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFFFFFFFF), - ), - ), - )) ], ), ); @@ -407,7 +313,7 @@ class _WelfarePage extends State { ///邀请好友 Widget inviteFriends() { return Container( - margin: EdgeInsets.only(right:14.w,top:34.h,bottom:20.h), + margin: EdgeInsets.only(right:14.w,top:24.h,bottom:20.h), child:Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, @@ -470,7 +376,7 @@ class _WelfarePage extends State { ), ], ), - SizedBox(height: 12,), + SizedBox(height: 12.h,), ListView.builder( padding: EdgeInsets.zero, itemCount:6, @@ -497,6 +403,14 @@ class _WelfarePage extends State { decoration: BoxDecoration( borderRadius: BorderRadius.circular(6), color: Colors.white, + boxShadow: [ + BoxShadow( + color: Color(0x08213303).withAlpha(12), + offset: Offset(0, 2), + blurRadius: 3, + spreadRadius: 0, + ), + ], ), padding: EdgeInsets.symmetric(horizontal: 12.w,vertical: 12.h), margin: EdgeInsets.only(bottom: 10.h), @@ -535,18 +449,18 @@ class _WelfarePage extends State { ),), Container( width: 55.w, - height: 19.h, + height: 21.h, decoration: BoxDecoration( gradient: new LinearGradient( - begin: Alignment.bottomCenter, - end: Alignment.topCenter, + begin: Alignment.centerLeft, + end: Alignment.centerRight, colors: [ - Color(0xFFFF4F00), Color(0xFFFF2700), - ]), + Color(0xFFFF4F00), + ],), // border: Border.all(color: Colors.white,width: 0.5), shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(12), + borderRadius: BorderRadius.circular(3), ), alignment: Alignment.center, child:Text( diff --git a/lib/integral/integral_page.dart b/lib/integral/integral_page.dart index f2baa8a5..8157afae 100644 --- a/lib/integral/integral_page.dart +++ b/lib/integral/integral_page.dart @@ -83,19 +83,29 @@ class _IntegralPage extends State { Widget build(BuildContext context) { return Stack( children: [ - Positioned( - child: Container( - height: 122.h + kToolbarHeight + MediaQuery.of(context).padding.top, - decoration: BoxDecoration( - image: DecorationImage( - fit: BoxFit.fill, - image: AssetImage("assets/image/jifen.webp"), - ), + // Positioned( + // child: Container( + // height: 122.h + kToolbarHeight + MediaQuery.of(context).padding.top, + // decoration: BoxDecoration( + // image: DecorationImage( + // fit: BoxFit.fill, + // image: AssetImage("assets/image/jifen.webp"), + // ), + // ), + // ), + // top: 0, + // left: 0, + // right: 0, + // ), + Container( + decoration: BoxDecoration( + image: DecorationImage( + fit: BoxFit.fill, + image: AssetImage("assets/image/jifen.webp"), ), ), - top: 0, - left: 0, - right: 0, + width: double.infinity, + height: 409.h, ), Scaffold( backgroundColor: Colors.transparent, diff --git a/lib/integral/intergra_view/in_for_points.dart b/lib/integral/intergra_view/in_for_points.dart index 3d30e1fe..9917ae97 100644 --- a/lib/integral/intergra_view/in_for_points.dart +++ b/lib/integral/intergra_view/in_for_points.dart @@ -28,8 +28,8 @@ class _InForPoints extends State { Widget build(BuildContext context) { return Container( width: double.infinity, - margin: EdgeInsets.symmetric(horizontal: 16.w, vertical: 6.h), - padding: EdgeInsets.symmetric(horizontal: 20.w, vertical: 20.h), + margin: EdgeInsets.symmetric(horizontal: 14.w, vertical: 6.h), + padding: EdgeInsets.symmetric(horizontal:12.w, vertical: 16.h), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(8), @@ -46,27 +46,33 @@ class _InForPoints extends State { mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - S.of(context).qiandaolingjifen, - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 16.sp, - color: Color(0xFF353535), - ), - ), - SizedBox( - height: 10.h, - ), - Text( - S.of(context).lianxuqiandaolingqushuangbeijifen, - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 11.sp, - color: Color(0xFF727272), - ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Text( + S.of(context).qiandaolingjifen, + style: TextStyle( + fontWeight: MyFontWeight.bold, + fontSize: 16.sp, + color: Color(0xFF4C4C4C), + ), + ), + SizedBox( + width:3.w, + ), + Text( + S.of(context).lianxuqiandaolingqushuangbeijifen, + style: TextStyle( + fontWeight: MyFontWeight.regular, + fontSize: 11.sp, + color: Color(0xFFB3B3B3), + ), + ), + ], ), SizedBox( - height: 32.h, + height: 12.h, ), StaggeredGridView.countBuilder( crossAxisCount: 4, @@ -94,13 +100,13 @@ class _InForPoints extends State { ? S.of(context).yiqiandao : "签到", textColor: (widget.signInfo != null && widget.signInfo.todayHasSignin) - ? Color(0xFF808080) + ? Color(0xFFB3B3B3) : Colors.white, backgroup: (widget.signInfo != null && widget.signInfo.todayHasSignin) ? Color(0xFFF5F6FA) : Color(0xFF00BF00), fontSize: 16.sp, - fontWeight: MyFontWeight.regular, + fontWeight: MyFontWeight.bold, padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 6.h), radius: 20.w, ), diff --git a/lib/login/new_login_page.dart b/lib/login/new_login_page.dart index 5866c5f3..35f29380 100644 --- a/lib/login/new_login_page.dart +++ b/lib/login/new_login_page.dart @@ -235,7 +235,7 @@ class _NewLoginPage extends State { EasyLoading.dismiss(); } else { - SmartDialog.showToast("${value?.msg ??""}", alignment: Alignment.center); + SmartDialog.showToast(value?.msg, alignment: Alignment.center); } } diff --git a/lib/mine/mine_page.dart b/lib/mine/mine_page.dart index 6a64e6ed..d405448a 100644 --- a/lib/mine/mine_page.dart +++ b/lib/mine/mine_page.dart @@ -201,17 +201,24 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { return Column( children: [ Container( + // decoration: BoxDecoration( + // gradient: LinearGradient( + // begin: Alignment.bottomLeft, + // end: Alignment.topRight, + // colors: [ + // Color(0xFFE5F7FF), + // Color(0xFFE8F5E9), + // ], + // stops: [0.1, 0.8], + // ), + // ), decoration: BoxDecoration( - gradient: LinearGradient( - begin: Alignment.bottomLeft, - end: Alignment.topRight, - colors: [ - Color(0xFFE5F7FF), - Color(0xFFE8F5E9), - ], - stops: [0.1, 0.8], + image: DecorationImage( + fit: BoxFit.fill, + image: AssetImage("assets/image/mine_bg.webp"), ), ), + height: 375, child: Column( children: [ ///我的 用户信息 @@ -244,7 +251,6 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { createTime: userInfo?.createTime ?? "", ), - ], ), ), @@ -294,7 +300,7 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { ); }, child:Container( - margin: EdgeInsets.only(left:14,right:14,bottom:20), + margin: EdgeInsets.only(left:14,right:14,bottom:10), padding: EdgeInsets.only(left:12, top:12, right:10,bottom: 12), width: double.infinity, decoration: BoxDecoration( @@ -303,8 +309,8 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { boxShadow: [ BoxShadow( color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, + offset: Offset(0, 2), + blurRadius: 3, spreadRadius: 0, ), ], @@ -391,7 +397,7 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { ///推广图 Widget spreadImage() { return Container( - margin: EdgeInsets.only(right:14.w,bottom:20.h,left: 14.w), + margin: EdgeInsets.only(right:14.w,bottom:10.h,left: 14.w), child: GestureDetector( onTap: (){ Navigator.of(context).pushNamed('/router/welfare_page'); diff --git a/lib/mine/mine_view/mine_calendar.dart b/lib/mine/mine_view/mine_calendar.dart index cb82f96a..383ad867 100644 --- a/lib/mine/mine_view/mine_calendar.dart +++ b/lib/mine/mine_view/mine_calendar.dart @@ -26,8 +26,8 @@ class _MineCalendar extends State { boxShadow: [ BoxShadow( color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, + offset: Offset(0, 2), + blurRadius: 4, spreadRadius: 0, ) ], diff --git a/lib/mine/mine_view/mine_item.dart b/lib/mine/mine_view/mine_item.dart index 85df574b..5766dfd4 100644 --- a/lib/mine/mine_view/mine_item.dart +++ b/lib/mine/mine_view/mine_item.dart @@ -18,18 +18,18 @@ class _MineItem extends State { @override Widget build(BuildContext context) { return Container( - margin: EdgeInsets.fromLTRB(16.w, 10.h, 16.w, 28.h), + margin: EdgeInsets.fromLTRB(16.w, 10.h, 16.w, 27.h), // padding: EdgeInsets.fromLTRB(20.w, 12.h, 20.w, 12.h), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(8), boxShadow: [ BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, + color: Color(0x08213303).withAlpha(12), + offset: Offset(0, 2), + blurRadius: 4, spreadRadius: 0, - ) + ), ], ), child: Column( diff --git a/lib/mine/mine_view/mine_order.dart b/lib/mine/mine_view/mine_order.dart index bc30a2ac..44a0a25f 100644 --- a/lib/mine/mine_view/mine_order.dart +++ b/lib/mine/mine_view/mine_order.dart @@ -16,16 +16,16 @@ class _MineOrderView extends State { @override Widget build(BuildContext context) { return Container( - margin: EdgeInsets.only(left:16.w, bottom:20.h, right:16.w, top:10.h), + margin: EdgeInsets.only(left:16.w, bottom:20.h, right:16.w, top:20.h), padding: EdgeInsets.fromLTRB(20.w, 12.h, 20.w, 12.h), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(8), boxShadow: [ BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, + color: Color(0x08213303).withAlpha(12), + offset: Offset(0, 2), + blurRadius: 4, spreadRadius: 0, ), ], diff --git a/lib/mine/mine_view/mine_view.dart b/lib/mine/mine_view/mine_view.dart index 01835105..0cf0bc05 100644 --- a/lib/mine/mine_view/mine_view.dart +++ b/lib/mine/mine_view/mine_view.dart @@ -65,7 +65,7 @@ class _MineView extends State { return Column( children: [ Container( - margin: EdgeInsets.only(top: 28.w), + margin: EdgeInsets.only(top: 20.w), alignment: Alignment.centerRight, child: Row( mainAxisAlignment: MainAxisAlignment.end, diff --git a/lib/order/order_detail_page.dart b/lib/order/order_detail_page.dart index 277b69c4..ba3151d9 100644 --- a/lib/order/order_detail_page.dart +++ b/lib/order/order_detail_page.dart @@ -47,14 +47,13 @@ class _OrderDetailPage extends State { ); queryDetails(); }); - } /// 小程序登录 minLogin() async { - apiService.minLogin(orderInfo.storeId) - .catchError((onError) {debugPrint(onError);}) - .then((baseData) { + apiService.minLogin(orderInfo.storeId).catchError((onError) { + debugPrint(onError); + }).then((baseData) { if (baseData != null && baseData.isSuccess) { Map minStoreInfo = baseData.data; String minToken = minStoreInfo["token"]; @@ -69,7 +68,7 @@ class _OrderDetailPage extends State { ); minService = MinApiService( Dio(), - showLoading:true, + showLoading: true, context: context, token: minToken, tenant: tenant, @@ -118,81 +117,78 @@ class _OrderDetailPage extends State { 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, + 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, + decoration: BoxDecoration( + image: DecorationImage( + fit: BoxFit.fill, + image: AssetImage("assets/image/settlement_bg.webp"), + ), ), + width: double.infinity, + height: 375.h, ), - 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, - ), + 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,isTakeOut), + ///显示订单信息 + OrderInfoView(orderInfo, isTakeOut), - Container( - height: 42.h, - ), - ], - ), + Container( + height: 42.h, + ), + ], ), ), ), ), - left: 0, - right: 0, - top: 0, - bottom: 0, - ), + ) ], ), ); @@ -352,7 +348,9 @@ class _OrderDetailPage extends State { ), ), Text( - S.of(context).yuan_(orderInfo != null ? orderInfo.finalPayPrice : "0"), + S + .of(context) + .yuan_(orderInfo != null ? orderInfo.finalPayPrice : "0"), style: TextStyle( fontSize: 20.sp, color: Color(0xFF32A060), @@ -497,7 +495,9 @@ class _OrderDetailPage extends State { } _orderCancel() async { - BaseData baseData = await apiService.orderCancel(widget.arguments["id"]).catchError((onError) {}); + BaseData baseData = await apiService + .orderCancel(widget.arguments["id"]) + .catchError((onError) {}); if (baseData != null && baseData.isSuccess) { SmartDialog.showToast("订单取消成功"); Future.delayed(Duration(milliseconds: 300), () { @@ -506,7 +506,6 @@ class _OrderDetailPage extends State { } } - ///评价弹窗 assessShowBottomSheet() { showModalBottomSheet( @@ -527,15 +526,16 @@ class _OrderDetailPage extends State { topRight: const Radius.circular(25.0))), child: Container( width: 299, - height:299, + height: 299, child: Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Expanded(child: - Align(alignment: Alignment.center, + Expanded( + child: Align( + alignment: Alignment.center, child: Text( "订单评价", style: TextStyle( @@ -543,9 +543,10 @@ class _OrderDetailPage extends State { fontSize: 15.sp, color: Color(0xFF000000), ), - ),)), + ), + )), GestureDetector( - onTap: (){ + onTap: () { setState(() { Navigator.of(context).pop(); }); @@ -559,7 +560,9 @@ class _OrderDetailPage extends State { SizedBox(width: 14), ], ), - SizedBox(height: 12.h,), + SizedBox( + height: 12.h, + ), Container( width: double.infinity, height: 1.h, @@ -586,10 +589,12 @@ class _OrderDetailPage extends State { children: [ Image.asset( "assets/image/report_un.webp", - width:45, - height:45, + width: 45, + height: 45, + ), + SizedBox( + height: 4, ), - SizedBox(height: 4,), Text( "不满意", style: TextStyle( @@ -617,10 +622,12 @@ class _OrderDetailPage extends State { children: [ Image.asset( "assets/image/report_h.webp", - width:45, - height:45, + width: 45, + height: 45, + ), + SizedBox( + height: 4, ), - SizedBox(height: 4,), Text( "很满意", style: TextStyle( @@ -635,10 +642,10 @@ class _OrderDetailPage extends State { ], ), Container( - width:double.infinity, + width: double.infinity, height: 36.h, alignment: Alignment.center, - margin: EdgeInsets.only(left: 14.w,right: 14.w,top: 50.h), + margin: EdgeInsets.only(left: 14.w, right: 14.w, top: 50.h), decoration: BoxDecoration( borderRadius: BorderRadius.circular(6), color: Color(0xFF32A060), diff --git a/lib/order/order_view/order_address.dart b/lib/order/order_view/order_address.dart index 1be9afcd..12a4206b 100644 --- a/lib/order/order_view/order_address.dart +++ b/lib/order/order_view/order_address.dart @@ -52,8 +52,8 @@ class _OrderAddress extends State { boxShadow: [ BoxShadow( color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, + offset: Offset(0, 2), + blurRadius: 3, spreadRadius: 0, ), ], diff --git a/lib/order/order_view/order_commodity.dart b/lib/order/order_view/order_commodity.dart index ec16f24b..a2044ad6 100644 --- a/lib/order/order_view/order_commodity.dart +++ b/lib/order/order_view/order_commodity.dart @@ -43,9 +43,9 @@ class _OrderCommodity extends State { color: Colors.white, boxShadow: [ BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 1), - blurRadius: 12, + color: Color(0x08213303).withAlpha(12), + offset: Offset(0, 2), + blurRadius: 3, spreadRadius: 0, ), ], diff --git a/lib/order/order_view/order_info.dart b/lib/order/order_view/order_info.dart index 388ec949..080d3f1e 100644 --- a/lib/order/order_view/order_info.dart +++ b/lib/order/order_view/order_info.dart @@ -32,8 +32,8 @@ class _OrderInfoView extends State { boxShadow: [ BoxShadow( color: Colors.black.withAlpha(12), - offset: Offset(0, 1), - blurRadius: 12, + offset: Offset(0, 2), + blurRadius: 3, spreadRadius: 0, ) ], diff --git a/lib/order/order_view/order_status.dart b/lib/order/order_view/order_status.dart index 55cbfa7d..71046fdb 100644 --- a/lib/order/order_view/order_status.dart +++ b/lib/order/order_view/order_status.dart @@ -71,11 +71,11 @@ class _OrderStatus extends State { : "物流", width: 42.w * AppUtils.textScale(context), height: 20.h * AppUtils.textScale(context), - textColor: Colors.white, - fontSize: 12.sp, + textColor: Color(0xFF32A060), + fontSize: 14.sp, padding: EdgeInsets.fromLTRB(8.w, 1.h, 8.w, 1.h), - backgroup: Color(0xFF32A060), + backgroup: Color(0xFFFFFFFF), radius: 15.w, ), Row( diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index 6c6db000..0ef779fa 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -39,7 +39,7 @@ part 'min_api.g.dart'; // const base_url = "http://192.168.10.37:8765/app/"; -const localBaseUrl = "http://192.168.10.78:8765/app/";///本地 +const localBaseUrl = "http://192.168.10.236:8765/app/";///本地 const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线上 diff --git a/lib/retrofit/min_api.g.dart b/lib/retrofit/min_api.g.dart index a1f083ce..1a3cec24 100644 --- a/lib/retrofit/min_api.g.dart +++ b/lib/retrofit/min_api.g.dart @@ -100,7 +100,7 @@ class _MinApiService implements MinApiService { data: _data); final value = BaseData>.fromJson( _result.data, - (json) => (json as List) + (json) => json==null?null:(json as List) .map( (i) => ShoppingCart.fromJson(i as Map)) .toList()); @@ -241,7 +241,7 @@ class _MinApiService implements MinApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => MinOrderInfo.fromJson(json), + (json) => json==null?null:MinOrderInfo.fromJson(json), ); return value; } diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index 7a64513d..7ab0a849 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -69,7 +69,7 @@ part 'retrofit_api.g.dart'; // const base_url = "http://192.168.10.132:8766/app/";///詹云久 -const localBaseUrl = "http://192.168.10.78:8766/app/";///本地 +const localBaseUrl = "http://192.168.10.236:8766/app/";///本地 const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线上 @RestApi(baseUrl: localBaseUrl) diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index cc353a1c..6822b12c 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -93,7 +93,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => json, + (json) => json==null?null:json, ); return value; } diff --git a/lib/settlement/settlement.dart b/lib/settlement/settlement.dart index da57f161..9e69bad1 100644 --- a/lib/settlement/settlement.dart +++ b/lib/settlement/settlement.dart @@ -32,6 +32,7 @@ import 'package:huixiang/utils/min.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/round_button.dart'; import 'package:huixiang/view_widget/tips_dialog.dart'; +import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -123,6 +124,7 @@ class _Settlement extends State { actProductId ?? "", actProductSkuId ?? "", count1, + payChannel ); } else if (coupons != null && coupons != "" || tableId <= 0) { queryOrderInfo( @@ -135,6 +137,7 @@ class _Settlement extends State { actProductId ?? "", actProductSkuId ?? "", count1, + payChannel ); } else queryOrderInfo( @@ -142,11 +145,12 @@ class _Settlement extends State { selectedBtn, null, 0, - productId ?? "", + productId ?? null, productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", count1, + payChannel ); }); @@ -167,6 +171,7 @@ class _Settlement extends State { actProductId, actProductSkuId, buyNum, + payChannel ) async { BaseData baseData = await minService.getOrderInfo({ "addressId": addressId, @@ -178,7 +183,7 @@ class _Settlement extends State { "actProductId": actProductId, "actProductSkuId": actProductSkuId, "buyNum":buyNum, - + "payChannel": payChannel }).catchError((error) {}); if (baseData != null && baseData.isSuccess) { setState(() { @@ -222,7 +227,8 @@ class _Settlement extends State { productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - count1 + count1, + payChannel ); return; } @@ -276,7 +282,8 @@ class _Settlement extends State { productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - count1 + count1, + payChannel ); } } @@ -302,7 +309,8 @@ class _Settlement extends State { productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - count1 + count1, + payChannel ); } } @@ -398,11 +406,13 @@ class _Settlement extends State { placeOrderFirst.promotionInfoDTO.promotionId = (promotion != null && tableId <= 0) ? promotion.id - : widget.arguments["pid"] ?? ""; + : ""; + // : widget.arguments["pid"] ?? ""; placeOrderFirst.promotionInfoDTO.couponId = (couponListBean != null && tableId <= 0) ? couponListBean.id - : widget.arguments["cid"] ?? ""; + : ""; + // : widget.arguments["cid"] ?? ""; placeOrderFirst.recMobile = (mobile == null || mobile == "") ? mobile : storeInfo.headMobile; placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList; @@ -429,23 +439,18 @@ class _Settlement extends State { } else { ///火锅店下单, 等待结算 BaseData baseData; - if (parentId == "") { - // 下单 - if (placeOrder) { - // 结算 - querySettlement(); - } else { + if (placeOrder) { + // 结算 + querySettlement(); + } + else{ + if (parentId == "") { // 下单 baseData = await minService .placeOrderFirst(placeOrderFirst.toJson()) .catchError((error) { print("error: $error"); }); - } - } else { - if (placeOrder) { - // 结算 - querySettlement(); } else { //加菜 baseData = await minService @@ -607,184 +612,203 @@ class _Settlement extends State { @override Widget build(BuildContext context) { - 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, + return Stack( + children: [ + Container( + // height: 175.h, + // color: Color(0xFF3A405A), + // width: MediaQuery.of(context).size.width, + decoration: BoxDecoration( + image: DecorationImage( + fit: BoxFit.fill, + image: AssetImage("assets/image/settlement_bg.webp"), ), ), - 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( + width: double.infinity, + height: 375.h, + ), + Scaffold( + backgroundColor: Colors.transparent, + appBar: MyAppBar( + background: Colors.transparent, + 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: SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Container( - child: Column( - children: [ - DistributionMode((addressId, isTake, - memberCouponId, orderId, promotionId) { - setState(() { - this.selectedBtn = 0; - }); - queryOrderInfo( - addressId, - isTake, - memberCouponId, - orderId, - promotionId ?? (productId?? ""), - productSkuId ?? "", - actProductId ?? "", - actProductSkuId ?? "", - count1 - ); - }, queryAddress, storeInfo, address, - selectedAddress, pageType), - - SizedBox( - height: 16, - ), - - /// 预留的手机号, 可修改 - // EditPhoneWidget( - // storeInfo, - // mobileChange, - // ), - - ///订单商品 - SettlementOrderCommodity( - selectedBtn, - settleOrderInfo, - minOrderInfo, - tableId, - pageType, - ), - - ///优惠券/备注/会员优惠金额 - ActivityCouponRemarks( - couponCart, - activityCart, - settleOrderInfo, - coupons, - promotions, - couponCount(), - placeOrder, - remakers, + child: Column( + children: [ + DistributionMode((addressId, isTake, + memberCouponId, orderId, promotionId) { + setState(() { + this.selectedBtn = 0; + }); + queryOrderInfo( + addressId, + isTake, + memberCouponId, + orderId, + promotionId ?? (productId?? ""), + productSkuId ?? "", + actProductId ?? "", + actProductSkuId ?? "", + count1, + payChannel + ); + }, queryAddress, storeInfo, address, + selectedAddress, pageType), + + SizedBox( + height: 16, + ), + + /// 预留的手机号, 可修改 + // EditPhoneWidget( + // storeInfo, + // mobileChange, + // ), + + ///订单商品 + SettlementOrderCommodity( + selectedBtn, + settleOrderInfo, + minOrderInfo, + tableId, + pageType, + ), + + ///优惠券/备注/会员优惠金额 + ActivityCouponRemarks( + couponCart, + activityCart, + settleOrderInfo, + payChannel == 4 ? null : coupons, + payChannel == 4 ? null : promotions, + couponCount(), + placeOrder, + remakers, () { - Navigator.of(context).pushNamed( - '/router/edit_remarks_page', - arguments: {}, - ).then((value) => { - setState(() { - if (value != null) remakers = value; - }) - }); - }, - tableId, - ), - - if (placeOrder && - joinA != JoinActivity.BargainBug) - - ///支付方式 - PayMethod(payChannelCheck), - ], + Navigator.of(context).pushNamed( + '/router/edit_remarks_page', + arguments: {}, + ).then((value) => { + setState(() { + if (value != null) remakers = value; + }) + }); + }, + tableId, ), - ), + + if (placeOrder && + joinA != JoinActivity.BargainBug) + + ///支付方式 + PayMethod(payChannelCheck), + ], ), ), - 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, - ), - ), - 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: joinA == JoinActivity.BargainBug - ? "发起砍价" - : (placeOrder ? S.current.jiesuan : "下单"), - textColor: Colors.white, - fontWeight: MyFontWeight.regular, - backgroup: Color(0xFF32A060), - fontSize: 16.sp, - padding: EdgeInsets.symmetric( - vertical: 5.h, - ), - callback: () { - pageType != null - ? bargainOrderId != null - ? activityPay() - : joinA == JoinActivity.GoJoin - ? queryJoinAct() - : queryLaunchAct() - : queryPlaceOrderFirst(); - }, - ), - ], + ), + flex: 1, + ), + Container( + height: 54.h, + decoration: BoxDecoration( + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Color(0x08213303).withAlpha(12), + offset: Offset(0, -1), + blurRadius: 8, + spreadRadius: 0, ), - ), - ], + ], + ), + 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), + ), + ), + SizedBox( + width: 28, + ), + RoundButton( + width: 88.w, + height: 32.h, + radius: 16, + text: joinA == JoinActivity.BargainBug + ? "发起砍价" + : (placeOrder ? "提交订单" : "下单"), + textColor: Colors.white, + fontWeight: MyFontWeight.regular, + backgroup: Color(0xFF32A060), + fontSize: 16.sp, + padding: EdgeInsets.symmetric( + vertical: 5.h, + ), + callback: () { + pageType != null + ? bargainOrderId != null + ? activityPay() + : joinA == JoinActivity.GoJoin + ? queryJoinAct() + : queryLaunchAct() + : queryPlaceOrderFirst(); + }, + ), + SizedBox(width: 17,) + ], + ), ), - ), + ], ), - left: 0, - right: 0, - top: 0, - bottom: 0, ), - ], - ), + ) + ], ); } payChannelCheck(int payChannel) { this.payChannel = payChannel; + queryOrderInfo( + address?.id, + selectedBtn, + payChannel == 4 ? null : couponListBean?.id, + 0, + payChannel == 4 ? null : promotion?.id, + productSkuId ?? "", + actProductId ?? "", + actProductSkuId ?? "", + count1, + payChannel + ); } mobileChange(String mobile) { @@ -817,10 +841,11 @@ class _Settlement extends State { couponBean: couponListBean); }, ); - // if (couponBean != null) { + if (couponBean != null) { this.couponListBean = couponBean; coupons = couponListBean?.promotionName??""; promotions = ""; + this.promotion = null; queryOrderInfo( address?.id, selectedBtn, @@ -830,9 +855,10 @@ class _Settlement extends State { productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - count1 + count1, + payChannel ); - // } + } } ///活动弹窗 @@ -847,10 +873,11 @@ class _Settlement extends State { ); if (pro != null) { this.promotion = pro; - promotions = promotion.name; + promotions = promotion?.name ?? ""; coupons = ""; + this.couponListBean = null; queryOrderInfo( - address != null ? address.id : null, + address?.id, selectedBtn, null, 0, @@ -858,7 +885,8 @@ class _Settlement extends State { productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - count1 + count1, + payChannel ); } } diff --git a/lib/settlement/settlement_view/settlement_order_commodity.dart b/lib/settlement/settlement_view/settlement_order_commodity.dart index d9b5e8c1..1dbe2c6d 100644 --- a/lib/settlement/settlement_view/settlement_order_commodity.dart +++ b/lib/settlement/settlement_view/settlement_order_commodity.dart @@ -113,7 +113,7 @@ class _SettlementOrderCommodity extends State { color: Colors.grey, ), )); - // widgets.add(buildTotalPrice()); + widgets.add(buildTotalPrice()); return widgets; } @@ -317,71 +317,71 @@ class _SettlementOrderCommodity extends State { ); } - // Widget buildTotalPrice() { - // return Container( - // margin: EdgeInsets.only(top: 7.h, bottom: 11.h), - // child: Row( - // mainAxisAlignment: MainAxisAlignment.end, - // crossAxisAlignment: CrossAxisAlignment.baseline, - // textBaseline: TextBaseline.alphabetic, - // children: [ - // Expanded( - // child: Text( - // S.of(context).gongjijianshangpin((widget.minOrderInfo != null) - // ? ((widget.minOrderInfo != null) - // ? widget.minOrderInfo.orderProductVOList.length - // : "0") - // : (widget.settleOrderInfo != null) - // ? widget.settleOrderInfo.orderProductList.length - // : "0"), - // style: TextStyle( - // fontSize: 10.sp, - // color: Color(0xFFA29E9E), - // fontWeight: MyFontWeight.semi_bold, - // ), - // ), - // flex: 1, - // ), - // Container( - // child: Text( - // "已优惠:¥${discountPrice()}", - // style: TextStyle( - // fontSize: 12.sp, - // color: Color(0xFF7B7B7B), - // fontWeight: MyFontWeight.medium, - // ), - // ), - // ), - // SizedBox( - // width: 15.w, - // ), - // - // Container( - // child: Text( - // S.of(context).jiesuanjine, - // style: TextStyle( - // fontSize: 12.sp, - // color: Color(0xFF353535), - // fontWeight: MyFontWeight.semi_bold, - // ), - // ), - // ), - // SizedBox( - // width: 5.w, - // ), - // Text( - // totalPrice(), - // textAlign: TextAlign.end, - // style: TextStyle( - // fontSize: 14.sp, - // color: Color(0xFF32A060), - // fontWeight: MyFontWeight.semi_bold, - // ), - // ), - // ], - // ), - // ); - // } + Widget buildTotalPrice() { + return Container( + margin: EdgeInsets.only(top: 7.h, bottom: 11.h), + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.baseline, + textBaseline: TextBaseline.alphabetic, + children: [ + Expanded( + child: Text( + S.of(context).gongjijianshangpin((widget.minOrderInfo != null) + ? ((widget.minOrderInfo != null) + ? widget.minOrderInfo.orderProductVOList.length + : "0") + : (widget.settleOrderInfo != null) + ? widget.settleOrderInfo.orderProductList.length + : "0"), + style: TextStyle( + fontSize: 10.sp, + color: Color(0xFFA29E9E), + fontWeight: MyFontWeight.semi_bold, + ), + ), + flex: 1, + ), + Container( + child: Text( + "已优惠:¥${discountPrice()}", + style: TextStyle( + fontSize: 12.sp, + color: Color(0xFF7B7B7B), + fontWeight: MyFontWeight.medium, + ), + ), + ), + SizedBox( + width: 15.w, + ), + + Container( + child: Text( + S.of(context).jiesuanjine, + style: TextStyle( + fontSize: 12.sp, + color: Color(0xFF353535), + fontWeight: MyFontWeight.semi_bold, + ), + ), + ), + SizedBox( + width: 5.w, + ), + Text( + totalPrice(), + textAlign: TextAlign.end, + style: TextStyle( + fontSize: 14.sp, + color: Color(0xFF32A060), + fontWeight: MyFontWeight.semi_bold, + ), + ), + ], + ), + ); + } String discountPrice(){ if(widget.minOrderInfo != null){ diff --git a/lib/store/shop__details_page.dart b/lib/store/shop__details_page.dart index 0c04c34b..ed0fa3fa 100644 --- a/lib/store/shop__details_page.dart +++ b/lib/store/shop__details_page.dart @@ -445,10 +445,10 @@ class _ShopDetailsPage extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ buildProduct(), + SizedBox(height: 16.h,), Container( width: double.infinity, - padding: EdgeInsets.only( - top: 16.h, left: 14.w, right: 14.w, bottom: 16.h), + padding: EdgeInsets.symmetric(horizontal: 14.w,vertical: 16.h), color: Colors.white, child: Column( mainAxisAlignment: MainAxisAlignment.start, @@ -508,13 +508,13 @@ class _ShopDetailsPage extends State { spreadRadius: 0, ) ], - color: Colors.white), + color: Color(0xFFFFFFFF)), child: Column( children: [ swiper(), Container( padding: EdgeInsets.only( - top: 16.h, left: 14.w, right: 14.w, bottom: 16.h), + top: 16.h, left: 14.w, right: 14.w,bottom: 16.h), child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/store/shopping/shopping_home/search_page.dart b/lib/store/shopping/shopping_home/search_page.dart index ee067d04..4e71b339 100644 --- a/lib/store/shopping/shopping_home/search_page.dart +++ b/lib/store/shopping/shopping_home/search_page.dart @@ -347,6 +347,8 @@ class _SearchPage extends State child: FutureBuilder( builder: (context, snapshot) { return Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ if (hasFocus) hotSearchWords(), if (hasFocus) historySearchWords(), @@ -383,35 +385,23 @@ class _SearchPage extends State ), ), SizedBox(height: 16.h), - GridView.builder( - itemCount: hotSearch?.length ?? 0, - shrinkWrap: true, - padding: EdgeInsets.zero, - physics: NeverScrollableScrollPhysics(), - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( - //一行的Widget数量 - crossAxisCount: 4, - //水平子Widget之间间距 - crossAxisSpacing: 6.w, - //垂直子Widget之间间距 - mainAxisSpacing: 12.w, - //垂直单个子Widget之间间距 - childAspectRatio: 3 / 1, - ), - itemBuilder: (context, index) { - return GestureDetector( - onTap: () { - setState(() { - if (hotSearch[index] != null) { - editingController.text = hotSearch[index]; - appletGoods(hotSearch[index]); - } - }); - }, - child: hotSearchItem(hotSearch[index]), - ); - }, - ), + Wrap( + runSpacing: 10.0, + spacing: 10.0, + children: hotSearch.take(hotSearch?.length).map((String hotSearch) { + return GestureDetector( + onTap: () { + setState(() { + if (hotSearch.length != null) { + editingController.text = hotSearch; + appletGoods(hotSearch); + } + }); + }, + child:hotSearchItem( + hotSearch + )); + }).toList()) ], ), ); @@ -419,30 +409,28 @@ class _SearchPage extends State Widget hotSearchItem(String hotSearch) { return Container( - width: double.infinity, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - RoundButton( - padding: EdgeInsets.only(left: 4, right: 4), - height: 29.h, - text: hotSearch, - textColor: Color(0xFF181818), + padding: const EdgeInsets.symmetric(vertical:6.0,horizontal: 22.0), + decoration: BoxDecoration( + color: Color(0xFFF5F5F5), + borderRadius: const BorderRadius.all( + Radius.circular(4.0), + ), + ), + child: Text( + hotSearch, + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: Color(0xFF181818), + fontSize: 14.sp, fontWeight: MyFontWeight.regular, - radius: 4, - backgroup: Color(0xFFF5F5F5), - fontSize: 12.sp, ), - ], - ), - ); + )); } ///历史搜索 Widget historySearchWords() { return Container( - // width: double.infinity, + margin: EdgeInsets.only(top: 24.h), child: Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start, @@ -481,35 +469,23 @@ class _SearchPage extends State ], ), SizedBox(height: 16.h), - GridView.builder( - itemCount: historySearch?.length ?? 0, - shrinkWrap: true, - padding: EdgeInsets.zero, - physics: NeverScrollableScrollPhysics(), - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( - //一行的Widget数量 - crossAxisCount: 4, - //水平子Widget之间间距 - crossAxisSpacing: 6.w, - //垂直子Widget之间间距 - mainAxisSpacing: 12.w, - //垂直单个子Widget之间间距 - childAspectRatio: 3 / 1, - ), - itemBuilder: (context, index) { - return GestureDetector( - onTap: () { - setState(() { - if (historySearch[index] != null) { - editingController.text = historySearch[index]; - appletGoods(historySearch[index]); - } - }); - }, - child: historySearchItem(historySearch[index]), - ); - }, - ), + Wrap( + runSpacing: 10.0, + spacing: 10.0, + children: historySearch.take(historySearch?.length).map((String historySearch) { + return GestureDetector( + onTap: () { + setState(() { + if (historySearch.length != null) { + editingController.text = historySearch; + appletGoods(historySearch); + } + }); + }, + child:historySearchItem( + historySearch + )); + }).toList()) ], ), ); @@ -517,32 +493,22 @@ class _SearchPage extends State Widget historySearchItem(String historySearch) { return Container( - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - child: Container( - padding: EdgeInsets.only(left: 4, right: 4), - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(4), - color: Color(0xFFF5F5F5)), - child: Text( - historySearch, - overflow: TextOverflow.ellipsis, - maxLines: 1, - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF181818), - ), - ), - ), - ) - ], - ), - ); + padding: const EdgeInsets.symmetric(vertical:6.0,horizontal: 22.0), + decoration: BoxDecoration( + color: Color(0xFFF5F5F5), + borderRadius: const BorderRadius.all( + Radius.circular(4.0), + ), + ), + child: Text( + historySearch, + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: Color(0xFF181818), + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + ), + )); } ///搜索列表 diff --git a/lib/store/store_view/product_sku.dart b/lib/store/store_view/product_sku.dart index 16f971ca..79895d9c 100644 --- a/lib/store/store_view/product_sku.dart +++ b/lib/store/store_view/product_sku.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/retrofit/data/miNiDetail.dart'; @@ -93,11 +94,7 @@ class _ProductSku extends State { child: StatefulBuilder(builder: (context1, state) { return Container( alignment: Alignment.topCenter, - padding: EdgeInsets.only( - top: 16, - left: 16, - right: 16, - ), + padding: EdgeInsets.symmetric(horizontal: 14.w,vertical: 16), height: MediaQuery.of(context).size.height / 3 * 2, width: double.infinity, decoration: BoxDecoration( @@ -121,6 +118,7 @@ class _ProductSku extends State { width: 75, height: 75, fit: BoxFit.cover, + radius: BorderRadius.circular(4), errorSrc: "assets/image/default_1.webp", fadeSrc: "assets/image/default_1.webp", ), @@ -189,7 +187,7 @@ class _ProductSku extends State { ), if (widget.miNiDetail.attrList != null && widget.miNiDetail.attrList.length > 0) SizedBox( - height: 23, + height:10, ), if (widget.miNiDetail.attrList != null && widget.miNiDetail.attrList.length > 0) Expanded( @@ -200,10 +198,9 @@ class _ProductSku extends State { padding: EdgeInsets.zero, itemBuilder: (context, position) { return attrItem( - (index) { + (attrValue) { state(() { - selectSkus[position] = widget.miNiDetail - .attrList[position].attrValueList[index].attrValue; + selectSkus[position] = attrValue; buildCount(); }); }, @@ -673,7 +670,7 @@ class _ProductSku extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: EdgeInsets.only(top: 24, bottom: 16), + padding: EdgeInsets.only(top: 16, bottom: 16), child: Text( attrListBean.attrName, style: TextStyle( @@ -683,7 +680,8 @@ class _ProductSku extends State { ), ), ), - sweetnessStore(fc, attrListBean.attrValueList, position), + sweetnessStore(fc,attrListBean.attrValueList, position), + // sweetnessStore(fc, attrListBean.attrValueList, position), ], ); else { @@ -691,62 +689,75 @@ class _ProductSku extends State { } } - Widget sweetnessStore(Function fc, List arrays, position) { - return GridView.builder( - itemCount: arrays.length, - shrinkWrap: true, - padding: EdgeInsets.zero, - physics: NeverScrollableScrollPhysics(), - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( - //一行的Widget数量 - crossAxisCount: 4, - //水平子Widget之间间距 - crossAxisSpacing: 6.w, - //垂直子Widget之间间距 - mainAxisSpacing: 12.w, - //垂直单个子Widget之间间距 - childAspectRatio: 3 / 1, - ), - itemBuilder: (context, index) { - return GestureDetector( - onTap: () { - fc(index); - }, - child: sweetnessItem( - arrays[index].attrValue, - (arrays[index].attrValue == selectSkus[position]) ?? false, - ), - ); - }, - ); + // Widget sweetnessStore(Function fc, List arrays, position) { + // return GridView.builder( + // itemCount: arrays.length, + // shrinkWrap: true, + // padding: EdgeInsets.zero, + // physics: NeverScrollableScrollPhysics(), + // gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + // //一行的Widget数量 + // crossAxisCount: 4, + // //水平子Widget之间间距 + // crossAxisSpacing: 6.w, + // //垂直子Widget之间间距 + // mainAxisSpacing: 12.w, + // //垂直单个子Widget之间间距 + // childAspectRatio: 3 / 1, + // ), + // itemBuilder: (context, index) { + // return GestureDetector( + // onTap: () { + // fc(index); + // }, + // child: sweetnessItem( + // arrays[index].attrValue, + // (arrays[index].attrValue == selectSkus[position]) ?? false, + // ), + // ); + // }, + // ); + // } + + Widget sweetnessStore(Function fc,List arrays, position){ + return Wrap( + runSpacing: 10.0, + spacing: 10.0, + children: arrays.take(arrays.length).map((AttrValueListBean tag) { + return GestureDetector( + onTap: () { + fc(tag.attrValue); + }, + child:sweetnessItem( + tag.attrValue, + (tag.attrValue == selectSkus[position]) ?? false, + )); + }).toList()); } Widget sweetnessItem(String name, bool isCheck) { return Container( - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - width: 70.w, - height:30.h, - alignment: Alignment.center, - decoration: BoxDecoration( - color: !isCheck ? Color(0xFFE5E5E5) : Color(0xFF32A060), - borderRadius: BorderRadius.all(Radius.circular(4)), - ), - child:Text( - name, - overflow: TextOverflow.ellipsis, - style: TextStyle( - color:!isCheck ? Color(0xFF727272) : Colors.white, - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - ), - ), - ), - ], + padding: const EdgeInsets.symmetric(vertical:5.0,horizontal: 12.0), + decoration: BoxDecoration( + color: !isCheck ? Color(0xFFF2F2F2) : Color(0xFFF0FAF4), + border: Border.all( + width: !isCheck ? 0:1, + color: !isCheck ? Color(0xFFF2F2F2):Color(0xFF32A060), + style: BorderStyle.solid, + ), + borderRadius: const BorderRadius.all( + Radius.circular(4.0), + ), ), - ); + child: Text( + name, + overflow: TextOverflow.ellipsis, + style: TextStyle( + color:!isCheck ? Color(0xFF4D4D4D) : Color(0xFF32A060), + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + ), + )); } + } diff --git a/lib/store/store_view/shop_car.dart b/lib/store/store_view/shop_car.dart index 9f543ded..f264f46d 100644 --- a/lib/store/store_view/shop_car.dart +++ b/lib/store/store_view/shop_car.dart @@ -63,7 +63,7 @@ class _ShopCar extends State { top: 16, left: 16, right: 16, - bottom: 8, + bottom: 0, ), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -102,7 +102,6 @@ class _ShopCar extends State { bottom: 54, child: Container( padding: EdgeInsets.only( - top: 8, left: 16, right: 16, ), diff --git a/lib/store/store_view/shop_goods.dart b/lib/store/store_view/shop_goods.dart index 0701a67e..ac8694b9 100644 --- a/lib/store/store_view/shop_goods.dart +++ b/lib/store/store_view/shop_goods.dart @@ -169,7 +169,7 @@ class _ShopGoods extends State { text: S.of(context).xuanguige, textColor: Colors.white, fontWeight: MyFontWeight.medium, - radius: 11, + radius: 3, backgroup: Color(0xFF32A060), fontSize: 11.sp, padding: EdgeInsets.symmetric(vertical: 5.h), diff --git a/lib/store/store_view/store_order_list.dart b/lib/store/store_view/store_order_list.dart index 1c157a00..965d5db3 100644 --- a/lib/store/store_view/store_order_list.dart +++ b/lib/store/store_view/store_order_list.dart @@ -68,6 +68,7 @@ class _StoreOrderListPage extends State { token: widget.minToken, tenant: widget.tenant, storeId: widget.arguments["id"], + showLoading: true ); BaseData> baseData = diff --git a/lib/view_widget/mine_vip_view.dart b/lib/view_widget/mine_vip_view.dart index 6ec0d3c1..3d05562e 100644 --- a/lib/view_widget/mine_vip_view.dart +++ b/lib/view_widget/mine_vip_view.dart @@ -125,7 +125,7 @@ class MineVipView extends StatelessWidget { : EdgeInsets.fromLTRB(padding.w, 16.h, padding.w, 0), width: MediaQuery.of(context).size.width - 32.w, height: ((MediaQuery.of(context).size.width - 32.w) / - (isUserVip ? 1.88 : 1.90) * + (isUserVip ? 1.99 : 2.11) * AppUtils.textScale(context)), decoration: BoxDecoration( gradient: LinearGradient(