huxiaoqiang 4 gadi atpakaļ
vecāks
revīzija
631cd72df3

+ 2 - 2
lib/https/MyDio.dart

@@ -42,8 +42,8 @@ class MyDio {
 
     options = BaseOptions(
       baseUrl: MyCookie().getServer(),
-      connectTimeout: 10000,
-      receiveTimeout: 3000,
+      connectTimeout: 15000,
+      receiveTimeout: 5000,
     );
     if (MyCookie().loginInformation != null) {
       options.headers = {

+ 1 - 6
lib/main.dart

@@ -1,6 +1,5 @@
 import 'dart:async';
 import 'dart:convert';
-import 'dart:io';
 
 import 'package:amap_flutter_location/amap_flutter_location.dart';
 import 'package:bbyyy/beans/access_bean_entity.dart';
@@ -8,7 +7,6 @@ import 'package:bbyyy/beans/template_bean_entity.dart';
 import 'package:bbyyy/beans/w_x_bean_entity.dart';
 import 'package:bbyyy/https/url.dart';
 import 'package:bbyyy/my_tools/event_bus.dart';
-import 'package:bbyyy/my_tools/loacion_util.dart';
 import 'package:bbyyy/my_tools/my_cookie.dart';
 import 'package:bbyyy/my_tools/my_tools.dart';
 import 'package:bbyyy/my_tools/order_processing/order_processing.dart';
@@ -31,7 +29,6 @@ import 'package:provider/provider.dart';
 import 'package:pull_to_refresh/pull_to_refresh.dart';
 import 'package:rxdart/rxdart.dart';
 
-import 'beans/app_store_review_bean_entity.dart';
 import 'beans/coupon_bean_entity.dart';
 import 'beans/my_shop_bean_entity.dart';
 import 'beans/new_order_bean_entity.dart';
@@ -40,7 +37,6 @@ import 'beans/system_information_bean_entity.dart';
 import 'https/MyDio.dart';
 import 'https/my_request.dart';
 import 'my_tools/const.dart';
-import 'my_tools/daily_red_packet/daily_red_packet.dart';
 import 'my_tools/dims.dart';
 import 'my_tools/easy_loading/easy_loading.dart';
 import 'my_tools/easy_loading/loading.dart';
@@ -49,7 +45,6 @@ import 'my_tools/my_colors.dart';
 import 'my_tools/my_views.dart';
 import 'my_tools/order.dart';
 import 'my_tools/pop_up_queue.dart';
-import 'my_tools/s.dart';
 
 final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin =
     FlutterLocalNotificationsPlugin();
@@ -323,7 +318,7 @@ class MyApp extends StatelessWidget with WidgetsBindingObserver {
                   .contains(element.seller.name));
           if (order.length > 0) {
             hasMatch = true;
-            orderHash = computeOrderHash(res);
+            orderHash = computeOrderHash(res, 0);
             getShop(order);
           }
 

+ 13 - 2
lib/my_tools/order.dart

@@ -380,12 +380,23 @@ List<OrderInfo2> parse2(Map<String, String> info) {
 // //   return hex.encode(digest.bytes);
 // // }
 
-String computeOrderHash(Map<String, String> order) {
+String computeOrderHash(Map<String, String> order,int shopUID) {
   order.removeWhere((key, value) => key.contains('id'));
   order.removeWhere((key, value) => key.contains('dump'));
   order.removeWhere((key, value) => key.contains('person'));
   var sortedKeys = order.keys.toList()..sort();
-  List values = new List();
+  List values = [];
+  values.add(shopUID);
+  try{
+      String time = '';
+      order['orderTime'].split('').forEach((element) {
+        if(['0','1','2','3','4','5','6','7','8','9'].contains(element)){
+          time+=element;
+        }
+      });
+      int t = int.parse(time);
+      values.add(t);
+  }catch(e){}
   sortedKeys.forEach((key) {
     try {
       values.add(int.parse(order[key]));

+ 2 - 2
lib/my_tools/order_processing/order_processing.dart

@@ -242,7 +242,7 @@ class OrderProcessing {
               .name
               .contains(element.seller.name));
       if (order.length > 0) {
-        orderHash = computeOrderHash(res);
+        orderHash = computeOrderHash(res,shop.shopUid);
         this.order = order;
         idTemplate[element.shopUid] = order;
         return true;
@@ -862,7 +862,7 @@ class OrderProcessing {
               .name
               .contains(element.seller.name));
       if (order.length > 0) {
-        orderHash = computeOrderHash(res);
+        orderHash = computeOrderHash(res,shop.shopUid);
         this.order = order;
         idTemplate[element.shopUid] = order;
         return true;

+ 2 - 11
lib/paegs/gang_page/gang_in_page/gang_information_page/member_list_page/member_order_flow.dart

@@ -52,7 +52,7 @@ class _MemberOrderFlowPageState extends State<MemberOrderFlowPage> {
                 decoration: BoxDecoration(
                   gradient: LinearGradient(colors: MyColors.lg),
                 ),
-                height: 250,
+                height: 200,
               ),
               Column(
                 children: [
@@ -208,16 +208,7 @@ class _MemberOrderFlowPageState extends State<MemberOrderFlowPage> {
                     alignment: Alignment.center,
                   ),
                   Container(
-                    margin: EdgeInsets.only(top: 10),
-                    child: Center(
-                      child: Text(
-                        '¥$totalAmount',
-                        style: TextStyle(color: Colors.white, fontSize: 25),
-                      ),
-                    ),
-                  ),
-                  Container(
-                    margin: EdgeInsets.only(top: 10),
+                    margin: EdgeInsets.only(top: 25),
                     child: Center(
                       child: Text(
                         '共$total笔',

+ 42 - 24
lib/paegs/login_page/login_page.dart

@@ -30,6 +30,7 @@ class _LoginPageState extends State<LoginPage> {
   TextEditingController _pw = TextEditingController(text: '');
   int focus = -1;
   bool showBrowse = false;
+  bool obscureText = true;
 
   @override
   void initState() {
@@ -44,6 +45,7 @@ class _LoginPageState extends State<LoginPage> {
       checkAuditStatus();
     });
   }
+
   @override
   void dispose() {
     // TODO: implement dispose
@@ -207,10 +209,26 @@ class _LoginPageState extends State<LoginPage> {
                                         height: 1.3,
                                         letterSpacing: 0.2),
                                     keyboardType: TextInputType.visiblePassword,
-                                    obscureText: true,
+                                    obscureText: obscureText,
                                     onChanged: (t) {},
                                   ),
-                                )
+                                ),
+                                GestureDetector(
+                                  onTap: () {
+                                    setState(() {
+                                      obscureText = !obscureText;
+                                    });
+                                  },
+                                  behavior: HitTestBehavior.translucent,
+                                  child: Container(
+                                    height: 35,
+                                    width: 35,
+                                    padding: EdgeInsets.all(6.5),
+                                    child: SvgPicture.asset(obscureText
+                                        ? 'images/svg/不显示.svg'
+                                        : 'images/svg/显示.svg'),
+                                  ),
+                                ),
                               ],
                             ),
                             Container(
@@ -391,6 +409,7 @@ class _LoginPageState extends State<LoginPage> {
   }
 
   void login() {
+    EasyLoading.show();
     print(MyCookie().switching);
     loginAccount({
       'user': _phoneNum.text,
@@ -400,6 +419,7 @@ class _LoginPageState extends State<LoginPage> {
       'seq': int.parse(MyCookie().prefs.getString('serverID'))
     }, (r, hE) {
       if (!hE) {
+        EasyLoading.dismiss();
         LoginInformationBeanEntity entity = LoginInformationBeanEntity()
             .fromJson(json.decode(r.data.toString()));
         MyCookie().saveLoginInformationBeanEntity(entity);
@@ -450,13 +470,13 @@ class _LoginPageState extends State<LoginPage> {
               padding: EdgeInsets.symmetric(horizontal: 8, vertical: 12),
               child: Column(
                 children: [
-                  Expanded(
-                    child: Center(
-                      child: Container(
-                        child: MyViews()
-                            .myText('服务器出现异常,请稍后再试。', MyColors.c333333, 14),
-                        margin: EdgeInsets.symmetric(horizontal: 20),
-                      ),
+                  Center(
+                    child: Container(
+                      height: 100,
+                      child: MyViews()
+                          .myText('服务器出现异常,请稍后再试。', MyColors.c333333, 14),
+                      margin: EdgeInsets.symmetric(horizontal: 20),
+                      alignment: Alignment.center,
                     ),
                   ),
                   Container(
@@ -466,21 +486,19 @@ class _LoginPageState extends State<LoginPage> {
                   ),
                   Container(
                     margin: EdgeInsets.symmetric(horizontal: 10),
-                    child: Expanded(
-                      child: GestureDetector(
-                        behavior: HitTestBehavior.translucent,
-                        onTap: () async {
-                          await SystemChannels.platform
-                              .invokeMethod('SystemNavigator.pop');
-                        },
-                        child: Container(
-                          decoration: BoxDecoration(
-                              borderRadius: BorderRadius.circular(20),
-                              color: MyColors.cFF4233),
-                          height: 40,
-                          child: MyViews().myText('退 出', Colors.white, 14),
-                          alignment: Alignment.center,
-                        ),
+                    child: GestureDetector(
+                      behavior: HitTestBehavior.translucent,
+                      onTap: () async {
+                        await SystemChannels.platform
+                            .invokeMethod('SystemNavigator.pop');
+                      },
+                      child: Container(
+                        decoration: BoxDecoration(
+                            borderRadius: BorderRadius.circular(20),
+                            color: MyColors.cFF4233),
+                        height: 40,
+                        child: MyViews().myText('退 出', Colors.white, 14),
+                        alignment: Alignment.center,
                       ),
                     ),
                   )

+ 212 - 192
lib/paegs/mine_page/bind_alipay_page/bind_alipay_page.dart

@@ -37,13 +37,15 @@ class _BindAlipayPageState extends State<BindAlipayPage> {
       checkPaymentMethod((response, hasError) {
         if (!hasError) {
           PayWayBeanEntity entity =
-          PayWayBeanEntity().fromJson(json.decode(response.toString()));
+              PayWayBeanEntity().fromJson(json.decode(response.toString()));
           payWays = entity.data;
-          showAlipay = payWays[payWays.indexWhere((element) => element.way==1)].withdraw;
-          showWeChat = payWays[payWays.indexWhere((element) => element.way==2)].withdraw;
-          setState(() {
-
-          });
+          showAlipay =
+              payWays[payWays.indexWhere((element) => element.way == 1)]
+                  .withdraw;
+          showWeChat =
+              payWays[payWays.indexWhere((element) => element.way == 2)]
+                  .withdraw;
+          setState(() {});
         }
       }, (e) {});
     });
@@ -98,209 +100,227 @@ class _BindAlipayPageState extends State<BindAlipayPage> {
                 ),
               ),
             ),
-            if(showAlipay)Container(
-              height: 220,
-              margin: EdgeInsets.fromLTRB(15, 60, 15, 0),
-              width: double.infinity,
-              child: ClipShadowPath(
-                clipper: TicketClipPath2(),
-                shadow: Shadow(blurRadius: 5, color: MyColors.c21333333),
-                child: Scaffold(
-                  body: Stack(
-                    alignment: Alignment.bottomCenter,
-                    children: [
-                      Column(
-                        children: [
-                          Container(
-                            margin: EdgeInsets.only(top: 30),
-                            child: SvgPicture.asset(
-                              'images/svg/支付宝.svg',
-                              height: 40,
-                              width: 40,
+            if (showAlipay)
+              Container(
+                height: 220,
+                margin: EdgeInsets.fromLTRB(15, 60, 15, 0),
+                width: double.infinity,
+                child: ClipShadowPath(
+                  clipper: TicketClipPath2(),
+                  shadow: Shadow(blurRadius: 5, color: MyColors.c21333333),
+                  child: Scaffold(
+                    body: Stack(
+                      alignment: Alignment.bottomCenter,
+                      children: [
+                        Column(
+                          children: [
+                            Container(
+                              margin: EdgeInsets.only(top: 30),
+                              child: SvgPicture.asset(
+                                'images/svg/支付宝.svg',
+                                height: 40,
+                                width: 40,
+                              ),
                             ),
+                            Container(
+                              child: MyViews().myText(
+                                  MyCookie()
+                                              .userBean
+                                              .aliPayAccount
+                                              .isNotEmpty &&
+                                          MyCookie().userBean.aliPayName.isEmpty
+                                      ? '未绑定账号持有人真实姓名'
+                                      : '当前绑定支付宝账号',
+                                  MyCookie()
+                                              .userBean
+                                              .aliPayAccount
+                                              .isNotEmpty &&
+                                          MyCookie().userBean.aliPayName.isEmpty
+                                      ? MyColors.cFF4233
+                                      : MyColors.c333333,
+                                  13),
+                              margin: EdgeInsets.only(top: 11, bottom: 11),
+                            ),
+                            Container(
+                              decoration: BoxDecoration(
+                                  borderRadius: BorderRadius.circular(22.5),
+                                  color: MyColors.cFF4233),
+                              height: 45,
+                              margin: EdgeInsets.symmetric(horizontal: 22),
+                              child: MyViews().myText(
+                                  MyCookie().userBean.aliPayAccount.isEmpty
+                                      ? '暂未绑定'
+                                      : MyCookie().userBean.aliPayAccount,
+                                  Colors.white,
+                                  20),
+                              alignment: Alignment.center,
+                            )
+                          ],
+                        ),
+                        Container(
+                          child: CustomPaint(
+                            painter: DashedPainter(),
+                            size: Size(double.infinity, 1),
                           ),
-                          Container(
-                            child: MyViews()
-                                .myText(MyCookie().userBean.aliPayAccount.isNotEmpty&&MyCookie().userBean.aliPayName.isEmpty?'未绑定账号持有人真实姓名':'当前绑定支付宝账号', MyCookie().userBean.aliPayAccount.isNotEmpty&&MyCookie().userBean.aliPayName.isEmpty?MyColors.cFF4233:MyColors.c333333, 13),
-                            margin: EdgeInsets.only(top: 11, bottom: 11),
-                          ),
-                          Container(
-                            decoration: BoxDecoration(
-                                borderRadius: BorderRadius.circular(22.5),
-                                color: MyColors.cFF4233),
-                            height: 45,
-                            margin: EdgeInsets.symmetric(horizontal: 22),
-                            child: MyViews().myText(
-                                MyCookie().userBean.aliPayAccount.isEmpty
-                                    ? '暂未绑定'
-                                    : MyCookie().userBean.aliPayAccount,
-                                Colors.white,
-                                20),
-                            alignment: Alignment.center,
-                          )
-                        ],
-                      ),
-                      Container(
-                        child: CustomPaint(
-                          painter: DashedPainter(),
-                          size: Size(double.infinity, 1),
+                          margin:
+                              EdgeInsets.only(bottom: 38, right: 10, left: 10),
                         ),
-                        margin:
-                            EdgeInsets.only(bottom: 38, right: 10, left: 10),
-                      ),
-                      Positioned(
-                        bottom: 0,
-                        child: GestureDetector(
-                          onTap: () {
-                            MyTools().toPage(context, SetAlipayPage(), (then) {
-                              setState(() {});
-                            });
-                          },
-                          behavior: HitTestBehavior.translucent,
-                          child: Container(
-                            height: 39,
-                            child: Row(
-                              children: [
-                                MyViews().myText(
-                                    MyCookie().userBean.aliPayAccount.isEmpty
-                                        ? '去绑定'
-                                        : '修改绑定账号',
-                                    MyColors.c999999,
-                                    11),
-                                Container(
-                                  margin: EdgeInsets.only(left: 5),
-                                  child: SvgPicture.asset(
-                                    'images/svg/箭头.svg',
-                                    color: MyColors.c999999,
-                                    height: 8,
-                                    width: 8,
-                                  ),
-                                )
-                              ],
-                              mainAxisAlignment: MainAxisAlignment.center,
-                              crossAxisAlignment: CrossAxisAlignment.center,
+                        Positioned(
+                          bottom: 0,
+                          child: GestureDetector(
+                            onTap: () {
+                              MyTools().toPage(context, SetAlipayPage(),
+                                  (then) {
+                                setState(() {});
+                              });
+                            },
+                            behavior: HitTestBehavior.translucent,
+                            child: Container(
+                              height: 39,
+                              child: Row(
+                                children: [
+                                  MyViews().myText(
+                                      MyCookie().userBean.aliPayAccount.isEmpty
+                                          ? '去绑定'
+                                          : '修改绑定账号',
+                                      MyColors.c999999,
+                                      11),
+                                  Container(
+                                    margin: EdgeInsets.only(left: 5),
+                                    child: SvgPicture.asset(
+                                      'images/svg/箭头.svg',
+                                      color: MyColors.c999999,
+                                      height: 8,
+                                      width: 8,
+                                    ),
+                                  )
+                                ],
+                                mainAxisAlignment: MainAxisAlignment.center,
+                                crossAxisAlignment: CrossAxisAlignment.center,
+                              ),
+                              alignment: Alignment.center,
                             ),
-                            alignment: Alignment.center,
                           ),
                         ),
-                      ),
-                    ],
+                      ],
+                    ),
                   ),
                 ),
               ),
-            ),
-            if(showWeChat) Container(
-              height: 220,
-              margin: EdgeInsets.fromLTRB(15, 20, 15, 50),
-              width: double.infinity,
-              child: ClipShadowPath(
-                clipper: TicketClipPath2(),
-                shadow: Shadow(blurRadius: 5, color: MyColors.c21333333),
-                child: Scaffold(
-                  body: Stack(
-                    alignment: Alignment.bottomCenter,
-                    children: [
-                      Column(
-                        children: [
-                          Container(
-                            margin: EdgeInsets.only(top: 30),
-                            child: SvgPicture.asset(
-                              'images/svg/微信.svg',
-                              height: 40,
-                              width: 40,
+            if (showWeChat)
+              Container(
+                height: 220,
+                margin: EdgeInsets.fromLTRB(15, 20, 15, 50),
+                width: double.infinity,
+                child: ClipShadowPath(
+                  clipper: TicketClipPath2(),
+                  shadow: Shadow(blurRadius: 5, color: MyColors.c21333333),
+                  child: Scaffold(
+                    body: Stack(
+                      alignment: Alignment.bottomCenter,
+                      children: [
+                        Column(
+                          children: [
+                            Container(
+                              margin: EdgeInsets.only(top: 30),
+                              child: SvgPicture.asset(
+                                'images/svg/微信.svg',
+                                height: 40,
+                                width: 40,
+                              ),
                             ),
-                          ),
-                          Container(
-                            child: MyViews()
-                                .myText('当前绑定微信账号', MyColors.c333333, 13),
-                            margin: EdgeInsets.only(top: 11, bottom: 11),
-                          ),
-                          Container(
-                            decoration: BoxDecoration(
-                                borderRadius: BorderRadius.circular(22.5),
-                                color: MyColors.cFF4233),
-                            height: 45,
-                            margin: EdgeInsets.symmetric(horizontal: 22),
-                            child: MyCookie().userBean.wxOpenid.isEmpty
-                                ? MyViews().myText('暂未绑定', Colors.white, 20)
-                                : Row(
-                                    children: [
-                                      Container(
-                                        margin: EdgeInsets.only(right: 10),
-                                        child: ClipRRect(
-                                          borderRadius:
-                                              BorderRadius.circular(14),
-                                          child: MyViews().netImg(
-                                              MyCookie().userBean.wxPicture,
-                                              28,
-                                              28),
+                            Container(
+                              child: MyViews()
+                                  .myText('当前绑定微信账号', MyColors.c333333, 13),
+                              margin: EdgeInsets.only(top: 11, bottom: 11),
+                            ),
+                            Container(
+                              decoration: BoxDecoration(
+                                  borderRadius: BorderRadius.circular(22.5),
+                                  color: MyColors.cFF4233),
+                              height: 45,
+                              margin: EdgeInsets.symmetric(horizontal: 22),
+                              child: MyCookie().userBean.wxOpenid.isEmpty
+                                  ? MyViews().myText('暂未绑定', Colors.white, 20)
+                                  : Row(
+                                      children: [
+                                        Container(
+                                          margin: EdgeInsets.only(right: 10),
+                                          child: ClipRRect(
+                                            borderRadius:
+                                                BorderRadius.circular(14),
+                                            child: MyViews().netImg(
+                                                MyCookie().userBean.wxPicture,
+                                                28,
+                                                28),
+                                          ),
                                         ),
-                                      ),
-                                      MyViews().myText(
-                                          MyCookie().userBean.wxName,
-                                          Colors.white,
-                                          20)
-                                    ],
-                                    mainAxisAlignment: MainAxisAlignment.center,
-                                  ),
-                            alignment: Alignment.center,
-                          )
-                        ],
-                      ),
-                      Container(
-                        child: CustomPaint(
-                          painter: DashedPainter(),
-                          size: Size(double.infinity, 1),
+                                        MyViews().myText(
+                                            MyCookie().userBean.wxName,
+                                            Colors.white,
+                                            20)
+                                      ],
+                                      mainAxisAlignment:
+                                          MainAxisAlignment.center,
+                                    ),
+                              alignment: Alignment.center,
+                            )
+                          ],
                         ),
-                        margin:
-                            EdgeInsets.only(bottom: 38, right: 10, left: 10),
-                      ),
-                      Positioned(
-                        bottom: 0,
-                        child: GestureDetector(
-                          onTap: () {
-                            EventBus().on('bindToWeChat', (arg) {
-                              showToast('绑定成功');
-                              setState(() {});
-                              EventBus().off('bindToWeChat');
-                            });
-                            sendWeChatAuth(
-                                scope: "snsapi_userinfo",
-                                state: "wechat_sdk_demo_test");
-                          },
-                          behavior: HitTestBehavior.translucent,
-                          child: Container(
-                            height: 39,
-                            child: Row(
-                              children: [
-                                MyViews().myText(
-                                    MyCookie().userBean.wxOpenid.isEmpty
-                                        ? '去绑定'
-                                        : '修改绑定账号',
-                                    MyColors.c999999,
-                                    11),
-                                Container(
-                                  margin: EdgeInsets.only(left: 5),
-                                  child: SvgPicture.asset(
-                                    'images/svg/箭头.svg',
-                                    color: MyColors.c999999,
-                                    height: 8,
-                                    width: 8,
-                                  ),
-                                )
-                              ],
-                              mainAxisAlignment: MainAxisAlignment.center,
-                              crossAxisAlignment: CrossAxisAlignment.center,
+                        Container(
+                          child: CustomPaint(
+                            painter: DashedPainter(),
+                            size: Size(double.infinity, 1),
+                          ),
+                          margin:
+                              EdgeInsets.only(bottom: 38, right: 10, left: 10),
+                        ),
+                        Positioned(
+                          bottom: 0,
+                          child: GestureDetector(
+                            onTap: () {
+                              EventBus().on('bindToWeChat', (arg) {
+                                showToast('绑定成功');
+                                setState(() {});
+                                EventBus().off('bindToWeChat');
+                              });
+                              sendWeChatAuth(
+                                  scope: "snsapi_userinfo",
+                                  state: "wechat_sdk_demo_test");
+                            },
+                            behavior: HitTestBehavior.translucent,
+                            child: Container(
+                              height: 39,
+                              child: Row(
+                                children: [
+                                  MyViews().myText(
+                                      MyCookie().userBean.wxOpenid.isEmpty
+                                          ? '去绑定'
+                                          : '修改绑定账号',
+                                      MyColors.c999999,
+                                      11),
+                                  Container(
+                                    margin: EdgeInsets.only(left: 5),
+                                    child: SvgPicture.asset(
+                                      'images/svg/箭头.svg',
+                                      color: MyColors.c999999,
+                                      height: 8,
+                                      width: 8,
+                                    ),
+                                  )
+                                ],
+                                mainAxisAlignment: MainAxisAlignment.center,
+                                crossAxisAlignment: CrossAxisAlignment.center,
+                              ),
+                              alignment: Alignment.center,
                             ),
-                            alignment: Alignment.center,
                           ),
                         ),
-                      ),
-                    ],
+                      ],
+                    ),
                   ),
                 ),
-              ),
-            )
+              )
           ],
         ),
       ),

+ 39 - 3
lib/paegs/mine_page/order_page/order_page.dart

@@ -160,6 +160,39 @@ class _OrderPageState extends State<OrderPage> {
                       mainAxisAlignment: MainAxisAlignment.end,
                     ),
                   ),
+                ),
+                GestureDetector(
+                  onTap: () {
+                    setState(() {
+                      selectedIndex = 3;
+                      page = 1;
+                      controller.requestRefresh();
+                    });
+                  },
+                  behavior: HitTestBehavior.translucent,
+                  child: Padding(
+                    padding: EdgeInsets.only(left: 10, right: 10),
+                    child: Column(
+                      children: [
+                        Text(
+                          '已付',
+                          style: TextStyle(
+                              color: selectedIndex == 3
+                                  ? MyColors.cFF4233
+                                  : MyColors.c666666,
+                              fontSize: 15),
+                        ),
+                        Container(
+                          height: 10,
+                          child: Visibility(
+                            child: SvgPicture.asset('images/svg/tab.svg'),
+                            visible: selectedIndex == 3,
+                          ),
+                        )
+                      ],
+                      mainAxisAlignment: MainAxisAlignment.end,
+                    ),
+                  ),
                 )
               ],
               mainAxisAlignment: MainAxisAlignment.spaceAround,
@@ -183,8 +216,8 @@ class _OrderPageState extends State<OrderPage> {
                           enabled: selectedIndex == 0 ||
                               (orders[index].type == orderTypeOfflineTransfer &&
                                   orders[index].buyerUid ==
-                                      MyCookie().getUID()) ||
-                              orders[index].buyerUid == MyCookie().getUID(),
+                                      MyCookie().getUID()&&selectedIndex!=3) ||
+                              (orders[index].buyerUid == MyCookie().getUID()&&selectedIndex!=3),
                           actionExtentRatio: 0.25,
                           secondaryActions: <Widget>[
                             SlideAction(
@@ -243,11 +276,14 @@ class _OrderPageState extends State<OrderPage> {
     } else if (selectedIndex == 1) {
       conditions.add("state == $orderStatePaid");
       conditions.add('seller_uid == ${MyCookie().getUID()}');
-    } else {
+    } else if(selectedIndex==2){
       conditions.add("state == $orderStateUnpaid");
       conditions.add('buyer_uid==0');
       conditions.add('buyer_name LIKE ${MyCookie().getName()}');
       conditions.add('shop_uid IN $myShopUIDs');
+    }else if(selectedIndex == 3){
+      conditions.add("state == $orderStatePaid");
+      conditions.add('payer_uid==${MyCookie().getUID()}');
     }
     var filters;
     if (selectedIndex == 2) {

+ 178 - 160
lib/paegs/mine_page/wallet_page/withdraw_page/withdraw_page.dart

@@ -52,16 +52,22 @@ class _WithdrawPageState extends State<WithdrawPage> {
           PayWayBeanEntity entity =
               PayWayBeanEntity().fromJson(json.decode(response.toString()));
           payWays = entity.data;
-          showWeChat = payWays[payWays.indexWhere((element) => element.way==2)].withdraw;
-          showAlipay = payWays[payWays.indexWhere((element) => element.way==1)].withdraw;
-          if (MyCookie().userBean.wxOpenid.isNotEmpty&&payWays[payWays.indexWhere((element) => element.way==2)].withdraw) {
+          showWeChat =
+              payWays[payWays.indexWhere((element) => element.way == 2)]
+                  .withdraw;
+          showAlipay =
+              payWays[payWays.indexWhere((element) => element.way == 1)]
+                  .withdraw;
+          if (MyCookie().userBean.wxOpenid.isNotEmpty &&
+              payWays[payWays.indexWhere((element) => element.way == 2)]
+                  .withdraw) {
             withdrawalPath = 2;
-          } else if (MyCookie().userBean.aliPayAccount.isNotEmpty&&payWays[payWays.indexWhere((element) => element.way==1)].withdraw) {
+          } else if (MyCookie().userBean.aliPayAccount.isNotEmpty &&
+              payWays[payWays.indexWhere((element) => element.way == 1)]
+                  .withdraw) {
             withdrawalPath = 1;
           }
-          setState(() {
-
-          });
+          setState(() {});
         }
       }, (e) {});
     });
@@ -99,111 +105,117 @@ class _WithdrawPageState extends State<WithdrawPage> {
               child: SingleChildScrollView(
                 child: Column(
                   children: [
-                    if(showAlipay)GestureDetector(
-                      onTap: () {
-                        if(!payWays[payWays.indexWhere((element) => element.way==1)].withdraw){
-                          showToast('支付宝提现暂时维护中');
-                          return;
-                        }
-                        if (MyCookie().userBean.aliPayAccount.isEmpty) {
-                          showToast('未绑定支付宝');
-                        } else {
-                          setState(() {
-                            withdrawalPath = 1;
-                          });
-                        }
-                      },
-                      behavior: HitTestBehavior.translucent,
-                      child: Container(
-                        margin: EdgeInsets.fromLTRB(17, 24, 17, 0),
-                        child: Row(
-                          children: [
-                            Container(
-                              decoration: BoxDecoration(
-                                  color: withdrawalPath == 1
-                                      ? MyColors.cFF4233
-                                      : MyColors.cD0D0D0,
-                                  borderRadius: BorderRadius.circular(9)),
-                              height: 18,
-                              width: 18,
-                              child: Icon(
-                                Icons.check,
-                                color: Colors.white,
-                                size: 14,
+                    if (showAlipay)
+                      GestureDetector(
+                        onTap: () {
+                          if (!payWays[payWays
+                                  .indexWhere((element) => element.way == 1)]
+                              .withdraw) {
+                            showToast('支付宝提现暂时维护中');
+                            return;
+                          }
+                          if (MyCookie().userBean.aliPayAccount.isEmpty) {
+                            showToast('未绑定支付宝');
+                          } else {
+                            setState(() {
+                              withdrawalPath = 1;
+                            });
+                          }
+                        },
+                        behavior: HitTestBehavior.translucent,
+                        child: Container(
+                          margin: EdgeInsets.fromLTRB(17, 24, 17, 0),
+                          child: Row(
+                            children: [
+                              Container(
+                                decoration: BoxDecoration(
+                                    color: withdrawalPath == 1
+                                        ? MyColors.cFF4233
+                                        : MyColors.cD0D0D0,
+                                    borderRadius: BorderRadius.circular(9)),
+                                height: 18,
+                                width: 18,
+                                child: Icon(
+                                  Icons.check,
+                                  color: Colors.white,
+                                  size: 14,
+                                ),
+                                alignment: Alignment.center,
+                                margin: EdgeInsets.only(right: 10),
                               ),
-                              alignment: Alignment.center,
-                              margin: EdgeInsets.only(right: 10),
-                            ),
-                            MyViews().myText(
-                                '提现到支付宝:${MyCookie().userBean.aliPayAccount.isEmpty ? '未绑定支付宝' : MyCookie().userBean.aliPayAccount}',
-                                MyColors.c666666,
-                                15),
-                          ],
+                              MyViews().myText(
+                                  '提现到支付宝:${MyCookie().userBean.aliPayAccount.isEmpty ? '未绑定支付宝' : MyCookie().userBean.aliPayAccount}',
+                                  MyColors.c666666,
+                                  15),
+                            ],
+                          ),
                         ),
                       ),
-                    ),
-                    if(showWeChat)GestureDetector(
-                      onTap: () {
-                        if(!payWays[payWays.indexWhere((element) => element.way==2)].withdraw){
-                          showToast('微信提现暂时维护中');
-                          return;
-                        }
-                        if (MyCookie().userBean.wxOpenid.isEmpty) {
-                          showToast('未绑定微信');
-                        } else {
-                          setState(() {
-                            withdrawalPath = 2;
-                          });
-                        }
-                      },
-                      behavior: HitTestBehavior.translucent,
-                      child: Container(
-                        margin: EdgeInsets.fromLTRB(17, 24, 17, 0),
-                        child: Row(
-                          children: [
-                            Container(
-                              decoration: BoxDecoration(
-                                  color: withdrawalPath == 2
-                                      ? MyColors.cFF4233
-                                      : MyColors.cD0D0D0,
-                                  borderRadius: BorderRadius.circular(9)),
-                              height: 18,
-                              width: 18,
-                              child: Icon(
-                                Icons.check,
-                                color: Colors.white,
-                                size: 14,
+                    if (showWeChat)
+                      GestureDetector(
+                        onTap: () {
+                          if (!payWays[payWays
+                                  .indexWhere((element) => element.way == 2)]
+                              .withdraw) {
+                            showToast('微信提现暂时维护中');
+                            return;
+                          }
+                          if (MyCookie().userBean.wxOpenid.isEmpty) {
+                            showToast('未绑定微信');
+                          } else {
+                            setState(() {
+                              withdrawalPath = 2;
+                            });
+                          }
+                        },
+                        behavior: HitTestBehavior.translucent,
+                        child: Container(
+                          margin: EdgeInsets.fromLTRB(17, 24, 17, 0),
+                          child: Row(
+                            children: [
+                              Container(
+                                decoration: BoxDecoration(
+                                    color: withdrawalPath == 2
+                                        ? MyColors.cFF4233
+                                        : MyColors.cD0D0D0,
+                                    borderRadius: BorderRadius.circular(9)),
+                                height: 18,
+                                width: 18,
+                                child: Icon(
+                                  Icons.check,
+                                  color: Colors.white,
+                                  size: 14,
+                                ),
+                                alignment: Alignment.center,
+                                margin: EdgeInsets.only(right: 10),
                               ),
-                              alignment: Alignment.center,
-                              margin: EdgeInsets.only(right: 10),
-                            ),
-                            MyViews().myText('提现到微信:', MyColors.c666666, 15),
-                            MyCookie().userBean.wxOpenid.isEmpty
-                                ? MyViews()
-                                    .myText('未绑定微信', MyColors.c666666, 15)
-                                : Row(
-                                    children: [
-                                      Container(
-                                        margin: EdgeInsets.only(right: 10),
-                                        child: ClipRRect(
-                                          borderRadius:
-                                              BorderRadius.circular(12),
-                                          child: MyViews().netImg(
-                                              MyCookie().userBean.wxPicture,
-                                              24,
-                                              24),
+                              MyViews().myText('提现到微信:', MyColors.c666666, 15),
+                              MyCookie().userBean.wxOpenid.isEmpty
+                                  ? MyViews()
+                                      .myText('未绑定微信', MyColors.c666666, 15)
+                                  : Row(
+                                      children: [
+                                        Container(
+                                          margin: EdgeInsets.only(right: 10),
+                                          child: ClipRRect(
+                                            borderRadius:
+                                                BorderRadius.circular(12),
+                                            child: MyViews().netImg(
+                                                MyCookie().userBean.wxPicture,
+                                                24,
+                                                24),
+                                          ),
                                         ),
-                                      ),
-                                      MyViews().myText(
-                                          MyCookie().userBean.wxName,
-                                          MyColors.c666666,
-                                          15)
-                                    ],
-                                  )
-                          ],
+                                        MyViews().myText(
+                                            MyCookie().userBean.wxName,
+                                            MyColors.c666666,
+                                            15)
+                                      ],
+                                    )
+                            ],
+                          ),
                         ),
                       ),
-                    ),
                     Container(
                       decoration: BoxDecoration(
                         color: Colors.white,
@@ -313,42 +325,46 @@ class _WithdrawPageState extends State<WithdrawPage> {
                                         }),
                                 ]),
                           ),
-                          if(showHandlingFee)
-                          RichText(
-                            text: TextSpan(
-                                text: '手续费',
-                                style: TextStyle(
-                                    color: MyColors.c999999, fontSize: 15),
-                                children: [
-                                  TextSpan(
-                                    text: '$handlingFee',
-                                    style: TextStyle(
-                                        color: MyColors.cFF4233, fontSize: 15),
-                                  ),
-                                ]),
-                          ),
-                          if(showHandlingFee)
-                          RichText(
-                            text: TextSpan(
-                                text: '实际到账',
-                                style: TextStyle(
-                                    color: MyColors.c999999, fontSize: 15),
-                                children: [
-                                  TextSpan(
-                                    text: '${double.parse(_controller.text.toString())-handlingFee}',
-                                    style: TextStyle(
-                                        color: MyColors.cFF4233, fontSize: 15),
-                                  ),
-                                ]),
-                          ),
+                          if (showHandlingFee)
+                            RichText(
+                              text: TextSpan(
+                                  text: '手续费',
+                                  style: TextStyle(
+                                      color: MyColors.c999999, fontSize: 15),
+                                  children: [
+                                    TextSpan(
+                                      text: '$handlingFee',
+                                      style: TextStyle(
+                                          color: MyColors.cFF4233,
+                                          fontSize: 15),
+                                    ),
+                                  ]),
+                            ),
+                          if (showHandlingFee)
+                            RichText(
+                              text: TextSpan(
+                                  text: '实际到账',
+                                  style: TextStyle(
+                                      color: MyColors.c999999, fontSize: 15),
+                                  children: [
+                                    TextSpan(
+                                      text:
+                                          '${double.parse(_controller.text.toString()) - handlingFee}',
+                                      style: TextStyle(
+                                          color: MyColors.cFF4233,
+                                          fontSize: 15),
+                                    ),
+                                  ]),
+                            ),
                           GestureDetector(
                             onTap: () {
-                              if(withdrawalPath==-1){
+                              if (withdrawalPath == -1) {
                                 showToast('请选择提现方式');
                                 return;
                               }
-                              if(MyCookie().userBean.forbidWithdraw){
-                                showSimpleDialog('你已经被冻结提现,请联系群主或客服。', context, (){
+                              if (MyCookie().userBean.forbidWithdraw) {
+                                showSimpleDialog('你已经被冻结提现,请联系群主或客服。', context,
+                                    () {
                                   Navigator.pop(context);
                                 });
                                 return;
@@ -490,14 +506,14 @@ class _WithdrawPageState extends State<WithdrawPage> {
       if (amount <= MyCookie().userBean.balance && amount >= minPerHand) {
         var j = {
           'user_uid': MyCookie().getUID(),
-          'way':withdrawalPath,
+          'way': withdrawalPath,
           'amount': amount
         };
-        if(withdrawalPath==2){
+        if (withdrawalPath == 2) {
           j['wx_openid'] = MyCookie().userBean.wxOpenid;
         }
         print(j.toString());
-        MyDio().post('/pay/withdraw',j , (response, hasError) {
+        MyDio().post('/pay/withdraw', j, (response, hasError) {
           if (!hasError) {
             showToast('提现成功');
             withdrawalStatus = 2;
@@ -582,20 +598,25 @@ class _WithdrawPageState extends State<WithdrawPage> {
     }, (error) {});
   }
 
-  showH(){
-    try{
+  showH() {
+    try {
       double amount = double.parse(_controller.text.toString());
-      if(amount>=minPerHand){
-        handlingFee = double.parse((double.parse(_controller.text.toString())*percentFee*100).toStringAsFixed(0))/100+extraFee;
+      if (amount >= minPerHand) {
+        handlingFee = double.parse((double.parse(_controller.text.toString()) *
+                        percentFee *
+                        100)
+                    .toStringAsFixed(0)) /
+                100 +
+            extraFee;
         setState(() {
           showHandlingFee = true;
         });
-      }else{
+      } else {
         setState(() {
           showHandlingFee = false;
         });
       }
-    }catch(e){
+    } catch (e) {
       setState(() {
         showHandlingFee = false;
       });
@@ -603,26 +624,24 @@ class _WithdrawPageState extends State<WithdrawPage> {
   }
 }
 
-
-class MoneyTextInputFormatter extends TextInputFormatter{
-
+class MoneyTextInputFormatter extends TextInputFormatter {
   @override
-  TextEditingValue formatEditUpdate(TextEditingValue oldValue, TextEditingValue newValue) {
+  TextEditingValue formatEditUpdate(
+      TextEditingValue oldValue, TextEditingValue newValue) {
     // TODO: implement formatEditUpdate
 
-    String newvalueText=newValue.text;
+    String newvalueText = newValue.text;
 
-    if(newvalueText=="."){
+    if (newvalueText == ".") {
       //第一个数为.
-      newvalueText="0.";
-
-    } else if(newvalueText.contains(".")){
-      if(newvalueText.lastIndexOf(".")!=newvalueText.indexOf(".")){
+      newvalueText = "0.";
+    } else if (newvalueText.contains(".")) {
+      if (newvalueText.lastIndexOf(".") != newvalueText.indexOf(".")) {
         //输入了2个小数点
-        newvalueText=  newvalueText.substring(0,newvalueText.lastIndexOf('.'));
-      }else if(newvalueText.length-1-newvalueText.indexOf(".")>2){
+        newvalueText = newvalueText.substring(0, newvalueText.lastIndexOf('.'));
+      } else if (newvalueText.length - 1 - newvalueText.indexOf(".") > 2) {
         //输入了1个小数点 小数点后两位
-        newvalueText=newvalueText.substring(0,newvalueText.indexOf(".")+3);
+        newvalueText = newvalueText.substring(0, newvalueText.indexOf(".") + 3);
       }
     }
 
@@ -631,5 +650,4 @@ class MoneyTextInputFormatter extends TextInputFormatter{
       selection: new TextSelection.collapsed(offset: newvalueText.length),
     );
   }
-
-}
+}

+ 66 - 67
lib/paegs/pay_page/order_information_page.dart

@@ -645,71 +645,72 @@ class _OrderInformationPageState extends State<OrderInformationPage> {
   }
 
   void showPayWayPicker() {
-    bool aliPay = payWays[payWays.indexWhere((element) => element.way==1)].pay;
-    bool weChat = payWays[payWays.indexWhere((element) => element.way==2)].pay;
+    bool aliPay =
+        payWays[payWays.indexWhere((element) => element.way == 1)].pay;
+    bool weChat =
+        payWays[payWays.indexWhere((element) => element.way == 2)].pay;
     showCupertinoModalPopup(
         context: context,
         builder: (BuildContext context) {
           return CupertinoActionSheet(
-            title: MyViews()
-                .myText('选择支付方式', MyColors.c333333, 20),
+            title: MyViews().myText('选择支付方式', MyColors.c333333, 20),
             actions: [
-              if(aliPay)CupertinoActionSheetAction(
-                child: Row(
-                  children: [
-                    SvgPicture.asset(
-                      'images/svg/支付宝.svg',
-                      width: 24,
-                      height: 24,
-                    ),
-                    Container(
-                      child: MyViews().myText(aliPay?'支付宝支付':'支付宝支付(暂不可用)',
-                          aliPay?MyColors.c333333:MyColors.cEFEFEF, 16),
-                      margin: EdgeInsets.only(
-                          left: 6, right: 6),
-                    ),
-                  ],
-                  mainAxisAlignment:
-                  MainAxisAlignment.center,
+              if (aliPay)
+                CupertinoActionSheetAction(
+                  child: Row(
+                    children: [
+                      SvgPicture.asset(
+                        'images/svg/支付宝.svg',
+                        width: 24,
+                        height: 24,
+                      ),
+                      Container(
+                        child: MyViews().myText(
+                            aliPay ? '支付宝支付' : '支付宝支付(暂不可用)',
+                            aliPay ? MyColors.c333333 : MyColors.cEFEFEF,
+                            16),
+                        margin: EdgeInsets.only(left: 6, right: 6),
+                      ),
+                    ],
+                    mainAxisAlignment: MainAxisAlignment.center,
+                  ),
+                  onPressed: (() {
+                    if (aliPay) {
+                      payWay = 1;
+                      setState(() {});
+                      Navigator.pop(context, 'Edit');
+                    } else {
+                      showToast('支付宝支付暂不可用');
+                    }
+                  }),
                 ),
-                onPressed: (() {
-                  if(aliPay){
-                    payWay = 1;
-                    setState(() {});
-                    Navigator.pop(context, 'Edit');
-                  }else{
-                    showToast('支付宝支付暂不可用');
-                  }
-                }),
-              ),
-             if(weChat) CupertinoActionSheetAction(
-                child: Row(
-                  children: [
-                    SvgPicture.asset(
-                      'images/svg/微信.svg',
-                      width: 24,
-                      height: 24,
-                    ),
-                    Container(
-                      child: MyViews().myText(
-                          weChat?'微信支付':'微信支付(暂不可用)', weChat?MyColors.c333333:MyColors.c999999, 16),
-                      margin: EdgeInsets.only(
-                          left: 6, right: 6),
-                    ),
-                  ],
-                  mainAxisAlignment:
-                  MainAxisAlignment.center,
+              if (weChat)
+                CupertinoActionSheetAction(
+                  child: Row(
+                    children: [
+                      SvgPicture.asset(
+                        'images/svg/微信.svg',
+                        width: 24,
+                        height: 24,
+                      ),
+                      Container(
+                        child: MyViews().myText(weChat ? '微信支付' : '微信支付(暂不可用)',
+                            weChat ? MyColors.c333333 : MyColors.c999999, 16),
+                        margin: EdgeInsets.only(left: 6, right: 6),
+                      ),
+                    ],
+                    mainAxisAlignment: MainAxisAlignment.center,
+                  ),
+                  onPressed: (() {
+                    if (weChat) {
+                      payWay = 2;
+                      setState(() {});
+                      Navigator.pop(context, 'Edit');
+                    } else {
+                      showToast('微信支付暂不可用');
+                    }
+                  }),
                 ),
-                onPressed: (() {
-                 if(weChat){
-                   payWay = 2;
-                   setState(() {});
-                   Navigator.pop(context, 'Edit');
-                 }else{
-                   showToast('微信支付暂不可用');
-                 }
-                }),
-              ),
               CupertinoActionSheetAction(
                 child: Row(
                   children: [
@@ -719,20 +720,18 @@ class _OrderInformationPageState extends State<OrderInformationPage> {
                       height: 24,
                     ),
                     Container(
-                      child: MyViews().myText(
-                          '积分支付', MyColors.c333333, 16),
-                      margin: EdgeInsets.only(
-                          left: 6, right: 6),
+                      child: MyViews().myText('积分支付', MyColors.c333333, 16),
+                      margin: EdgeInsets.only(left: 6, right: 6),
                     ),
                     Container(
                       child: MyViews().myText(
-                          '当前积分${balance.toStringAsFixed(2)}', MyColors.cFF4233, 16),
-                      margin: EdgeInsets.only(
-                          left: 6, right: 6),
+                          '当前积分${balance.toStringAsFixed(2)}',
+                          MyColors.cFF4233,
+                          16),
+                      margin: EdgeInsets.only(left: 6, right: 6),
                     ),
                   ],
-                  mainAxisAlignment:
-                  MainAxisAlignment.center,
+                  mainAxisAlignment: MainAxisAlignment.center,
                 ),
                 onPressed: (() {
                   payWay = 0;

+ 89 - 87
lib/paegs/place_an_order_page/place_an_order_page.dart

@@ -61,15 +61,17 @@ class _PlaceAnOrderPageState extends State<PlaceAnOrderPage> {
       checkPaymentMethod((response, hasError) {
         if (!hasError) {
           PayWayBeanEntity entity =
-          PayWayBeanEntity().fromJson(json.decode(response.toString()));
+              PayWayBeanEntity().fromJson(json.decode(response.toString()));
           payWays = entity.data;
-          showAlipay = payWays[payWays.indexWhere((element) => element.way==1)].pay;
-          showWeChat = payWays[payWays.indexWhere((element) => element.way==2)].pay;
+          showAlipay =
+              payWays[payWays.indexWhere((element) => element.way == 1)].pay;
+          showWeChat =
+              payWays[payWays.indexWhere((element) => element.way == 2)].pay;
 
           getUserWalletBalance((re, hE) {
             if (!hE) {
               UserBalanceEntity balance =
-              UserBalanceEntity().fromJson(json.decode(re.data.toString()));
+                  UserBalanceEntity().fromJson(json.decode(re.data.toString()));
               this.balance = balance.data;
               if (NumUtil.multiply(widget.data.price, num) > balance.data) {
                 payWays.forEach((element) {
@@ -94,7 +96,7 @@ class _PlaceAnOrderPageState extends State<PlaceAnOrderPage> {
   @override
   Widget build(BuildContext context) {
     return GestureDetector(
-      onTap: (){
+      onTap: () {
         MyTools().hideKeyboard(context);
       },
       behavior: HitTestBehavior.translucent,
@@ -117,7 +119,8 @@ class _PlaceAnOrderPageState extends State<PlaceAnOrderPage> {
                       Row(
                         children: [
                           ClipRRect(
-                            child: MyViews().netImg(imgURL(data.userPic), 25, 25),
+                            child:
+                                MyViews().netImg(imgURL(data.userPic), 25, 25),
                             borderRadius: BorderRadius.circular(12.5),
                           ),
                           Container(
@@ -146,8 +149,8 @@ class _PlaceAnOrderPageState extends State<PlaceAnOrderPage> {
                       Row(
                         children: [
                           Container(
-                            child:
-                                MyViews().netImg(imgURL(data.coverPath), 82, 82),
+                            child: MyViews()
+                                .netImg(imgURL(data.coverPath), 82, 82),
                             margin: EdgeInsets.only(right: 8),
                           ),
                           Expanded(
@@ -159,8 +162,8 @@ class _PlaceAnOrderPageState extends State<PlaceAnOrderPage> {
                                       .myText(data.title, MyColors.c333333, 13),
                                   Row(
                                     children: [
-                                      MyViews().myText(
-                                          '¥${data.price}', MyColors.cFF4233, 12),
+                                      MyViews().myText('¥${data.price}',
+                                          MyColors.cFF4233, 12),
                                       MyViews()
                                           .myText('x1', MyColors.c999999, 12),
                                     ],
@@ -168,7 +171,8 @@ class _PlaceAnOrderPageState extends State<PlaceAnOrderPage> {
                                         MainAxisAlignment.spaceBetween,
                                   )
                                 ],
-                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                mainAxisAlignment:
+                                    MainAxisAlignment.spaceBetween,
                                 crossAxisAlignment: CrossAxisAlignment.start,
                               ),
                             ),
@@ -288,7 +292,6 @@ class _PlaceAnOrderPageState extends State<PlaceAnOrderPage> {
                             GestureDetector(
                               onTap: () {
                                 showPayWayPicker();
-
                               },
                               behavior: HitTestBehavior.translucent,
                               child: Row(
@@ -299,8 +302,8 @@ class _PlaceAnOrderPageState extends State<PlaceAnOrderPage> {
                                     height: 20,
                                   ),
                                   Container(
-                                    child: MyViews().myText(
-                                        payWayText(payWay), MyColors.c333333, 13),
+                                    child: MyViews().myText(payWayText(payWay),
+                                        MyColors.c333333, 13),
                                     margin: EdgeInsets.only(left: 6, right: 6),
                                   ),
                                   SvgPicture.asset(
@@ -390,8 +393,8 @@ class _PlaceAnOrderPageState extends State<PlaceAnOrderPage> {
                             focusedBorder: InputBorder.none,
                             isDense: true,
                             hintText: '请输入备注信息',
-                            hintStyle:
-                                TextStyle(color: MyColors.c999999, fontSize: 12),
+                            hintStyle: TextStyle(
+                                color: MyColors.c999999, fontSize: 12),
                             contentPadding:
                                 const EdgeInsets.fromLTRB(8, 4.5, 8, 4.5),
                           ),
@@ -416,8 +419,8 @@ class _PlaceAnOrderPageState extends State<PlaceAnOrderPage> {
                         child: Column(
                           children: [
                             Container(
-                              child:
-                                  MyViews().myText('取货信息', MyColors.c333333, 14),
+                              child: MyViews()
+                                  .myText('取货信息', MyColors.c333333, 14),
                               margin: EdgeInsets.only(top: 11),
                             ),
                             MyViews().myText(
@@ -486,8 +489,8 @@ class _PlaceAnOrderPageState extends State<PlaceAnOrderPage> {
                                       color: MyColors.cFF4233),
                                   height: 40,
                                   width: 160,
-                                  child:
-                                      MyViews().myText('立即支付', Colors.white, 14),
+                                  child: MyViews()
+                                      .myText('立即支付', Colors.white, 14),
                                   alignment: Alignment.center),
                             )
                           ],
@@ -533,71 +536,72 @@ class _PlaceAnOrderPageState extends State<PlaceAnOrderPage> {
   }
 
   void showPayWayPicker() {
-    bool aliPay = payWays[payWays.indexWhere((element) => element.way==1)].pay;
-    bool weChat = payWays[payWays.indexWhere((element) => element.way==2)].pay;
+    bool aliPay =
+        payWays[payWays.indexWhere((element) => element.way == 1)].pay;
+    bool weChat =
+        payWays[payWays.indexWhere((element) => element.way == 2)].pay;
     showCupertinoModalPopup(
         context: context,
         builder: (BuildContext context) {
           return CupertinoActionSheet(
-            title: MyViews()
-                .myText('选择支付方式', MyColors.c333333, 20),
+            title: MyViews().myText('选择支付方式', MyColors.c333333, 20),
             actions: [
-              if(showAlipay)CupertinoActionSheetAction(
-                child: Row(
-                  children: [
-                    SvgPicture.asset(
-                      'images/svg/支付宝.svg',
-                      width: 24,
-                      height: 24,
-                    ),
-                    Container(
-                      child: MyViews().myText(aliPay?'支付宝支付':'支付宝支付(暂不可用)',
-                          aliPay?MyColors.c333333:MyColors.cEFEFEF, 16),
-                      margin: EdgeInsets.only(
-                          left: 6, right: 6),
-                    ),
-                  ],
-                  mainAxisAlignment:
-                  MainAxisAlignment.center,
+              if (showAlipay)
+                CupertinoActionSheetAction(
+                  child: Row(
+                    children: [
+                      SvgPicture.asset(
+                        'images/svg/支付宝.svg',
+                        width: 24,
+                        height: 24,
+                      ),
+                      Container(
+                        child: MyViews().myText(
+                            aliPay ? '支付宝支付' : '支付宝支付(暂不可用)',
+                            aliPay ? MyColors.c333333 : MyColors.cEFEFEF,
+                            16),
+                        margin: EdgeInsets.only(left: 6, right: 6),
+                      ),
+                    ],
+                    mainAxisAlignment: MainAxisAlignment.center,
+                  ),
+                  onPressed: (() {
+                    if (aliPay) {
+                      payWay = 1;
+                      setState(() {});
+                      Navigator.pop(context, 'Edit');
+                    } else {
+                      showToast('支付宝支付暂不可用');
+                    }
+                  }),
                 ),
-                onPressed: (() {
-                  if(aliPay){
-                    payWay = 1;
-                    setState(() {});
-                    Navigator.pop(context, 'Edit');
-                  }else{
-                    showToast('支付宝支付暂不可用');
-                  }
-                }),
-              ),
-              if(showWeChat)CupertinoActionSheetAction(
-                child: Row(
-                  children: [
-                    SvgPicture.asset(
-                      'images/svg/微信.svg',
-                      width: 24,
-                      height: 24,
-                    ),
-                    Container(
-                      child: MyViews().myText(
-                          weChat?'微信支付':'微信支付(暂不可用)', weChat?MyColors.c333333:MyColors.c999999, 16),
-                      margin: EdgeInsets.only(
-                          left: 6, right: 6),
-                    ),
-                  ],
-                  mainAxisAlignment:
-                  MainAxisAlignment.center,
+              if (showWeChat)
+                CupertinoActionSheetAction(
+                  child: Row(
+                    children: [
+                      SvgPicture.asset(
+                        'images/svg/微信.svg',
+                        width: 24,
+                        height: 24,
+                      ),
+                      Container(
+                        child: MyViews().myText(weChat ? '微信支付' : '微信支付(暂不可用)',
+                            weChat ? MyColors.c333333 : MyColors.c999999, 16),
+                        margin: EdgeInsets.only(left: 6, right: 6),
+                      ),
+                    ],
+                    mainAxisAlignment: MainAxisAlignment.center,
+                  ),
+                  onPressed: (() {
+                    if (weChat) {
+                      payWay = 2;
+                      setState(() {});
+                      Navigator.pop(context, 'Edit');
+                    } else {
+                      showToast('微信支付暂不可用');
+                    }
+                  }),
                 ),
-                onPressed: (() {
-                  if(weChat){
-                    payWay = 2;
-                    setState(() {});
-                    Navigator.pop(context, 'Edit');
-                  }else{
-                    showToast('微信支付暂不可用');
-                  }
-                }),
-              ),
               CupertinoActionSheetAction(
                 child: Row(
                   children: [
@@ -607,20 +611,18 @@ class _PlaceAnOrderPageState extends State<PlaceAnOrderPage> {
                       height: 24,
                     ),
                     Container(
-                      child: MyViews().myText(
-                          '积分支付', MyColors.c333333, 16),
-                      margin: EdgeInsets.only(
-                          left: 6, right: 6),
+                      child: MyViews().myText('积分支付', MyColors.c333333, 16),
+                      margin: EdgeInsets.only(left: 6, right: 6),
                     ),
                     Container(
                       child: MyViews().myText(
-                          '当前积分${balance.toStringAsFixed(2)}', MyColors.cFF4233, 16),
-                      margin: EdgeInsets.only(
-                          left: 6, right: 6),
+                          '当前积分${balance.toStringAsFixed(2)}',
+                          MyColors.cFF4233,
+                          16),
+                      margin: EdgeInsets.only(left: 6, right: 6),
                     ),
                   ],
-                  mainAxisAlignment:
-                  MainAxisAlignment.center,
+                  mainAxisAlignment: MainAxisAlignment.center,
                 ),
                 onPressed: (() {
                   payWay = 0;

+ 20 - 22
lib/paegs/welcome_page/welcome_page.dart

@@ -137,13 +137,13 @@ class _WelcomePageState extends State<WelcomePage> {
               padding: EdgeInsets.symmetric(horizontal: 8, vertical: 12),
               child: Column(
                 children: [
-                  Expanded(
-                    child: Center(
-                      child: Container(
-                        child: MyViews()
-                            .myText('服务器出现异常,请稍后再试。', MyColors.c333333, 14),
-                        margin: EdgeInsets.symmetric(horizontal: 20),
-                      ),
+                  Center(
+                    child: Container(
+                      height: 100,
+                      child: MyViews()
+                          .myText('服务器出现异常,请稍后再试。', MyColors.c333333, 14),
+                      margin: EdgeInsets.symmetric(horizontal: 20),
+                      alignment: Alignment.center,
                     ),
                   ),
                   Container(
@@ -153,21 +153,19 @@ class _WelcomePageState extends State<WelcomePage> {
                   ),
                   Container(
                     margin: EdgeInsets.symmetric(horizontal: 10),
-                    child: Expanded(
-                      child: GestureDetector(
-                        behavior: HitTestBehavior.translucent,
-                        onTap: () async {
-                          await SystemChannels.platform
-                              .invokeMethod('SystemNavigator.pop');
-                        },
-                        child: Container(
-                          decoration: BoxDecoration(
-                              borderRadius: BorderRadius.circular(20),
-                              color: MyColors.cFF4233),
-                          height: 40,
-                          child: MyViews().myText('退 出', Colors.white, 14),
-                          alignment: Alignment.center,
-                        ),
+                    child: GestureDetector(
+                      behavior: HitTestBehavior.translucent,
+                      onTap: () async {
+                        await SystemChannels.platform
+                            .invokeMethod('SystemNavigator.pop');
+                      },
+                      child: Container(
+                        decoration: BoxDecoration(
+                            borderRadius: BorderRadius.circular(20),
+                            color: MyColors.cFF4233),
+                        height: 40,
+                        child: MyViews().myText('退 出', Colors.white, 14),
+                        alignment: Alignment.center,
                       ),
                     ),
                   )

+ 1 - 1
pubspec.yaml

@@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
 # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
 # Read more about iOS versioning at
 # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
-version: 1.1.16+1
+version: 1.1.17+1
 
 environment:
   sdk: ">=2.7.0 <3.0.0"