Преглед изворни кода

6.30 1.1.05
修改定位权限描述
优惠券和广告隐藏
删除向客服发红包
创建货帮隐藏

huxiaoqiang пре 4 година
родитељ
комит
cf0463dff5

+ 5 - 1
lib/main.dart

@@ -146,7 +146,9 @@ class MyApp extends StatelessWidget with WidgetsBindingObserver {
         couponBulletBox(arg);
       }
     });
+  EventBus().on('packageInfo', (arg) {
     isItUnderReview();
+  });
     return super.createElement();
   }
 
@@ -1350,7 +1352,9 @@ class MyApp extends StatelessWidget with WidgetsBindingObserver {
   }
 
   void isItUnderReview() {
-    MyDio().post('/model/appStoreReview', {}, (response, hasError) {
+    MyDio().post('/model/appStoreReview', {
+      'version':MyCookie().packageInfo.version
+    }, (response, hasError) {
       if(!hasError){
         AppStoreReviewBeanEntity e = AppStoreReviewBeanEntity().fromJson(json.decode(response.data.toString()));
         print(e.data);

+ 2 - 0
lib/my_tools/my_cookie.dart

@@ -3,6 +3,7 @@ import 'dart:convert';
 import 'package:amap_location/amap_location.dart';
 import 'package:bbyyy/beans/login_information_bean_entity.dart';
 import 'package:bbyyy/beans/user_bean_entity.dart';
+import 'package:bbyyy/my_tools/event_bus.dart';
 import 'package:disable_screenshots/disable_screenshots.dart';
 import 'package:package_info/package_info.dart';
 import 'package:shared_preferences/shared_preferences.dart';
@@ -43,6 +44,7 @@ class MyCookie {
   initP() async {
     prefs = await SharedPreferences.getInstance();
     packageInfo = await PackageInfo.fromPlatform();
+    EventBus().emit('packageInfo');
     plugin = DisableScreenshots();
     if (prefs.getBool('收入进账提示音') == null) {
       prefs.setBool('收入进账提示音', true);

+ 12 - 12
lib/paegs/chat_page/chat_page_view.dart

@@ -231,18 +231,18 @@ class ChatPageView {
         }
       },
     ));
-    items.add(GestureDetector(
-      child: Container(
-        child: SvgPicture.asset(
-          'images/svg/发红包.svg',
-        ),
-      ),
-      behavior: HitTestBehavior.translucent,
-      onTap: () async {
-        MyTools()
-            .toPage(context, RedPacketPage(ChatData().chatWith), (then) {});
-      },
-    ));
+    // items.add(GestureDetector(
+    //   child: Container(
+    //     child: SvgPicture.asset(
+    //       'images/svg/发红包.svg',
+    //     ),
+    //   ),
+    //   behavior: HitTestBehavior.translucent,
+    //   onTap: () async {
+    //     MyTools()
+    //         .toPage(context, RedPacketPage(ChatData().chatWith), (then) {});
+    //   },
+    // ));
     return items;
   }
 

+ 10 - 8
lib/paegs/gang_page/gang_page.dart

@@ -46,13 +46,14 @@ class _GangPageState extends State<GangPage>
       print(arg);
       needRE = arg;
     });
-    popItems.add(PopupMenuItem(
-      child: Text(
-        '创建货帮',
-        style: TextStyle(color: MyColors.c666666, fontSize: 14),
-      ),
-      value: '创建货帮',
-    ));
+    if (!MyCookie().underReview)
+      popItems.add(PopupMenuItem(
+        child: Text(
+          '创建货帮',
+          style: TextStyle(color: MyColors.c666666, fontSize: 14),
+        ),
+        value: '创建货帮',
+      ));
     popItems.add(PopupMenuItem(
       child: Text(
         '加入货帮',
@@ -387,7 +388,8 @@ class _GangPageState extends State<GangPage>
                                     child: Text(
                                       '公开',
                                       style: TextStyle(
-                                          color: MyColors.cFF4233, fontSize: 10),
+                                          color: MyColors.cFF4233,
+                                          fontSize: 10),
                                     ),
                                     alignment: Alignment.center,
                                     margin: EdgeInsets.only(right: 5),

+ 67 - 56
lib/paegs/login_page/login_page.dart

@@ -202,67 +202,76 @@ class _LoginPageState extends State<LoginPage> {
                                   : MyColors.cD7D7D7,
                               margin: EdgeInsets.only(top: 8, bottom: 39),
                             ),
-                            GestureDetector(
-                              onTap: () {
-                                if (_phoneNum.text.isEmpty ||
-                                    _phoneNum.text.length != 11) {
-                                  showToast('请填写正确的手机号');
-                                  return;
-                                }
-                                if (_pw.text.isEmpty) {
-                                  showToast('请填写密码');
-                                  return;
-                                }
-                                login();
-                              },
-                              behavior: HitTestBehavior.translucent,
-                              child: Container(
-                                decoration: BoxDecoration(
-                                  borderRadius: BorderRadius.all(
-                                    Radius.circular(20),
-                                  ),
-                                  gradient: LinearGradient(
-                                    colors: MyColors.lg,
+                            Row(
+                              children: [
+                                Expanded(
+                                  child: GestureDetector(
+                                    onTap: () {
+                                      if (_phoneNum.text.isEmpty ||
+                                          _phoneNum.text.length != 11) {
+                                        showToast('请填写正确的手机号');
+                                        return;
+                                      }
+                                      if (_pw.text.isEmpty) {
+                                        showToast('请填写密码');
+                                        return;
+                                      }
+                                      login();
+                                    },
+                                    behavior: HitTestBehavior.translucent,
+                                    child: Container(
+                                      decoration: BoxDecoration(
+                                        borderRadius: BorderRadius.all(
+                                          Radius.circular(22),
+                                        ),
+                                        gradient: LinearGradient(
+                                          colors: MyColors.lg,
+                                        ),
+                                      ),
+                                      height: 44,
+                                      child: Text(
+                                        '登 录',
+                                        style: TextStyle(
+                                            color: Colors.white, fontSize: 17),
+                                      ),
+                                      alignment: Alignment.center,
+                                      padding: EdgeInsets.only(bottom: 2),
+                                    ),
                                   ),
                                 ),
-                                height: 44,
-                                child: Text(
-                                  '登 录',
-                                  style: TextStyle(
-                                      color: Colors.white, fontSize: 17),
-                                ),
-                                alignment: Alignment.center,
-                                padding: EdgeInsets.only(bottom: 2),
-                              ),
-                            ),
-                            Visibility(
-                              visible: showBrowse,
-                              child: GestureDetector(
-                                onTap: () {
-                                  guestLogin();
-                                },
-                                behavior: HitTestBehavior.translucent,
-                                child: Container(
-                                  margin: EdgeInsets.only(top: 35),
-                                  decoration: BoxDecoration(
-                                    borderRadius: BorderRadius.all(
-                                      Radius.circular(20),
-                                    ),
-                                    gradient: LinearGradient(
-                                      colors: MyColors.lg,
+                                Visibility(child: Container(width: 20,),visible: showBrowse,),
+                                Visibility(
+                                  visible: showBrowse,
+                                  child: Expanded(
+                                    child: GestureDetector(
+                                      onTap: () {
+                                        guestLogin();
+                                      },
+                                      behavior: HitTestBehavior.translucent,
+                                      child: Container(
+                                        decoration: BoxDecoration(
+                                          borderRadius: BorderRadius.all(
+                                            Radius.circular(22),
+                                          ),
+                                          gradient: LinearGradient(
+                                            colors: MyColors.lg,
+                                          ),
+                                        ),
+                                        height: 44,
+                                        child: Text(
+                                          '游客登录',
+                                          style: TextStyle(
+                                              color: Colors.white, fontSize: 17),
+                                        ),
+                                        alignment: Alignment.center,
+                                        padding: EdgeInsets.only(bottom: 2),
+                                      ),
                                     ),
                                   ),
-                                  height: 44,
-                                  child: Text(
-                                    '游客登录',
-                                    style: TextStyle(
-                                        color: Colors.white, fontSize: 17),
-                                  ),
-                                  alignment: Alignment.center,
-                                  padding: EdgeInsets.only(bottom: 2),
                                 ),
-                              ),
+                              ],
                             ),
+
                             // Container(
                             //   alignment: Alignment.centerRight,
                             //   child: GestureDetector(
@@ -372,7 +381,9 @@ class _LoginPageState extends State<LoginPage> {
   }
 
   void checkAuditStatus() {
-    MyDio().post('/model/appStoreReview', {}, (response, hasError) {
+    MyDio().post('/model/appStoreReview', {
+      'version':MyCookie().packageInfo.version
+    }, (response, hasError) {
       if(!hasError){
         AppStoreReviewBeanEntity e = AppStoreReviewBeanEntity().fromJson(json.decode(response.data.toString()));
         print(e.data);