diff --git a/lib/home/welfare_page.dart b/lib/home/welfare_page.dart index af3c967f..df772876 100644 --- a/lib/home/welfare_page.dart +++ b/lib/home/welfare_page.dart @@ -704,7 +704,7 @@ class _WelfarePage extends State { "assets/image/welfare_spread.webp", width:double.infinity, fit: BoxFit.fill, - height:100.h, + height:80.h, ), borderRadius: BorderRadius.circular(6.w), ), diff --git a/lib/integral/integral_page.dart b/lib/integral/integral_page.dart index e327e46d..fe3d9724 100644 --- a/lib/integral/integral_page.dart +++ b/lib/integral/integral_page.dart @@ -81,104 +81,107 @@ class _IntegralPage extends State { @override 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"), - // ), - // ), - // ), - // top: 0, - // left: 0, - // right: 0, - // ), - Container( - decoration: BoxDecoration( - image: DecorationImage( - fit: BoxFit.fill, - image: AssetImage("assets/image/jifen.webp"), + return Container( + color: Colors.white, + child: 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"), + // ), + // ), + // ), + // top: 0, + // left: 0, + // right: 0, + // ), + Container( + decoration: BoxDecoration( + image: DecorationImage( + fit: BoxFit.fill, + image: AssetImage("assets/image/jifen.webp"), + ), ), + width: double.infinity, + height: 215.h, ), - width: double.infinity, - height: 215.h, - ), - Scaffold( - backgroundColor: Colors.transparent, - appBar: MyAppBar( - exit: (){Navigator.of(context).pop(signInfo.todayHasSignin ?? false);}, - background: Colors.transparent, - leadingColor: Colors.white, - title: "", - titleColor: Colors.white, - titleSize: 16.sp, - brightness: Brightness.dark, - action: Container( - alignment: Alignment.center, - margin: EdgeInsets.only(right: 16.w), - child: GestureDetector( - onTap: () { - Navigator.of(context).pushNamed('/router/integral_detailed_page'); - }, - child: Text( - S.of(context).mingxi, - style: TextStyle( - color: Colors.white, - fontSize: 16.sp, - fontWeight: MyFontWeight.bold, + Scaffold( + backgroundColor: Colors.transparent, + appBar: MyAppBar( + exit: (){Navigator.of(context).pop(signInfo.todayHasSignin ?? false);}, + background: Colors.transparent, + leadingColor: Colors.white, + title: "", + titleColor: Colors.white, + titleSize: 16.sp, + brightness: Brightness.dark, + action: Container( + alignment: Alignment.center, + margin: EdgeInsets.only(right: 16.w), + child: GestureDetector( + onTap: () { + Navigator.of(context).pushNamed('/router/integral_detailed_page'); + }, + child: Text( + S.of(context).mingxi, + style: TextStyle( + color: Colors.white, + fontSize: 16.sp, + fontWeight: MyFontWeight.bold, + ), ), ), ), ), - ), - body:SmartRefresher( - controller: refreshController, - enablePullDown: true, - enablePullUp: false, - header: MyHeader(), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); + body:SmartRefresher( + controller: refreshController, + enablePullDown: true, + enablePullUp: false, + header: MyHeader(), + footer: CustomFooter( + builder: (context, mode) { + return MyFooter(mode); + }, + ), + onRefresh:(){ + setState(() { + querySignInfo(); + }); }, - ), - onRefresh:(){ - setState(() { - querySignInfo(); - }); - }, - physics: BouncingScrollPhysics(), - scrollController: scrollController, - child: Container( - child: SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: FutureBuilder( - future: querySignInfo(), - builder: (context, snap) { - return Column( - children: [ - /// 上面的积分和VIP等级显示 - IntegralVip(rankLevel, signInfo, userInfo,"${ (signInfo?.signInList?.length ) ?? "0"}", - ((signInfo?.rewardList != null && signInfo.rewardList.length > (signInfo?.signInList?.length ?? 0)) ? - signInfo.rewardList[signInfo?.signInList?.length ?? 0]:0).toString()), + physics: BouncingScrollPhysics(), + scrollController: scrollController, + child: Container( + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: FutureBuilder( + future: querySignInfo(), + builder: (context, snap) { + return Column( + children: [ + /// 上面的积分和VIP等级显示 + IntegralVip(rankLevel, signInfo, userInfo,"${ (signInfo?.signInList?.length ) ?? "0"}", + ((signInfo?.rewardList != null && signInfo.rewardList.length > (signInfo?.signInList?.length ?? 0)) ? + signInfo.rewardList[signInfo?.signInList?.length ?? 0]:0).toString()), - ///立即签到 - InForPoints(signInfo, _signIn), + ///立即签到 + InForPoints(signInfo, _signIn), - ///积分任务 - IntegralTask(signInfo), - ], - ); - }, + ///积分任务 + IntegralTask(signInfo), + ], + ); + }, + ), ), ), ), ), - ), - ], + ], + ), ); } diff --git a/lib/main.dart b/lib/main.dart index ff373191..69a1c025 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -163,6 +163,7 @@ class MyApp extends StatelessWidget { child: ScreenUtilInit( designSize: Size(375, 812), builder: () => MaterialApp( + title: "", debugShowCheckedModeBanner: false, theme: ThemeData( primarySwatch: Colors.blue, diff --git a/lib/order/order_detail_page.dart b/lib/order/order_detail_page.dart index 200147c6..9429784d 100644 --- a/lib/order/order_detail_page.dart +++ b/lib/order/order_detail_page.dart @@ -121,84 +121,87 @@ class _OrderDetailPage extends State { @override Widget build(BuildContext context) { - return Stack( - children: [ - 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"), + return Container( + color: Colors.white, + child: Stack( + children: [ + 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, ), - width: double.infinity, - height: 375.h, - ), - 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, + ), - ///订单取货地址,或, 收货地址 - if(orderInfo != null) - OrderAddress( - orderStatus, - isTakeOut, - sendStatus, - payStatus, - refundStatus, - title, - center, - paySelected, - _orderCancel, - orderInfo, - ), + ///订单取货地址,或, 收货地址 + if(orderInfo != null) + OrderAddress( + orderStatus, + isTakeOut, + sendStatus, + payStatus, + refundStatus, + title, + center, + paySelected, + _orderCancel, + orderInfo, + ), - ///订单商品 - if(orderInfo != null) - OrderCommodity(orderInfo), + ///订单商品 + if(orderInfo != null) + OrderCommodity(orderInfo), - ///显示订单信息 - if(orderInfo != null) - OrderInfoView(orderInfo, isTakeOut), + ///显示订单信息 + if(orderInfo != null) + OrderInfoView(orderInfo, isTakeOut), - Container( - height: 42.h, - ), - ], + Container( + height: 42.h, + ), + ], + ), ), ), ), - ), - ) - ], + ) + ], + ), ); } diff --git a/lib/setting/account_security_page.dart b/lib/setting/account_security_page.dart index f45254ef..bc5a6ab6 100644 --- a/lib/setting/account_security_page.dart +++ b/lib/setting/account_security_page.dart @@ -85,7 +85,7 @@ class _AccountSecurityPage extends State { children: [ GestureDetector( onTap: () { - Navigator.of(context).popAndPushNamed('/router/platform_code_page',arguments:{"userInfo":userInfo}); + Navigator.of(context).pushReplacementNamed('/router/platform_code_page',arguments:{"userInfo":userInfo}); }, child: Container( padding: EdgeInsets.all(15), diff --git a/lib/setting/platform_code_page.dart b/lib/setting/platform_code_page.dart index 5611a7be..713bf933 100644 --- a/lib/setting/platform_code_page.dart +++ b/lib/setting/platform_code_page.dart @@ -77,7 +77,7 @@ class _PlatformCodePage extends State { "smsCode": smsCode, }).catchError((error) {}); if (baseData != null && baseData.isSuccess) { - Navigator.of(context).popAndPushNamed( + Navigator.of(context).pushReplacementNamed( '/router/platform_pay_code', arguments: { "inputText": inputText, diff --git a/lib/setting/platform_pay_code.dart b/lib/setting/platform_pay_code.dart index 6774e731..2b1f57f8 100644 --- a/lib/setting/platform_pay_code.dart +++ b/lib/setting/platform_pay_code.dart @@ -1,17 +1,10 @@ -import 'package:dio/dio.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; -import 'package:huixiang/retrofit/retrofit_api.dart'; -import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:huixiang/view_widget/pay_selected_dialog.dart'; import 'package:pin_input_text_field/pin_input_text_field.dart'; -import 'package:shared_preferences/shared_preferences.dart'; class PlatformPayCode extends StatefulWidget { final Map arguments; @@ -120,7 +113,7 @@ class _PlatformPayCode extends State { onTap: (){ setState(() { if(inputCode.length == 6){ - Navigator.of(context).popAndPushNamed('/router/platform_pay_code_success',arguments:{ + Navigator.of(context).pushReplacementNamed('/router/platform_pay_code_success',arguments:{ "inputCode":inputCode, "inputText":widget.arguments["inputText"] }); diff --git a/lib/setting/setting_page.dart b/lib/setting/setting_page.dart index 9c411e4d..f20988cf 100644 --- a/lib/setting/setting_page.dart +++ b/lib/setting/setting_page.dart @@ -9,7 +9,6 @@ import 'package:huixiang/utils/event_type.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/min.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/round_button.dart'; import 'package:path_provider/path_provider.dart'; import 'package:shared_preferences/shared_preferences.dart'; diff --git a/lib/settlement/settlement.dart b/lib/settlement/settlement.dart index 71b46cfc..00bff3e7 100644 --- a/lib/settlement/settlement.dart +++ b/lib/settlement/settlement.dart @@ -642,7 +642,7 @@ class _Settlement extends State { } toOrderDetails(String orderId) { - Navigator.of(context).popAndPushNamed( + Navigator.of(context).pushReplacementNamed( '/router/order_details', arguments: { "id": orderId, @@ -654,7 +654,7 @@ class _Settlement extends State { ///去砍价详情页面 toBargain() async { await Navigator.of(context) - .popAndPushNamed('/router/bargain_details', arguments: { + .pushReplacementNamed('/router/bargain_details', arguments: { "actRecordId": launchJoinAct.actRecordId, // "limitNumber": limitNumber, "storeInfo": storeInfo, @@ -663,194 +663,198 @@ class _Settlement extends State { @override Widget build(BuildContext context) { - 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"), + return Container( + color: Colors.white, + child: 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"), + ), ), + width: double.infinity, + height: 375.h, ), - 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: Column( - children: [ - DistributionMode((addressId, isTake, memberCouponId, - orderId, promotionId) { - setState(() { - this.selectedBtn = 0; - }); - queryOrderInfo( - addressId, - isTake, - memberCouponId, - orderId, - promotionId ?? (productId ?? ""), - productSkuId ?? "", - actProductId ?? "", - actProductSkuId ?? "", - count1, - payChannel, - tableId ?? 0); - }, queryAddress, storeInfo, address, - selectedAddress, pageType), - - SizedBox( - height: 16, - ), - - /// 预留的手机号, 可修改 - // EditPhoneWidget( - // storeInfo, - // mobileChange, - // ), - - ///订单商品 - SettlementOrderCommodity( - selectedBtn, - settleOrderInfo, - minOrderInfo, - tableId, - pageType, - ), - - ///优惠券/备注/会员优惠金额 - ActivityCouponRemarks( - couponCart, - activityCart, - settleOrderInfo, - minOrderInfo, - coupons, - 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) + 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: Column( + children: [ + DistributionMode((addressId, isTake, memberCouponId, + orderId, promotionId) { + setState(() { + this.selectedBtn = 0; + }); + queryOrderInfo( + addressId, + isTake, + memberCouponId, + orderId, + promotionId ?? (productId ?? ""), + productSkuId ?? "", + actProductId ?? "", + actProductSkuId ?? "", + count1, + payChannel, + tableId ?? 0); + }, queryAddress, storeInfo, address, + selectedAddress, pageType), + + SizedBox( + height: 16, + ), + + /// 预留的手机号, 可修改 + // EditPhoneWidget( + // storeInfo, + // mobileChange, + // ), + + ///订单商品 + if(settleOrderInfo != null || minOrderInfo != null) + SettlementOrderCommodity( + selectedBtn, + settleOrderInfo, + minOrderInfo, + tableId, + pageType, + ), + + ///优惠券/备注/会员优惠金额 + ActivityCouponRemarks( + couponCart, + activityCart, + settleOrderInfo, + minOrderInfo, + coupons, + 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), - ], + PayMethod(payChannelCheck), + ], + ), ), ), ), + flex: 1, ), - 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, + Container( + height: 54.h, + decoration: BoxDecoration( + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Color(0x08213303).withAlpha(12), + offset: Offset(0, -1), + blurRadius: 8, + spreadRadius: 0, ), - ), - Text( - (minOrderInfo != null - ? "¥${minOrderInfo.finalPayPrice}" - : "¥${settleOrderInfo == null ? "0" : settleOrderInfo.price}"), - style: TextStyle( - fontSize: 20.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF32A060), + ], + ), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Spacer(), + Text( + S.of(context).heji, + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Colors.black, + ), ), - ), - 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, + Text( + (minOrderInfo != null + ? "¥${minOrderInfo.finalPayPrice}" + : "¥${settleOrderInfo == null ? "0" : settleOrderInfo.price}"), + style: TextStyle( + fontSize: 20.sp, + fontWeight: MyFontWeight.semi_bold, + color: Color(0xFF32A060), + ), ), - callback: () { - if (orderButton) { - SmartDialog.showToast("订单正在提交中...", - alignment: Alignment.center); - return; - } else - orderButton = true; - pageType != null - ? bargainOrderId != null - ? activityPay() - : joinA == JoinActivity.GoJoin - ? queryJoinAct() - : queryLaunchAct() - : queryPlaceOrderFirst(); - }, - ), - SizedBox( - width: 17, - ) - ], + 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: () { + if (orderButton) { + SmartDialog.showToast("订单正在提交中...", + alignment: Alignment.center); + return; + } else + orderButton = true; + pageType != null + ? bargainOrderId != null + ? activityPay() + : joinA == JoinActivity.GoJoin + ? queryJoinAct() + : queryLaunchAct() + : queryPlaceOrderFirst(); + }, + ), + SizedBox( + width: 17, + ) + ], + ), ), - ), - ], + ], + ), ), - ), - ) - ], + ) + ], + ), ); } diff --git a/lib/store/shopping/shopping_home/bargain_details.dart b/lib/store/shopping/shopping_home/bargain_details.dart index c19695bf..a40dd794 100644 --- a/lib/store/shopping/shopping_home/bargain_details.dart +++ b/lib/store/shopping/shopping_home/bargain_details.dart @@ -128,7 +128,7 @@ class _BargainDetails extends State { ///直接购买去下单结算页面 toOrder() async { - await Navigator.of(context).popAndPushNamed( + await Navigator.of(context).pushReplacementNamed( '/router/settlement', arguments: { "storeInfo": storeInfo, diff --git a/lib/store/store_view/product_sku.dart b/lib/store/store_view/product_sku.dart index e57a5f7e..e90372e7 100644 --- a/lib/store/store_view/product_sku.dart +++ b/lib/store/store_view/product_sku.dart @@ -306,7 +306,7 @@ class _ProductSku extends State { children: [ Expanded(child: GestureDetector( onTap: (){ - Navigator.of(context).popAndPushNamed('/router/group_details'); + Navigator.of(context).pushReplacementNamed('/router/group_details'); }, child: Container( alignment: Alignment.center, diff --git a/pubspec.yaml b/pubspec.yaml index d0bd41f6..a5d598fd 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: 一心回乡. publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 2.0.29+17 +version: 2.0.30+18 environment: sdk: ">=2.7.0 <3.0.0"