Преглед на файлове

Merge remote-tracking branch 'origin/b_c' into b_c

x1ongzhu преди 6 години
родител
ревизия
08c177e5d4
променени са 55 файла, в които са добавени 884 реда и са изтрити 382 реда
  1. 1 1
      android/app/src/main/AndroidManifest.xml
  2. 3 7
      android/app/src/main/res/drawable/launch_background.xml
  3. BIN
      android/app/src/main/res/mipmap-hdpi/logo.png
  4. BIN
      android/app/src/main/res/mipmap-mdpi/logo.png
  5. BIN
      android/app/src/main/res/mipmap-xhdpi/logo.png
  6. BIN
      android/app/src/main/res/mipmap-xxhdpi/logo.png
  7. BIN
      android/app/src/main/res/mipmap-xxxhdpi/logo.png
  8. BIN
      images/2x/icon_inter_hongse.png
  9. BIN
      images/2x/icon_logo.png
  10. BIN
      images/2x/icon_xiayiye1.png
  11. BIN
      images/2x/icon_zhifu_yunshanfu.png
  12. BIN
      images/2x/text_yonghuduan.png
  13. BIN
      images/3x/icon_inter_hongse.png
  14. BIN
      images/3x/icon_logo.png
  15. BIN
      images/3x/icon_xiayiye1.png
  16. BIN
      images/3x/icon_zhifu_yunshanfu.png
  17. BIN
      images/3x/text_yonghuduan.png
  18. BIN
      images/icon_inter_hongse.png
  19. BIN
      images/icon_logo.png
  20. BIN
      images/icon_xiayiye1.png
  21. BIN
      images/icon_zhifu_yunshanfu.png
  22. BIN
      images/text_yonghuduan.png
  23. 2 2
      ios/Runner/Info.plist
  24. 2 2
      ios/ScreenRecorder/Info.plist
  25. 5 5
      lib/main.dart
  26. 23 0
      lib/model/ChannelInfo.dart
  27. 20 0
      lib/model/ChannelInfo.g.dart
  28. 19 0
      lib/model/PopNotice.dart
  29. 19 0
      lib/model/PopNotice.g.dart
  30. 3 1
      lib/net/HttpManager.dart
  31. 142 0
      lib/pages/ChangePassword.dart
  32. 9 5
      lib/pages/ChoosePay.dart
  33. 1 1
      lib/pages/CompetitionInformation.dart
  34. 72 53
      lib/pages/GuidePage.dart
  35. 115 36
      lib/pages/HomePage.dart
  36. 1 12
      lib/pages/HomePage1.dart
  37. 4 145
      lib/pages/MatchPage.dart
  38. 231 76
      lib/pages/MyCode.dart
  39. 1 1
      lib/pages/MyWallet.dart
  40. 140 0
      lib/pages/PhoneLogin.dart
  41. 2 2
      lib/pages/RoomInfo.dart
  42. 1 1
      lib/pages/SecondRoomInfo.dart
  43. 15 8
      lib/pages/Setting.dart
  44. 11 3
      lib/pages/ShoppingMall.dart
  45. 8 8
      lib/pages/UserPage.dart
  46. 1 1
      lib/pages/VideoPlayer.dart
  47. 1 1
      lib/styles/colors.dart
  48. 9 4
      lib/widget/HouseItem.dart
  49. 2 2
      lib/widget/LinearButton.dart
  50. 1 1
      lib/widget/SuccessfulReception.dart
  51. 14 0
      pubspec.lock
  52. 2 0
      pubspec.yaml
  53. 1 1
      screen_stream_plugin/android/src/main/java/com/izouma/screen_stream_plugin/VideoProcessService.java
  54. 1 1
      screen_stream_plugin/android/src/main/res/drawable/bg_dialog.xml
  55. 2 2
      screen_stream_plugin/android/src/main/res/layout/dialog.xml

+ 1 - 1
android/app/src/main/AndroidManifest.xml

@@ -10,7 +10,7 @@
     <application
     <application
         android:name="com.izouma.screen_stream_plugin.MyApplication"
         android:name="com.izouma.screen_stream_plugin.MyApplication"
         android:icon="@mipmap/ic_launcher"
         android:icon="@mipmap/ic_launcher"
-        android:label="全民电竞"
+        android:label="电竞"
         android:networkSecurityConfig="@xml/network_security_config"
         android:networkSecurityConfig="@xml/network_security_config"
         android:usesCleartextTraffic="true"
         android:usesCleartextTraffic="true"
         tools:ignore="GoogleAppIndexingWarning">
         tools:ignore="GoogleAppIndexingWarning">

+ 3 - 7
android/app/src/main/res/drawable/launch_background.xml

@@ -1,19 +1,15 @@
 <?xml version="1.0" encoding="utf-8"?><!-- Modify this file to customize your launch splash screen -->
 <?xml version="1.0" encoding="utf-8"?><!-- Modify this file to customize your launch splash screen -->
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
     <item>
     <item>
         <shape>
         <shape>
             <solid android:color="#FF3A3D5C" />
             <solid android:color="#FF3A3D5C" />
         </shape>
         </shape>
     </item>
     </item>
     <item>
     <item>
-        <bitmap
-            android:gravity="center"
-            android:src="@mipmap/icon_qidongye" />
+        <bitmap android:gravity="center" android:src="@mipmap/logo" />
     </item>
     </item>
     <!-- You can insert your own image assets here -->
     <!-- You can insert your own image assets here -->
     <!-- <item>
     <!-- <item>
-        <bitmap
-            android:gravity="center"
-            android:src="@mipmap/launch_image" />
+        <bitmap android:gravity="center" android:src="@mipmap/launch_image" />
     </item> -->
     </item> -->
 </layer-list>
 </layer-list>

BIN
android/app/src/main/res/mipmap-hdpi/logo.png


BIN
android/app/src/main/res/mipmap-mdpi/logo.png


BIN
android/app/src/main/res/mipmap-xhdpi/logo.png


BIN
android/app/src/main/res/mipmap-xxhdpi/logo.png


BIN
android/app/src/main/res/mipmap-xxxhdpi/logo.png


BIN
images/2x/icon_inter_hongse.png


BIN
images/2x/icon_logo.png


BIN
images/2x/icon_xiayiye1.png


BIN
images/2x/icon_zhifu_yunshanfu.png


BIN
images/2x/text_yonghuduan.png


BIN
images/3x/icon_inter_hongse.png


BIN
images/3x/icon_logo.png


BIN
images/3x/icon_xiayiye1.png


BIN
images/3x/icon_zhifu_yunshanfu.png


BIN
images/3x/text_yonghuduan.png


BIN
images/icon_inter_hongse.png


BIN
images/icon_logo.png


BIN
images/icon_xiayiye1.png


BIN
images/icon_zhifu_yunshanfu.png


BIN
images/text_yonghuduan.png


+ 2 - 2
ios/Runner/Info.plist

@@ -5,7 +5,7 @@
 	<key>CFBundleDevelopmentRegion</key>
 	<key>CFBundleDevelopmentRegion</key>
 	<string>en</string>
 	<string>en</string>
 	<key>CFBundleDisplayName</key>
 	<key>CFBundleDisplayName</key>
-	<string>全民电竞</string>
+	<string>电竞</string>
 	<key>CFBundleExecutable</key>
 	<key>CFBundleExecutable</key>
 	<string>$(EXECUTABLE_NAME)</string>
 	<string>$(EXECUTABLE_NAME)</string>
 	<key>CFBundleIdentifier</key>
 	<key>CFBundleIdentifier</key>
@@ -13,7 +13,7 @@
 	<key>CFBundleInfoDictionaryVersion</key>
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
 	<string>6.0</string>
 	<key>CFBundleName</key>
 	<key>CFBundleName</key>
-	<string>全民电竞</string>
+	<string>电竞</string>
 	<key>CFBundlePackageType</key>
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
 	<key>CFBundleShortVersionString</key>

+ 2 - 2
ios/ScreenRecorder/Info.plist

@@ -5,7 +5,7 @@
 	<key>CFBundleDevelopmentRegion</key>
 	<key>CFBundleDevelopmentRegion</key>
 	<string>$(DEVELOPMENT_LANGUAGE)</string>
 	<string>$(DEVELOPMENT_LANGUAGE)</string>
 	<key>CFBundleDisplayName</key>
 	<key>CFBundleDisplayName</key>
-	<string>全民电竞</string>
+	<string>电竞</string>
 	<key>CFBundleExecutable</key>
 	<key>CFBundleExecutable</key>
 	<string>$(EXECUTABLE_NAME)</string>
 	<string>$(EXECUTABLE_NAME)</string>
 	<key>CFBundleIdentifier</key>
 	<key>CFBundleIdentifier</key>
@@ -13,7 +13,7 @@
 	<key>CFBundleInfoDictionaryVersion</key>
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
 	<string>6.0</string>
 	<key>CFBundleName</key>
 	<key>CFBundleName</key>
-	<string>全民电竞</string>
+	<string>电竞</string>
 	<key>CFBundlePackageType</key>
 	<key>CFBundlePackageType</key>
 	<string>XPC!</string>
 	<string>XPC!</string>
 	<key>CFBundleShortVersionString</key>
 	<key>CFBundleShortVersionString</key>

+ 5 - 5
lib/main.dart

@@ -25,7 +25,7 @@ class MobileCyberGamesApp extends StatelessWidget {
     return StoreProvider<AppState>(
     return StoreProvider<AppState>(
       store: store,
       store: store,
       child: MaterialApp(
       child: MaterialApp(
-        title: '全民电竞',
+        title: '电竞',
         supportedLocales: [
         supportedLocales: [
           const Locale('en'), // English
           const Locale('en'), // English
           const Locale('zh'), // China
           const Locale('zh'), // China
@@ -38,9 +38,9 @@ class MobileCyberGamesApp extends StatelessWidget {
         theme: ThemeData(
         theme: ThemeData(
             cardColor: Color(0xFF2B2B42),
             cardColor: Color(0xFF2B2B42),
             backgroundColor: Color(0xFF222335),
             backgroundColor: Color(0xFF222335),
-            primaryColor: Color(0xFFC2524D),
-            buttonColor: Color(0xFFC2524D),
-            accentColor: Color(0xFFC2524D),
+            primaryColor: Color(0xFFD4504B),
+            buttonColor: Color(0xFFD4504B),
+            accentColor: Color(0xFFD4504B),
             textSelectionColor: Colors.white,
             textSelectionColor: Colors.white,
             textTheme: TextTheme(
             textTheme: TextTheme(
               subhead: TextStyle(color: Colors.white),
               subhead: TextStyle(color: Colors.white),
@@ -52,7 +52,7 @@ class MobileCyberGamesApp extends StatelessWidget {
             primaryIconTheme: IconThemeData(color: Colors.white),
             primaryIconTheme: IconThemeData(color: Colors.white),
             appBarTheme: AppBarTheme(color: Color(0xFF23253C)),
             appBarTheme: AppBarTheme(color: Color(0xFF23253C)),
             buttonTheme: ButtonThemeData(
             buttonTheme: ButtonThemeData(
-              buttonColor: Color(0xFFC2524D),
+              buttonColor: Color(0xFFD4504B),
               highlightColor: Color(0xFF8E3B36),
               highlightColor: Color(0xFF8E3B36),
               splashColor: Color(0xFF8E3B36),
               splashColor: Color(0xFF8E3B36),
               shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(0))),
               shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(0))),

+ 23 - 0
lib/model/ChannelInfo.dart

@@ -0,0 +1,23 @@
+import 'package:json_annotation/json_annotation.dart';
+
+part 'ChannelInfo.g.dart';
+
+@JsonSerializable()
+class ChannelInfo {
+  ChannelInfo(this.id, this.name, this.versionNo, this.ratio,this.ratio2);
+  int id;
+  String name;//名称
+  String versionNo;//版本号
+  int ratio;//一级
+  int ratio2;//二级
+  factory ChannelInfo.fromJson(Map<String, dynamic> json) =>
+      _$ChannelInfoFromJson(json);
+
+  Map<String, dynamic> toJson() => _$ChannelInfoToJson(this);
+  // 命名构造函数
+  ChannelInfo.empty();
+  @override
+  String toString() {
+    return _$ChannelInfoToJson(this).toString();
+  }
+}

+ 20 - 0
lib/model/ChannelInfo.g.dart

@@ -0,0 +1,20 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'ChannelInfo.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+ChannelInfo _$ChannelInfoFromJson(Map<String, dynamic> json) {
+  return ChannelInfo(json['id'] as int, json['name'] as String, json['versionNo'] as String, json['ratio'] as int, json['ratio2'] as int);
+}
+
+//  int id;
+//   String name;//名称
+//   String versionNo;//版本号
+//   int ratio;//一级
+//   int ratio2;//二级
+
+Map<String, dynamic> _$ChannelInfoToJson(ChannelInfo instance) =>
+    <String, dynamic>{'id': instance.id, 'name': instance.name, 'versionNo': instance.versionNo, 'ratio': instance.ratio, 'ratio2': instance.ratio2};

+ 19 - 0
lib/model/PopNotice.dart

@@ -0,0 +1,19 @@
+import 'package:json_annotation/json_annotation.dart';
+
+part 'PopNotice.g.dart';
+
+@JsonSerializable()
+class PopNotice {
+  PopNotice(this.id, this.image);
+  int id;
+  String image; //图片
+  factory PopNotice.fromJson(Map<String, dynamic> json) => _$PopNoticeFromJson(json);
+
+  Map<String, dynamic> toJson() => _$PopNoticeToJson(this);
+  // 命名构造函数
+  PopNotice.empty();
+  @override
+  String toString() {
+    return _$PopNoticeToJson(this).toString();
+  }
+}

+ 19 - 0
lib/model/PopNotice.g.dart

@@ -0,0 +1,19 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'PopNotice.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+PopNotice _$PopNoticeFromJson(Map<String, dynamic> json) {
+  return PopNotice(json['id'] as int, json['image'] as String);
+}
+
+//  int id;
+//   String name;//名称
+//   String versionNo;//版本号
+//   int ratio;//一级
+//   int ratio2;//二级
+
+Map<String, dynamic> _$PopNoticeToJson(PopNotice instance) => <String, dynamic>{'id': instance.id, 'image': instance.image};

+ 3 - 1
lib/net/HttpManager.dart

@@ -3,8 +3,10 @@ import 'Result.dart';
 import 'package:intl/intl.dart';
 import 'package:intl/intl.dart';
 
 
 class HttpManager {
 class HttpManager {
-  static String baseUrl = 'http://117.81.233.142:8206/';
+  // static String baseUrl = 'http://117.81.233.142:8206/';
   // static String baseUrl='http://192.168.50.15:8080/';
   // static String baseUrl='http://192.168.50.15:8080/';
+
+  static String baseUrl = 'http://202.79.174.56:8206/';
   static String token;
   static String token;
   static bool debug;
   static bool debug;
 
 

+ 142 - 0
lib/pages/ChangePassword.dart

@@ -0,0 +1,142 @@
+import 'package:flutter/material.dart';
+import '../widget/ITextInput.dart';
+import '../widget/LinearButton.dart';
+import '../net/HttpManager.dart';
+import '../net/Result.dart';
+import 'package:redux/redux.dart';
+import 'package:flutter_redux/flutter_redux.dart';
+import '../redux/AppState.dart';
+import '../model/UserInfo.dart';
+import '../styles/totast.dart';
+
+class ChangePassword extends StatefulWidget {
+  @override
+  _ChangePasswordState createState() => _ChangePasswordState();
+}
+
+class _ChangePasswordState extends State<ChangePassword> with WidgetsBindingObserver {
+  String password_old = '';
+  String password_new = '';
+  String password_se = '';
+
+  @override
+  Widget build(BuildContext context) {
+    return StoreConnector<AppState, UserInfo>(
+        converter: (Store store) => store.state.userInfo,
+        builder: (context, userInfo) {
+          return Scaffold(
+            appBar: AppBar(
+              title: Text('修改密码'),
+            ),
+            backgroundColor: Color(0xFF23253C),
+            body: Column(
+              children: <Widget>[
+                Container(
+                  height: 10,
+                ),
+                ITextField(
+                  maxLength: 6,
+                  keyboardType: ITextInputType.password,
+                  prefixIcon: Container(
+                    child: Image.asset(
+                      'images/list_icon_yanzhengma.png',
+                      width: 20,
+                    ),
+                  ),
+                  hintText: '请输入您的原始密码',
+                  hintStyle: TextStyle(
+                    fontSize: 16,
+                    color: Color(0xFF727785),
+                  ),
+                  textStyle: TextStyle(color: Colors.white),
+                  fieldCallBack: (content) {
+                    setState(() {
+                      password_old = content;
+                    });
+                  },
+                  counterStyle: TextStyle(color: Color(0xFF000000), fontSize: 0),
+                ),
+                Container(
+                  height: 10,
+                ),
+                ITextField(
+                  maxLength: 6,
+                  keyboardType: ITextInputType.password,
+                  prefixIcon: Container(
+                    child: Image.asset(
+                      'images/list_icon_yanzhengma.png',
+                      width: 20,
+                    ),
+                  ),
+                  hintText: '请设置您的新密码',
+                  hintStyle: TextStyle(
+                    fontSize: 16,
+                    color: Color(0xFF727785),
+                  ),
+                  textStyle: TextStyle(color: Colors.white),
+                  fieldCallBack: (content) {
+                    setState(() {
+                      password_new = content;
+                    });
+                  },
+                  counterStyle: TextStyle(color: Color(0xFF000000), fontSize: 0),
+                ),
+                Container(
+                  height: 10,
+                ),
+                ITextField(
+                  maxLength: 6,
+                  keyboardType: ITextInputType.password,
+                  prefixIcon: Container(
+                    child: Image.asset(
+                      'images/list_icon_yanzhengma.png',
+                      width: 20,
+                    ),
+                  ),
+                  hintText: '请确认您的新密码',
+                  hintStyle: TextStyle(
+                    fontSize: 16,
+                    color: Color(0xFF727785),
+                  ),
+                  textStyle: TextStyle(color: Colors.white),
+                  fieldCallBack: (content) {
+                    setState(() {
+                      password_se = content;
+                    });
+                  },
+                  counterStyle: TextStyle(color: Color(0xFF000000), fontSize: 0),
+                ),
+                Container(
+                  height: 52,
+                ),
+                Padding(
+                  padding: EdgeInsets.symmetric(horizontal: 15),
+                  child: LinearButton(
+                    btnHeight: 48.0,
+                    btntext: '确认修改',
+                    textColor: (password_new == password_se && password_se != '' && password_old != '') ? Colors.white : Color(0xFF15151D),
+                    colorList: (password_new == password_se && password_se != '' && password_old != '')
+                        ? [Color(0xFFD4504B), Color(0xFFD4504B)]
+                        : [Color(0xFF727785), Color(0xFF727785)],
+                    onTapHomeMenu: (password_new == password_se && password_se != '' && password_old != '')
+                        ? () async {
+                            Toast.show(context, '加载中', -1, 'loading');
+                            Result res = await HttpManager.post('userInfo/updatePassword',
+                                data: {"userId": userInfo.id, "oldPassword": password_old, "newPassword": password_new});
+                            Toast.hide();
+                            if (res.success) {
+                              Toast.show(context, '修改成功', 1500, 'success');
+                              Navigator.of(context).pop();
+                            } else {
+                              Toast.show(context, res.error, 1500, 'info');
+                            }
+                          }
+                        : null,
+                  ),
+                )
+              ],
+            ),
+          );
+        });
+  }
+}

+ 9 - 5
lib/pages/ChoosePay.dart

@@ -35,7 +35,7 @@ class _ChoosePayState extends State<ChoosePay> with WidgetsBindingObserver {
   }
   }
 
 
   Future<void> getInfo() async {
   Future<void> getInfo() async {
-    Result res = await HttpManager.get('payCodeStock/allUsedPayType?moeny=${widget.chooseProduct.money}');
+    Result res = await HttpManager.get('payCodeStock/allUsedPayType?money=${widget.chooseProduct.money}');
     if (res.success) {
     if (res.success) {
       for (var item in res.data) {
       for (var item in res.data) {
         setState(() {
         setState(() {
@@ -110,16 +110,16 @@ class _ChoosePayState extends State<ChoosePay> with WidgetsBindingObserver {
                   })
                   })
                 : Container(),
                 : Container(),
             isCloud_flash
             isCloud_flash
-                ? PayContent('云闪付', '支持各大银联银行支付', 'images/pay1.png', 'wechat', chooseKey, () {
+                ? PayContent('云闪付APP支付', '支持各大银联银行支付', 'images/icon_zhifu_yunshanfu.png', 'cloud_flash', chooseKey, () {
                     setState(() {
                     setState(() {
-                      chooseKey = 'wechat';
+                      chooseKey = 'cloud_flash';
                     });
                     });
                   })
                   })
                 : Container(),
                 : Container(),
             isUnion_pay
             isUnion_pay
-                ? PayContent('银联支付', '支持各大银联银行支付', 'images/pay1.png', 'wechat', chooseKey, () {
+                ? PayContent('银联支付', '支持各大银联银行支付', 'images/pay1.png', 'union_pay', chooseKey, () {
                     setState(() {
                     setState(() {
-                      chooseKey = 'wechat';
+                      chooseKey = 'union_pay';
                     });
                     });
                   })
                   })
                 : Container()
                 : Container()
@@ -138,7 +138,11 @@ class _ChoosePayState extends State<ChoosePay> with WidgetsBindingObserver {
             int stockId = 0;
             int stockId = 0;
             Toast.show(context, '加载中', -1, 'loading');
             Toast.show(context, '加载中', -1, 'loading');
 
 
+            print(widget.chooseProduct.money);
+            print(chooseKey);
+
             final Result res1 = await HttpManager.get('payCodeStock/randomStock', data: {'money': widget.chooseProduct.money, 'payType': chooseKey});
             final Result res1 = await HttpManager.get('payCodeStock/randomStock', data: {'money': widget.chooseProduct.money, 'payType': chooseKey});
+            print(res1.data);
             if (res1.success) {
             if (res1.success) {
               stockId = res1.data['id'];
               stockId = res1.data['id'];
             }
             }

+ 1 - 1
lib/pages/CompetitionInformation.dart

@@ -79,7 +79,7 @@ class InfoBox extends StatelessWidget {
             padding: EdgeInsets.only(top: 25),
             padding: EdgeInsets.only(top: 25),
             child: Column(
             child: Column(
               children: <Widget>[
               children: <Widget>[
-                Text('注意啦!', style: TextStyle(color: Color(0xFFC2524D), fontSize: 20, fontWeight: FontWeight.w600)),
+                Text('注意啦!', style: TextStyle(color: Color(0xFFD4504B), fontSize: 20, fontWeight: FontWeight.w600)),
                 Container(height: 10,),
                 Container(height: 10,),
                 Text(
                 Text(
                   '本次任务:游戏中最短时间内杀戮${killNum}人',
                   '本次任务:游戏中最短时间内杀戮${killNum}人',

+ 72 - 53
lib/pages/GuidePage.dart

@@ -1,8 +1,11 @@
 import 'package:flutter/material.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:flutter_swiper/flutter_swiper.dart';
 import 'package:flutter_swiper/flutter_swiper.dart';
+import '../model/PopNotice.dart';
 
 
 class GuidePage extends StatefulWidget {
 class GuidePage extends StatefulWidget {
+  GuidePage(this.popNoticeList);
+  List<PopNotice> popNoticeList;
   @override
   @override
   _GuidePageState createState() => _GuidePageState();
   _GuidePageState createState() => _GuidePageState();
 }
 }
@@ -11,59 +14,75 @@ class _GuidePageState extends State<GuidePage> with WidgetsBindingObserver {
   int swiperIndex = 0;
   int swiperIndex = 0;
   @override
   @override
   Widget build(BuildContext context) {
   Widget build(BuildContext context) {
-    return GestureDetector(
-      onTap: () {
-        // Navigator.of(context).pop();
-      },
-      child: Scaffold(
+    return Scaffold(
         backgroundColor: Color(0xCC000000),
         backgroundColor: Color(0xCC000000),
-        body: Container(
-          child: new Swiper(
-              itemBuilder: (BuildContext context, int index) {
-                return GuidItem(index);
-              },
-              itemCount: 3,
-              loop: false,
-              onIndexChanged: (index) {
-                setState(() {
-                  swiperIndex = index;
-                });
-              },
-              pagination: new SwiperCustomPagination(
-                builder: (BuildContext context, SwiperPluginConfig config) {
-                  return Stack(
-                    children: <Widget>[
-                      Positioned(
-                        right: 20,
-                        top: 20,
-                        child: Image.asset('images/yindao_logo.png'),
-                      ),
-                      Positioned(
-                          right: 20,
-                          top: 60,
-                          child: Container(
-                              width: 47,
-                              height: 26,
-                              decoration: BoxDecoration(
-                                color: Colors.black12,
-                                borderRadius: BorderRadius.all(Radius.circular(13)),
-                              ),
-                              child: Center(
-                                child: InkWell(
-                                    onTap: () {
-                                      Navigator.of(context).pop();
-                                    },
-                                    child: Text('跳过', style: TextStyle(color: Colors.white, fontSize: 13), textAlign: TextAlign.center)),
-                              )))
-                    ],
-                  );
-                },
-              )),
-        ),
-        floatingActionButton: MyFloat(swiperIndex),
-        floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
-      ),
-    );
+        body: WillPopScope(
+            child: Center(
+              child: Column(
+                crossAxisAlignment: CrossAxisAlignment.center,
+                mainAxisAlignment: MainAxisAlignment.center,
+                children: <Widget>[
+                  Container(
+                    width: 320,
+                    height: 420,
+                    child: new Swiper(
+                        itemBuilder: (BuildContext context, int index) {
+                          return Image.network(
+                            widget.popNoticeList[index].image,
+                            fit: BoxFit.fill,
+                          );
+                        },
+                        itemCount: widget.popNoticeList.length,
+                        loop: false,
+                        onIndexChanged: (index) {
+                          setState(() {
+                            swiperIndex = index;
+                          });
+                        },
+                        pagination: SwiperCustomPagination(builder: (BuildContext context, SwiperPluginConfig config) {
+                          Color activeColor = Color(0xFFD4504B);
+                          Color color = Colors.white;
+                          List<Widget> list = [];
+
+                          int itemCount = config.itemCount;
+                          int activeIndex = config.activeIndex;
+
+                          for (int i = 0; i < itemCount; ++i) {
+                            bool active = i == activeIndex;
+                            list.add(
+                              Container(
+                                  key: Key("pagination_$i"),
+                                  margin: EdgeInsets.symmetric(vertical: 3, horizontal: 2),
+                                  child: Container(
+                                    width: active ? 12 : 4,
+                                    height: 4,
+                                    decoration: BoxDecoration(color: active ? activeColor : color, borderRadius: BorderRadius.all(Radius.circular(3))),
+                                  )),
+                            );
+                          }
+
+                          return Container(
+                            margin: EdgeInsets.only(top: 406),
+                            child: Row(
+                              mainAxisAlignment: MainAxisAlignment.center,
+                              children: list,
+                            ),
+                          );
+                        })),
+                  ),
+                  Container(
+                    height: 20,
+                  ),
+                  InkWell(
+                    child: Image.asset('images/icon_xiayiye1.png'),
+                    onTap: () {
+                      Navigator.of(context).pop(true);
+                    },
+                  )
+                ],
+              ),
+            ),
+            onWillPop: () {}));
   }
   }
 }
 }
 
 
@@ -113,7 +132,7 @@ class MyFloat extends StatelessWidget {
                 InkWell(
                 InkWell(
                   child: Image.asset('images/icon_inter_000.png'),
                   child: Image.asset('images/icon_inter_000.png'),
                   onTap: () {
                   onTap: () {
-                    Navigator.of(context).pop();
+                    Navigator.of(context).pop(true);
                   },
                   },
                 )
                 )
               ],
               ],

+ 115 - 36
lib/pages/HomePage.dart

@@ -1,7 +1,9 @@
 import 'package:flutter/material.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/services.dart';
 import 'package:flutter/services.dart';
 import 'package:wanna_battle/model/PlayerInfo.dart';
 import 'package:wanna_battle/model/PlayerInfo.dart';
+import 'package:shared_preferences/shared_preferences.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:flutter/cupertino.dart';
+import 'package:wanna_battle/model/PopNotice.dart';
 import 'GuidePage.dart';
 import 'GuidePage.dart';
 import 'MatchPage.dart';
 import 'MatchPage.dart';
 import 'RankList.dart';
 import 'RankList.dart';
@@ -13,6 +15,9 @@ import 'RoomInfo.dart';
 import '../styles/totast.dart';
 import '../styles/totast.dart';
 import 'dart:async';
 import 'dart:async';
 import 'dart:ui';
 import 'dart:ui';
+import '../model/PhoneInfo.dart';
+import 'PhoneLogin.dart';
+import '../model/PopNotice.dart';
 
 
 class HomePage extends StatefulWidget {
 class HomePage extends StatefulWidget {
   @override
   @override
@@ -22,6 +27,53 @@ class HomePage extends StatefulWidget {
 class _HomePageState extends State<HomePage> with SingleTickerProviderStateMixin {
 class _HomePageState extends State<HomePage> with SingleTickerProviderStateMixin {
   TabController controller;
   TabController controller;
   bool isFirst = true;
   bool isFirst = true;
+  bool showPage = false;
+  List<PhoneInfo> phoneList;
+  List<PopNotice> popNoticeList;
+
+  Future<bool> getPhoneInfo() async {
+    List<PhoneInfo> _phoneList = [];
+    Result res = await HttpManager.get('phoneInfo/all');
+    if (res.success && res.data != null) {
+      for (var item in res.data) {
+        PhoneInfo phone = PhoneInfo.fromJson(item);
+        _phoneList.add(phone);
+      }
+      setState(() {
+        phoneList = _phoneList;
+      });
+    }
+
+    final prefs = await SharedPreferences.getInstance();
+    var now = new DateTime.now();
+    var timeStr = now.year.toString() + '/' + now.month.toString() + '/' + now.day.toString();
+    prefs.setString('showPhoneInfo', timeStr);
+
+    bool reslt = await Navigator.of(context).push(
+      PageRouteBuilder(
+        opaque: false,
+        transitionDuration: Duration(milliseconds: 300),
+        transitionsBuilder: (BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation, Widget child) {
+          return FadeTransition(
+            opacity: CurvedAnimation(parent: animation, curve: Curves.linear),
+            child: child,
+          );
+        },
+        pageBuilder: (BuildContext context, _, __) {
+          return PhoneLogin(
+            // text: '部分手机自动设置了省电策略,会将我们的app在游戏进程中从后台停掉,为了你的正常比赛,请点击你的手机型号查看具体设置',
+            phoneList: phoneList,
+          );
+        },
+      ),
+    );
+
+    if (reslt != null && reslt) {
+      return true;
+    } else {
+      return false;
+    }
+  }
 
 
   Future<void> checkErrorPlayerInfo() async {
   Future<void> checkErrorPlayerInfo() async {
     final Result res = await HttpManager.get('playerInfo/getErrorPlayerInfo');
     final Result res = await HttpManager.get('playerInfo/getErrorPlayerInfo');
@@ -52,7 +104,23 @@ class _HomePageState extends State<HomePage> with SingleTickerProviderStateMixin
       }
       }
     } else {
     } else {
       //引导页
       //引导页
-      // showGruide();
+      popNoticeList = [];
+      Result res = await HttpManager.get('popNotice/all');
+      if (res.success) {
+        for (var item in res.data) {
+          popNoticeList.add(PopNotice.fromJson(item));
+        }
+      }
+
+      final prefs = await SharedPreferences.getInstance();
+      var now = new DateTime.now();
+      var timeStr = now.year.toString() + '/' + now.month.toString() + '/' + now.day.toString();
+      bool show = false;
+      if (prefs.getString('showPhoneInfo') != timeStr) {
+        await getPhoneInfo();
+      }
+
+      showGruide(context, popNoticeList);
     }
     }
   }
   }
 
 
@@ -60,8 +128,8 @@ class _HomePageState extends State<HomePage> with SingleTickerProviderStateMixin
   void initState() {
   void initState() {
     super.initState();
     super.initState();
     controller = new TabController(length: 3, vsync: this);
     controller = new TabController(length: 3, vsync: this);
-    Future.delayed(Duration.zero, () {
-      checkErrorPlayerInfo();
+    Future.delayed(Duration.zero, () async {
+      await checkErrorPlayerInfo();
     });
     });
   }
   }
 
 
@@ -74,13 +142,16 @@ class _HomePageState extends State<HomePage> with SingleTickerProviderStateMixin
   @override
   @override
   Widget build(BuildContext context) {
   Widget build(BuildContext context) {
     return Scaffold(
     return Scaffold(
+        backgroundColor: Color(0xFF2E3049),
         body: WillPopScope(
         body: WillPopScope(
           child: Container(
           child: Container(
             color: Color(0xFF2E3049),
             color: Color(0xFF2E3049),
-            child: new MyTabBarView(
-              controller: controller,
-              children: <Widget>[MatchPage(), RankList(), UserPage()],
-            ),
+            child: showPage
+                ? MyTabBarView(
+                    controller: controller,
+                    children: <Widget>[MatchPage(), RankList(), UserPage()],
+                  )
+                : Container(),
           ),
           ),
           onWillPop: () async {
           onWillPop: () async {
             if (isFirst) {
             if (isFirst) {
@@ -95,39 +166,41 @@ class _HomePageState extends State<HomePage> with SingleTickerProviderStateMixin
             }
             }
           },
           },
         ),
         ),
-        bottomNavigationBar: new Container(
-          color: Color(0xFF23253C),
-          height: 49,
-          child: new MyTabBar(
-            controller: controller,
-            labelColor: Theme.of(context).primaryColor,
-            unselectedLabelColor: Color(0xFF46496C),
-            indicatorColor: Color(0xFF171721),
-            labelPadding: EdgeInsets.zero,
-            labelStyle: TextStyle(fontSize: 11, height: 1),
-            tabs: <Widget>[
-              new MyTab(
-                text: "赛事",
-                icon: ImageIcon(AssetImage('images/tabbar_icon_01_pre.png'), size: 28),
-              ),
-              MyTab(
-                text: "排行",
-                icon: ImageIcon(AssetImage('images/tabbar_icon_02.png'), size: 28),
-              ),
-              new MyTab(
-                text: "我的",
-                icon: ImageIcon(AssetImage('images/tabbar_icon_03.png'), size: 28),
-              ),
-            ],
-          ),
-        )
+        bottomNavigationBar: showPage
+            ? Container(
+                color: Color(0xFF23253C),
+                height: 49,
+                child: MyTabBar(
+                  controller: controller,
+                  labelColor: Theme.of(context).primaryColor,
+                  unselectedLabelColor: Color(0xFF46496C),
+                  indicatorColor: Color(0xFF171721),
+                  labelPadding: EdgeInsets.zero,
+                  labelStyle: TextStyle(fontSize: 11, height: 1),
+                  tabs: <Widget>[
+                    MyTab(
+                      text: "赛事",
+                      icon: ImageIcon(AssetImage('images/tabbar_icon_01_pre.png'), size: 28),
+                    ),
+                    MyTab(
+                      text: "排行",
+                      icon: ImageIcon(AssetImage('images/tabbar_icon_02.png'), size: 28),
+                    ),
+                    MyTab(
+                      text: "我的",
+                      icon: ImageIcon(AssetImage('images/tabbar_icon_03.png'), size: 28),
+                    ),
+                  ],
+                ),
+              )
+            : Container()
         // floatingActionButton: floatWidget(),
         // floatingActionButton: floatWidget(),
         // floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
         // floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
         );
         );
   }
   }
 
 
-  void showGruide() {
-    Navigator.of(context).push(PageRouteBuilder(
+  Future<void> showGruide(BuildContext context, List<PopNotice> popNoticeList) async {
+    bool res = await Navigator.of(context).push(PageRouteBuilder(
         opaque: false,
         opaque: false,
         transitionDuration: Duration(milliseconds: 300),
         transitionDuration: Duration(milliseconds: 300),
         transitionsBuilder: (BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation, Widget child) {
         transitionsBuilder: (BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation, Widget child) {
@@ -137,7 +210,13 @@ class _HomePageState extends State<HomePage> with SingleTickerProviderStateMixin
           );
           );
         },
         },
         pageBuilder: (BuildContext context, _, __) {
         pageBuilder: (BuildContext context, _, __) {
-          return GuidePage();
+          return GuidePage(popNoticeList);
         }));
         }));
+
+    if (res != null && res) {
+      setState(() {
+        showPage = true;
+      });
+    }
   }
   }
 }
 }

+ 1 - 12
lib/pages/HomePage1.dart

@@ -129,18 +129,7 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
       getUnreadMsg();
       getUnreadMsg();
       checkErrorPlayerInfo();
       checkErrorPlayerInfo();
 
 
-      Navigator.of(context).push(PageRouteBuilder(
-          opaque: false,
-          transitionDuration: Duration(milliseconds: 300),
-          transitionsBuilder: (BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation, Widget child) {
-            return FadeTransition(
-              opacity: CurvedAnimation(parent: animation, curve: Curves.linear),
-              child: child,
-            );
-          },
-          pageBuilder: (BuildContext context, _, __) {
-            return GuidePage();
-          }));
+      
     });
     });
   }
   }
 
 

+ 4 - 145
lib/pages/MatchPage.dart

@@ -21,8 +21,8 @@ import 'dart:convert';
 import 'dart:ui';
 import 'dart:ui';
 import 'dart:math';
 import 'dart:math';
 import 'SelectRoom.dart';
 import 'SelectRoom.dart';
-import 'PhotoView.dart';
 import '../model/PhoneInfo.dart';
 import '../model/PhoneInfo.dart';
+import 'PhoneLogin.dart';
 
 
 class MatchPage extends StatefulWidget {
 class MatchPage extends StatefulWidget {
   @override
   @override
@@ -214,7 +214,7 @@ class _MatchPageState extends State<MatchPage> with WidgetsBindingObserver {
           );
           );
         },
         },
         pageBuilder: (BuildContext context, _, __) {
         pageBuilder: (BuildContext context, _, __) {
-          return LoadingDialog(
+          return PhoneLogin(
             // text: '部分手机自动设置了省电策略,会将我们的app在游戏进程中从后台停掉,为了你的正常比赛,请点击你的手机型号查看具体设置',
             // text: '部分手机自动设置了省电策略,会将我们的app在游戏进程中从后台停掉,为了你的正常比赛,请点击你的手机型号查看具体设置',
             phoneList: phoneList,
             phoneList: phoneList,
           );
           );
@@ -254,12 +254,7 @@ class _MatchPageState extends State<MatchPage> with WidgetsBindingObserver {
       getBannerInfo();
       getBannerInfo();
       getGame();
       getGame();
       getRoomInfo();
       getRoomInfo();
-      final prefs = await SharedPreferences.getInstance();
-      var now = new DateTime.now();
-      var timeStr = now.year.toString() + '/' + now.month.toString() + '/' + now.day.toString();
-      if (prefs.getString('showPhoneInfo') != timeStr) {
-        getPhoneInfo();
-      }
+      
       if (timer != null) {
       if (timer != null) {
         timer.cancel();
         timer.cancel();
       }
       }
@@ -518,7 +513,7 @@ class _MatchPageState extends State<MatchPage> with WidgetsBindingObserver {
                         return Text(isFinish ? '更多房间敬请期待...' : '加载中...',
                         return Text(isFinish ? '更多房间敬请期待...' : '加载中...',
                             style: TextStyle(color: Colors.grey, fontSize: 13, height: 3), textAlign: TextAlign.center);
                             style: TextStyle(color: Colors.grey, fontSize: 13, height: 3), textAlign: TextAlign.center);
                       }
                       }
-                      return HouseItem(houseList[index], houseList[index].gameInfo, isNext: !_focusNode.hasFocus, onTapHomeMenu: () {
+                      return HouseItem(houseList[index], houseList[index].gameInfo, isHome: true, isNext: !_focusNode.hasFocus, onTapHomeMenu: () {
                         setState(() {
                         setState(() {
                           _focusNode.unfocus();
                           _focusNode.unfocus();
                         });
                         });
@@ -591,139 +586,3 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
 }
 }
 
 
 typedef OnTapHomeMenu = void Function();
 typedef OnTapHomeMenu = void Function();
-
-class LoadingDialog extends Dialog {
-  final List<PhoneInfo> phoneList;
-
-  LoadingDialog({Key key, this.phoneList = const []}) : super(key: key);
-
-  @override
-  Widget build(BuildContext context) {
-    return WillPopScope(
-      child: Scaffold(
-        backgroundColor: Color(0xCC000000),
-        body: Container(
-          child: SizedBox.expand(
-            child: UnconstrainedBox(
-              child: Container(
-                width: 320,
-                // padding: EdgeInsets.symmetric(horizontal: 20, vertical: 25),
-                height: 380,
-                decoration: BoxDecoration(color: Color(0xFF15151D), border: Border.all(width: 1, color: Theme.of(context).primaryColor)),
-                child: Stack(
-                  children: <Widget>[
-                    Padding(
-                      padding: EdgeInsets.symmetric(horizontal: 20, vertical: 25),
-                      child: Column(
-                        mainAxisAlignment: MainAxisAlignment.center,
-                        children: <Widget>[
-                          Text.rich(TextSpan(style: TextStyle(color: Colors.white, fontSize: 14), children: [
-                            TextSpan(text: '欢迎来到杀戮的世界!您的手机可能设置了'),
-                            TextSpan(text: '“省电策略”', style: TextStyle(color: Color(0xFFFFB726), fontWeight: FontWeight.w600)),
-                            TextSpan(text: ',为了不影响您的游戏体验,请在游戏前,先选择您的手机品牌,跟着说明正确的配置手机')
-                          ])),
-                          // Container(
-                          //   height: 30,
-                          // ),
-                          Container(
-                              width: double.infinity,
-                              height: 180,
-                              margin: EdgeInsets.fromLTRB(0, 0, 0, 20),
-                              child: GridView.builder(
-                                  gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
-                                      crossAxisCount: 2, //每行三列
-                                      childAspectRatio: 3.0 //显示区域宽高相等
-                                      ),
-                                  itemCount: phoneList.length,
-                                  itemBuilder: (context, index) {
-                                    //如果显示到最后一个并且Icon总数小于200时继续获取数据
-
-                                    return InkWell(
-                                      child: Container(
-                                        margin: EdgeInsets.all(5),
-                                        color: Colors.white,
-                                        child: Row(
-                                          mainAxisAlignment: MainAxisAlignment.center,
-                                          children: <Widget>[
-                                            Image.network(
-                                              phoneList[index].icon,
-                                              width: 20,
-                                            ),
-                                            Container(
-                                              width: 5,
-                                            ),
-                                            Text(phoneList[index].phone)
-                                          ],
-                                        ),
-                                      ),
-                                      onTap: () async {
-                                        var list = phoneList[index].image.split(',');
-                                        final bool res = await Navigator.of(context).push(
-                                          PageRouteBuilder(
-                                            opaque: false,
-                                            transitionDuration: Duration(milliseconds: 300),
-                                            transitionsBuilder:
-                                                (BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation, Widget child) {
-                                              return FadeTransition(
-                                                opacity: CurvedAnimation(parent: animation, curve: Curves.linear),
-                                                child: child,
-                                              );
-                                            },
-                                            pageBuilder: (BuildContext context, _, __) {
-                                              return PhotoView(imageList: list);
-                                            },
-                                          ),
-                                        );
-                                        if (res != null && res) {
-                                          Navigator.of(context).pop();
-                                        }
-                                      },
-                                    );
-                                  })),
-                          Container(
-                            child: LinearButton(
-                              btntext: '关闭',
-                              btnHeight: 36.0,
-                              colorList: [Color(0xFF271A21), Color(0xFF271A21)],
-                              textColor: Color(0xFFD4504B),
-                              textWeight: FontWeight.w400,
-                              onTapHomeMenu: () {
-                                Navigator.of(context).pop();
-                              },
-                            ),
-                          ),
-                          // Container(
-                          //   height: 5,
-                          // )
-                        ],
-                      ),
-                    ),
-                    Positioned(
-                      top: 0,
-                      left: 0,
-                      child: Image.asset(
-                        'images/tancuang_shang.png',
-                        // width: 131,
-                      ),
-                    ),
-                    Positioned(
-                      bottom: 0,
-                      right: 4,
-                      child: Image.asset(
-                        'images/tancuang_xia.png',
-                        // width: 148,
-                      ),
-                    ),
-                  ],
-                ),
-              ),
-            ),
-          ),
-        ),
-      ),
-      onWillPop: () {
-        return Future.value(false);
-      },
-    );
-  }
-}

+ 231 - 76
lib/pages/MyCode.dart

@@ -1,5 +1,7 @@
 import 'package:flutter/material.dart';
 import 'package:flutter/material.dart';
+import 'package:flutter/material.dart' as prefix0;
 import 'package:flutter/rendering.dart';
 import 'package:flutter/rendering.dart';
+import 'package:flutter/rendering.dart' as prefix1;
 import 'dart:ui';
 import 'dart:ui';
 import 'dart:typed_data';
 import 'dart:typed_data';
 import 'dart:async';
 import 'dart:async';
@@ -14,7 +16,11 @@ import 'dart:io';
 import 'package:path_provider/path_provider.dart';
 import 'package:path_provider/path_provider.dart';
 import '../widget/Dialog.dart';
 import '../widget/Dialog.dart';
 import '../net/HttpManager.dart';
 import '../net/HttpManager.dart';
-
+import '../styles/totast.dart';
+import '../net/Result.dart';
+import '../model/ChannelInfo.dart';
+import 'package:image_gallery_saver/image_gallery_saver.dart';
+import 'package:permission_handler/permission_handler.dart';
 
 
 class MyCode extends StatefulWidget {
 class MyCode extends StatefulWidget {
   @override
   @override
@@ -22,12 +28,13 @@ class MyCode extends StatefulWidget {
 }
 }
 
 
 class MyCodeState extends State<MyCode> {
 class MyCodeState extends State<MyCode> {
+  ChannelInfo channelInfo;
+
   GlobalKey globalKey = new GlobalKey();
   GlobalKey globalKey = new GlobalKey();
 
 
   // 截图boundary,并且返回图片的二进制数据。
   // 截图boundary,并且返回图片的二进制数据。
   Future<Uint8List> _capturePng() async {
   Future<Uint8List> _capturePng() async {
-    RenderRepaintBoundary boundary =
-        globalKey.currentContext.findRenderObject();
+    RenderRepaintBoundary boundary = globalKey.currentContext.findRenderObject();
     ui.Image image = await boundary.toImage();
     ui.Image image = await boundary.toImage();
     // 注意:png是压缩后格式,如果需要图片的原始像素数据,请使用rawRgba
     // 注意:png是压缩后格式,如果需要图片的原始像素数据,请使用rawRgba
     ByteData byteData = await image.toByteData(format: ui.ImageByteFormat.png);
     ByteData byteData = await image.toByteData(format: ui.ImageByteFormat.png);
@@ -41,93 +48,241 @@ class MyCodeState extends State<MyCode> {
     return path;
     return path;
   }
   }
 
 
+  Future<void> getChannelInfo() async {
+    Toast.show(context, '加载中', -1, 'loading');
+    Result res = await HttpManager.get('channelInfo/getOne', data: {'id': StoreProvider.of<AppState>(context).state.userInfo.channel});
+    Toast.hide();
+    if (res.success) {
+      setState(() {
+        channelInfo = ChannelInfo.fromJson(res.data);
+      });
+    }
+  }
+
+  @override
+  void initState() {
+    super.initState();
+
+    Future.delayed(Duration.zero, () => getChannelInfo());
+  }
+
   @override
   @override
   Widget build(BuildContext context) {
   Widget build(BuildContext context) {
     AppBar appbar = AppBar(title: Text('我的推广码'), centerTitle: true);
     AppBar appbar = AppBar(title: Text('我的推广码'), centerTitle: true);
-    double _height = MediaQuery.of(context).size.height -
-        MediaQueryData.fromWindow(window).padding.top -
-        appbar.preferredSize.height;
+    double _height = MediaQuery.of(context).size.height - MediaQueryData.fromWindow(window).padding.top - appbar.preferredSize.height;
 
 
     return StoreConnector<AppState, UserInfo>(
     return StoreConnector<AppState, UserInfo>(
         converter: (Store store) => store.state.userInfo,
         converter: (Store store) => store.state.userInfo,
         builder: (context, userInfo) {
         builder: (context, userInfo) {
-          String qrstr =HttpManager.baseUrl+"share?userId=${userInfo.id}&channel=${userInfo.channel}";
+          String qrstr = HttpManager.baseUrl + "share?userId=${userInfo.id}&channel=${userInfo.channel}";
           // final cryptor = new PlatformStringCryptor();
           // final cryptor = new PlatformStringCryptor();
-          return RepaintBoundary(
-              key: globalKey,
-              child: Scaffold(
-                  appBar: appbar,
-                  body: Container(
-                    color: Color(0xFF2B2B42),
-                    height: double.infinity,
-                    width: double.infinity,
-                    child: SingleChildScrollView(
-                      child: Container(
-                        height: _height - 60,
-                        constraints: BoxConstraints(minHeight: 543),
-                        margin:
-                            EdgeInsets.symmetric(vertical: 30, horizontal: 30),
-                        color: Color(0xFF363759),
-                        child: Column(
-                          mainAxisAlignment: MainAxisAlignment.center,
-                          children: <Widget>[
-                            Container(height: 36),
-                            Image.asset('images/text_yonghuduan.png'),
-                            Container(height: 25),
-                            Container(
-                              width: 150,
-                              height: 150,
-                              color: Colors.white,
-                              // padding: EdgeInsets.all(7),
-                              child: QrImage(
-                                data: qrstr,
-                                size: 150.0,
-                              ),
-                            ),
-                            Container(
-                              height: 10,
-                            ),
-                            Text(
-                              '扫一扫下载APP',
-                              style: TextStyle(
+          return Scaffold(
+              appBar: appbar,
+              body: Container(
+                color: Color(0xFF2B2B42),
+                height: double.infinity,
+                width: double.infinity,
+                child: SingleChildScrollView(
+                  child: Container(
+                    height: _height - 60,
+                    constraints: BoxConstraints(minHeight: 543),
+                    margin: EdgeInsets.symmetric(vertical: 30, horizontal: 30),
+                    color: Color(0xFF363759),
+                    child: Column(
+                      mainAxisAlignment: MainAxisAlignment.center,
+                      children: <Widget>[
+                        RepaintBoundary(
+                          key: globalKey,
+                          child: Container(
+                            width: 256,
+                            color: Color(0xFF363759),
+                            child: Column(
+                              children: <Widget>[
+                                Container(height: 36),
+                                Image.asset('images/text_yonghuduan.png'),
+                                Container(
+                                  height: 7,
+                                ),
+                                Text('扫描二维码加入 ${userInfo.nickname.length <= 5 ? userInfo.nickname : userInfo.nickname.substring(0, 4) + "..."} 的电竞团队',
+                                    style: TextStyle(color: Theme.of(context).primaryColor, fontSize: 14, fontWeight: FontWeight.w600)),
+                                Container(height: 25),
+                                Container(
+                                  width: 150,
+                                  height: 150,
                                   color: Colors.white,
                                   color: Colors.white,
-                                  fontSize: 14,
-                                  fontWeight: FontWeight.w500),
+                                  // padding: EdgeInsets.all(7),
+                                  child: QrImage(
+                                    data: qrstr,
+                                    size: 150.0,
+                                  ),
+                                ),
+                                Container(
+                                  height: 10,
+                                ),
+                                Text(
+                                  '扫一扫下载APP',
+                                  style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500),
+                                ),
+                                Container(
+                                  height: 30,
+                                )
+                              ],
                             ),
                             ),
-                            Container(
-                              margin: EdgeInsets.only(top: 30),
-                              width: 180,
-                              child: LinearButton(
-                                btntext: '立刻邀请',
-                                btnHeight: 44.0,
-                                colorList: [
-                                  Color(0xFFD4504B),
-                                  Color(0xFFD4504B)
-                                ],
-                                onTapHomeMenu: () async {
-                                  MyDialog.showDialog(context, '手动截图立即分享二维码给小伙伴吧!');
-                                  // final Io.Directory systemTempDir =
-                                  //     Io.Directory.systemTemp;
-                                  // final Io.File file = await new Io.File(
-                                  //         '${systemTempDir.path}/temp.png')
-                                  //     .create();
-                                  // print(file);
-                                  // List<int> bytes = await _capturePng();
-                                  // await file.writeAsBytes(bytes);
-                                  // print('保存成功');
+                          ),
+                        ),
+
+                        // Text(
+                        //   channelInfo != null ? '一级队员:每购买一张就会获得${1 * 10 * channelInfo.ratio}' : '',
+                        //   style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500),
+                        // ),
+                        // Text(
+                        //   channelInfo != null ? '二级队员:每购买一张就会获得${1 * 10 * channelInfo.ratio2}' : '',
+                        //   style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500),
+                        // ),
+                        Container(
+                          // margin: EdgeInsets.only(top: 30),
+                          width: 180,
+                          child: LinearButton(
+                            btntext: '立刻邀请',
+                            btnHeight: 44.0,
+                            colorList: [Color(0xFFD4504B), Color(0xFFD4504B)],
+                            onTapHomeMenu: () async {
+                              var permission = PermissionHandler().checkPermissionStatus(PermissionGroup.storage);
+                              await PermissionHandler().requestPermissions(<PermissionGroup>[
+                                PermissionGroup.storage, // 在这里添加需要的权限
+                              ]);
+                              // MyDialog.showDialog(context, '手动截图立即分享二维码给小伙伴吧!');
+                              Uint8List val = await _capturePng();
+                              print(val);
+                              final result = await ImageGallerySaver.saveImage(val);
+                              print(result);
+                              Toast.show(context, '保存成功', 1500, 'success');
+                            },
+                          ),
+                        ),
+                        Container(
+                          height: 13,
+                        ),
+                        InkWell(
+                          onTap: () {
+                            Navigator.of(context).push(PageRouteBuilder(
+                                opaque: false,
+                                transitionDuration: Duration(milliseconds: 300),
+                                transitionsBuilder: (BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation, Widget child) {
+                                  return FadeTransition(
+                                    opacity: CurvedAnimation(parent: animation, curve: Curves.linear),
+                                    child: child,
+                                  );
                                 },
                                 },
+                                pageBuilder: (BuildContext context, _, __) {
+                                  return Rule(0.1*channelInfo.ratio,0.1*channelInfo.ratio2);
+                                }));
+                          },
+                          child: Row(
+                            mainAxisAlignment: MainAxisAlignment.center,
+                            children: <Widget>[
+                              Text(
+                                '查看推广奖励规则',
+                                style: TextStyle(color: Theme.of(context).primaryColor),
                               ),
                               ),
-                            ),
-                            Expanded(
-                              flex: 1,
-                              child: Container(),
-                            ),
-                            Image.asset('images/img_0000.png'),
-                          ],
+                              Image.asset('images/icon_inter_hongse.png')
+                            ],
+                          ),
                         ),
                         ),
-                      ),
+
+                        Expanded(
+                          flex: 1,
+                          child: Container(),
+                        ),
+                        Image.asset('images/img_0000.png'),
+                      ],
                     ),
                     ),
-                  )));
+                  ),
+                ),
+              ));
         });
         });
   }
   }
 }
 }
+class Rule extends Dialog {
+  Rule(this.ratio,this.ratio2);
+  double ratio;
+  double ratio2;
+  @override
+  Widget build(BuildContext context) {
+    return WillPopScope(
+      child: Scaffold(
+        backgroundColor: Color(0xCC000000),
+        body: Container(
+          child: SizedBox.expand(
+            child: UnconstrainedBox(
+              child: Container(
+                width: 280,
+                // padding: EdgeInsets.symmetric(horizontal: 20, vertical: 25),
+                decoration: BoxDecoration(color: Color(0xFF15151D), border: Border.all(width: 1, color: Theme.of(context).primaryColor)),
+                child: Stack(
+                  children: <Widget>[
+                    Padding(
+                      padding: EdgeInsets.symmetric(horizontal: 16, vertical: 25),
+                      child: Column(
+                        mainAxisAlignment: MainAxisAlignment.center,
+                        children: <Widget>[
+                          Text('推广奖励规则', style: TextStyle(color: Colors.white, fontSize: 18, fontWeight: FontWeight.w600)),
+                          Container(
+                            height: 20,
+                          ),
+                          Text('1、扫描该二维码下载APP的用户成为您的一级成员,可以在“我的团队”中查看 ', style: TextStyle(color: Colors.white, fontSize: 14)),
+                          Container(
+                            height: 20,
+                          ),
+                          Text('2、团队一级成员在APP中每购买一张参赛券,您就可以获得${ratio}个积分 ', style: TextStyle(color: Colors.white, fontSize: 14)),
+                          Container(
+                            height: 20,
+                          ),
+                          Text('3、团队二级成员在APP中每购买一张参赛券,您就可以获得${ratio2}个积分 ', style: TextStyle(color: Colors.white, fontSize: 14)),
+                          Container(
+                            height: 35,
+                          ),
+                          Container(
+                              width: double.infinity,
+                              child: LinearButton(
+                                btntext: '确认',
+                                btnHeight: 36.0,
+                                onTapHomeMenu: () {
+                                  Navigator.of(context).pop();
+                                },
+                              )),
+                          Container(
+                            height: 5,
+                          )
+                        ],
+                      ),
+                    ),
+                    Positioned(
+                      top: 0,
+                      left: 0,
+                      child: Image.asset(
+                        'images/tancuang_shang.png',
+                        // width: 131,
+                      ),
+                    ),
+                    Positioned(
+                      bottom: 0,
+                      right: 4,
+                      child: Image.asset(
+                        'images/tancuang_xia.png',
+                        // width: 148,
+                      ),
+                    ),
+                  ],
+                ),
+              ),
+            ),
+          ),
+        ),
+      ),
+      onWillPop: () {
+        return Future.value(false);
+      },
+    );
+  }
+}

+ 1 - 1
lib/pages/MyWallet.dart

@@ -184,7 +184,7 @@ class MyWalletState extends State<MyWallet> {
                         Container(width: 5,),
                         Container(width: 5,),
                         Text('我的参赛券',
                         Text('我的参赛券',
                             style: TextStyle(
                             style: TextStyle(
-                              color: Color(0xFFC2524D),
+                              color: Color(0xFFD4504B),
                               fontSize: 14,
                               fontSize: 14,
                             ))
                             ))
                       ],
                       ],

+ 140 - 0
lib/pages/PhoneLogin.dart

@@ -0,0 +1,140 @@
+import 'package:flutter/material.dart';
+import '../model/PhoneInfo.dart';
+import 'PhotoView.dart';
+import '../widget/LinearButton.dart';
+class PhoneLogin extends Dialog {
+  final List<PhoneInfo> phoneList;
+
+  PhoneLogin({Key key, this.phoneList = const []}) : super(key: key);
+
+  @override
+  Widget build(BuildContext context) {
+    return WillPopScope(
+      child: Scaffold(
+        backgroundColor: Color(0xCC000000),
+        body: Container(
+          child: SizedBox.expand(
+            child: UnconstrainedBox(
+              child: Container(
+                width: 320,
+                // padding: EdgeInsets.symmetric(horizontal: 20, vertical: 25),
+                height: 380,
+                decoration: BoxDecoration(color: Color(0xFF15151D), border: Border.all(width: 1, color: Theme.of(context).primaryColor)),
+                child: Stack(
+                  children: <Widget>[
+                    Padding(
+                      padding: EdgeInsets.symmetric(horizontal: 20, vertical: 25),
+                      child: Column(
+                        mainAxisAlignment: MainAxisAlignment.center,
+                        children: <Widget>[
+                          Text.rich(TextSpan(style: TextStyle(color: Colors.white, fontSize: 14), children: [
+                            TextSpan(text: '欢迎来到杀戮的世界!您的手机可能设置了'),
+                            TextSpan(text: '“省电策略”', style: TextStyle(color: Color(0xFFFFB726), fontWeight: FontWeight.w600)),
+                            TextSpan(text: ',为了不影响您的游戏体验,请在游戏前,先选择您的手机品牌,跟着说明正确的配置手机')
+                          ])),
+                          // Container(
+                          //   height: 30,
+                          // ),
+                          Container(
+                              width: double.infinity,
+                              height: 180,
+                              margin: EdgeInsets.fromLTRB(0, 0, 0, 20),
+                              child: GridView.builder(
+                                  gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
+                                      crossAxisCount: 2, //每行三列
+                                      childAspectRatio: 3.0 //显示区域宽高相等
+                                      ),
+                                  itemCount: phoneList.length,
+                                  itemBuilder: (context, index) {
+                                    //如果显示到最后一个并且Icon总数小于200时继续获取数据
+
+                                    return InkWell(
+                                      child: Container(
+                                        margin: EdgeInsets.all(5),
+                                        color: Colors.white,
+                                        child: Row(
+                                          mainAxisAlignment: MainAxisAlignment.center,
+                                          children: <Widget>[
+                                            Image.network(
+                                              phoneList[index].icon,
+                                              width: 20,
+                                            ),
+                                            Container(
+                                              width: 5,
+                                            ),
+                                            Text(phoneList[index].phone)
+                                          ],
+                                        ),
+                                      ),
+                                      onTap: () async {
+                                        var list = phoneList[index].image.split(',');
+                                        final bool res = await Navigator.of(context).push(
+                                          PageRouteBuilder(
+                                            opaque: false,
+                                            transitionDuration: Duration(milliseconds: 300),
+                                            transitionsBuilder:
+                                                (BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation, Widget child) {
+                                              return FadeTransition(
+                                                opacity: CurvedAnimation(parent: animation, curve: Curves.linear),
+                                                child: child,
+                                              );
+                                            },
+                                            pageBuilder: (BuildContext context, _, __) {
+                                              return PhotoView(imageList: list);
+                                            },
+                                          ),
+                                        );
+                                        if (res != null && res) {
+                                          Navigator.of(context).pop(true);
+                                        }
+                                      },
+                                    );
+                                  })),
+                          Container(
+                            child: LinearButton(
+                              btntext: '关闭',
+                              btnHeight: 36.0,
+                              colorList: [Color(0xFF271A21), Color(0xFF271A21)],
+                              textColor: Color(0xFFD4504B),
+                              textWeight: FontWeight.w400,
+                              onTapHomeMenu: () {
+                                Navigator.of(context).pop(true);
+                              },
+                            ),
+                          ),
+                          // Container(
+                          //   height: 5,
+                          // )
+                        ],
+                      ),
+                    ),
+                    Positioned(
+                      top: 0,
+                      left: 0,
+                      child: Image.asset(
+                        'images/tancuang_shang.png',
+                        // width: 131,
+                      ),
+                    ),
+                    Positioned(
+                      bottom: 0,
+                      right: 4,
+                      child: Image.asset(
+                        'images/tancuang_xia.png',
+                        // width: 148,
+                      ),
+                    ),
+                  ],
+                ),
+              ),
+            ),
+          ),
+        ),
+      ),
+      onWillPop: () {
+      
+        return Future.value(false);
+      },
+    );
+  }
+}

+ 2 - 2
lib/pages/RoomInfo.dart

@@ -1110,7 +1110,7 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
           height: 88,
           height: 88,
           child: LinearButton(btntext: '房间已经开始,加入通道关闭', colorList: [Color(0xFFB34A4A), Color(0xFFB34A4A)], textColor: Color(0xFF252532))
           child: LinearButton(btntext: '房间已经开始,加入通道关闭', colorList: [Color(0xFFB34A4A), Color(0xFFB34A4A)], textColor: Color(0xFF252532))
           // RaisedButton(
           // RaisedButton(
-          //   disabledColor: Color(0xFFC2524D),
+          //   disabledColor: Color(0xFFD4504B),
           //   disabledTextColor: Color(0xFF252532),
           //   disabledTextColor: Color(0xFF252532),
           //   child: Text(
           //   child: Text(
           //     '房间已经开始,加入通道关闭',
           //     '房间已经开始,加入通道关闭',
@@ -1183,7 +1183,7 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
           height: 88,
           height: 88,
           child: LinearButton(btntext: '正在努力解析视频中', colorList: [Color(0xFFB34A4A), Color(0xFFB34A4A)], textColor: Color(0xFF252532))
           child: LinearButton(btntext: '正在努力解析视频中', colorList: [Color(0xFFB34A4A), Color(0xFFB34A4A)], textColor: Color(0xFF252532))
           //   RaisedButton(
           //   RaisedButton(
-          //   disabledColor: Color(0xFFC2524D),
+          //   disabledColor: Color(0xFFD4504B),
           //   disabledTextColor: Color(0xFF252532),
           //   disabledTextColor: Color(0xFF252532),
           //   child: Text(
           //   child: Text(
           //     '正在努力解析视频中',
           //     '正在努力解析视频中',

+ 1 - 1
lib/pages/SecondRoomInfo.dart

@@ -90,7 +90,7 @@ class SecondPageState extends State<SecondPage> {
           controller: _perController,
           controller: _perController,
           itemCount: joinList.length + 2,
           itemCount: joinList.length + 2,
           itemBuilder: (BuildContext context, int index) {
           itemBuilder: (BuildContext context, int index) {
-            if (index == 0) {
+            if (index == 0 && widget.houseInfo.customerService!=null) {
               return Container(
               return Container(
                   width: double.infinity,
                   width: double.infinity,
                   height: 60,
                   height: 60,

+ 15 - 8
lib/pages/Setting.dart

@@ -4,6 +4,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
 import 'package:jpush_flutter/jpush_flutter.dart';
 import 'package:jpush_flutter/jpush_flutter.dart';
 import 'package:package_info/package_info.dart';
 import 'package:package_info/package_info.dart';
 import 'package:shared_preferences/shared_preferences.dart';
 import 'package:shared_preferences/shared_preferences.dart';
+import 'ChangePassword.dart';
 import '../styles/colors.dart';
 import '../styles/colors.dart';
 import 'dart:async';
 import 'dart:async';
 import 'dart:ui';
 import 'dart:ui';
@@ -67,6 +68,12 @@ class SettingState extends State<Setting> {
                       physics: AlwaysScrollableScrollPhysics(),
                       physics: AlwaysScrollableScrollPhysics(),
                       child: Column(
                       child: Column(
                         children: <Widget>[
                         children: <Widget>[
+                          _sectionDivier(),
+                          _section([
+                            _cell('修改密码', ' ', onTap: () {
+                           Navigator.push(context, MaterialPageRoute(builder: (context) => ChangePassword()));
+                            })
+                          ]),
                           _sectionDivier(),
                           _sectionDivier(),
                           _section([
                           _section([
                             _cell(
                             _cell(
@@ -115,14 +122,14 @@ class SettingState extends State<Setting> {
                     ),
                     ),
                   ),
                   ),
                 ),
                 ),
-                floatingActionButton: Container(
-                  height: 100,
-                  padding: EdgeInsets.symmetric(vertical: 30),
-                  child: Column(
-                    children: <Widget>[Text('Copyright©2019',style:TextStyle(color: Colors.white30,fontSize: 12)), Text('盛世明越(海南)科技有限公',style:TextStyle(color: Colors.white30,fontSize: 12))],
-                  ),
-                ),
-                floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
+                // floatingActionButton: Container(
+                //   height: 100,
+                //   padding: EdgeInsets.symmetric(vertical: 30),
+                //   child: Column(
+                //     children: <Widget>[Text('Copyright©2019',style:TextStyle(color: Colors.white30,fontSize: 12)), Text('盛世明越(海南)科技有限公',style:TextStyle(color: Colors.white30,fontSize: 12))],
+                //   ),
+                // ),
+                // floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
               ),
               ),
               onWillPop: () {
               onWillPop: () {
                 Toast.hide();
                 Toast.hide();

+ 11 - 3
lib/pages/ShoppingMall.dart

@@ -126,7 +126,7 @@ class RechargeState extends State<Recharge> {
             itemCount: productInfoList.length,
             itemCount: productInfoList.length,
             itemBuilder: (BuildContext context, int index) {
             itemBuilder: (BuildContext context, int index) {
               bool isChoose = false;
               bool isChoose = false;
-              if (chooseProduct!=null&&productInfoList[index].id == chooseProduct.id) {
+              if (chooseProduct != null && productInfoList[index].id == chooseProduct.id) {
                 isChoose = true;
                 isChoose = true;
               }
               }
               return Container(
               return Container(
@@ -147,13 +147,16 @@ class RechargeState extends State<Recharge> {
                           child: Row(
                           child: Row(
                             mainAxisAlignment: MainAxisAlignment.center,
                             mainAxisAlignment: MainAxisAlignment.center,
                             children: <Widget>[
                             children: <Widget>[
-                              Text(productInfoList[index].productName, style: TextStyle(color: productInfoList[index].canUse?Color(0xFFFFFFFF):Color(0xFF666666), fontWeight: FontWeight.w500, fontSize: 15)),
+                              Text(productInfoList[index].productName,
+                                  style: TextStyle(
+                                      color: productInfoList[index].canUse ? Color(0xFFFFFFFF) : Color(0xFF666666), fontWeight: FontWeight.w500, fontSize: 15)),
                               Container(
                               Container(
                                 width: 10,
                                 width: 10,
                               ),
                               ),
                               Text(
                               Text(
                                 '¥' + productInfoList[index].money.toString(),
                                 '¥' + productInfoList[index].money.toString(),
-                                style: TextStyle(color: productInfoList[index].canUse?Color(0xFF727785):Color(0xFF666666), fontWeight: FontWeight.w400, fontSize: 14),
+                                style: TextStyle(
+                                    color: productInfoList[index].canUse ? Color(0xFF727785) : Color(0xFF666666), fontWeight: FontWeight.w400, fontSize: 14),
                               )
                               )
                             ],
                             ],
                           ),
                           ),
@@ -188,6 +191,11 @@ class RechargeState extends State<Recharge> {
           textColor: Colors.white,
           textColor: Colors.white,
           child: Text('立即充值'),
           child: Text('立即充值'),
           onPressed: () async {
           onPressed: () async {
+            if (chooseProduct == null) {
+              Toast.show(context, '请选择充值的门票', 1500, 'info');
+              return;
+            }
+
             Navigator.push(context, CupertinoPageRoute(builder: (context) => ChoosePay(widget.type, chooseProduct)));
             Navigator.push(context, CupertinoPageRoute(builder: (context) => ChoosePay(widget.type, chooseProduct)));
             // Toast.show(context, '加载中', -1, 'loading');
             // Toast.show(context, '加载中', -1, 'loading');
             // final Result res = await HttpManager.post('productInfo/buy', data: {
             // final Result res = await HttpManager.post('productInfo/buy', data: {

+ 8 - 8
lib/pages/UserPage.dart

@@ -171,14 +171,14 @@ class _UserPageState extends State<UserPage> with WidgetsBindingObserver {
                       Navigator.push(context, CupertinoPageRoute(builder: (context) => RecordList()));
                       Navigator.push(context, CupertinoPageRoute(builder: (context) => RecordList()));
                     }),
                     }),
                     Divder(),
                     Divder(),
-                    DrawerMenu(
-                      'images/icon_bangding.png',
-                      '游戏绑定',
-                      onTap: () {
-                        Navigator.push(context, CupertinoPageRoute(builder: (context) => BindGame()));
-                      },
-                    ),
-                    Divder(),
+                    // DrawerMenu(
+                    //   'images/icon_bangding.png',
+                    //   '游戏绑定',
+                    //   onTap: () {
+                    //     Navigator.push(context, CupertinoPageRoute(builder: (context) => BindGame()));
+                    //   },
+                    // ),
+                    // Divder(),
                     DrawerMenu(
                     DrawerMenu(
                       'images/icon_tuandui.png',
                       'images/icon_tuandui.png',
                       '我的团队',
                       '我的团队',

+ 1 - 1
lib/pages/VideoPlayer.dart

@@ -21,7 +21,7 @@ class _VideoPlayerPageState extends State<VideoPlayerPage> {
 
 
     if (widget.videoUrl != '' && widget.videoUrl != null) {
     if (widget.videoUrl != '' && widget.videoUrl != null) {
       if (widget.fileType == 'netWork') {
       if (widget.fileType == 'netWork') {
-        String url = widget.videoUrl.replaceAll('/var', 'http://123.58.240.138:8080');
+        String url = widget.videoUrl.replaceAll('/var', 'http://202.79.174.56:8206');
         _defalutUrl = url;
         _defalutUrl = url;
         isNet = true;
         isNet = true;
       } else {
       } else {

+ 1 - 1
lib/styles/colors.dart

@@ -1,7 +1,7 @@
 import 'package:flutter/material.dart';
 import 'package:flutter/material.dart';
 
 
 //主颜色
 //主颜色
-const PRIMARY_COLOR = Color(0xFFC2524D);
+const PRIMARY_COLOR = Color(0xFFD4504B);
 
 
 //辅助色
 //辅助色
 const SUB_COLOR = Color(0xFFA6554F);
 const SUB_COLOR = Color(0xFFA6554F);

+ 9 - 4
lib/widget/HouseItem.dart

@@ -10,7 +10,7 @@ import 'dart:ui';
 typedef void OnTapHomeMenu();
 typedef void OnTapHomeMenu();
 
 
 class HouseItem extends StatelessWidget {
 class HouseItem extends StatelessWidget {
-  HouseItem(this.houseInfo, this.gameInfo, {this.playerInfo = null, this.isNext = true, this.onTapHomeMenu, this.onBack, this.onNext});
+  HouseItem(this.houseInfo, this.gameInfo, {this.playerInfo = null, this.isNext = true, this.onTapHomeMenu, this.onBack, this.onNext, this.isHome = false});
   HouseInfo houseInfo;
   HouseInfo houseInfo;
   GameInfo gameInfo;
   GameInfo gameInfo;
   PlayerInfo playerInfo;
   PlayerInfo playerInfo;
@@ -18,6 +18,7 @@ class HouseItem extends StatelessWidget {
   OnTapHomeMenu onTapHomeMenu;
   OnTapHomeMenu onTapHomeMenu;
   OnTapHomeMenu onBack;
   OnTapHomeMenu onBack;
   OnTapHomeMenu onNext;
   OnTapHomeMenu onNext;
+  bool isHome;
 
 
   List<String> imageList = ['images/img_fangjian_hong.png', 'images/img_fangjian_huise.png'];
   List<String> imageList = ['images/img_fangjian_hong.png', 'images/img_fangjian_huise.png'];
 
 
@@ -30,14 +31,18 @@ class HouseItem extends StatelessWidget {
             color: Colors.transparent,
             color: Colors.transparent,
             child: InkWell(
             child: InkWell(
                 onTap: () async {
                 onTap: () async {
-                  print('aaaaaaa');
                   if (!isNext) {
                   if (!isNext) {
                     onTapHomeMenu();
                     onTapHomeMenu();
                   } else {
                   } else {
-                    onNext();
+                    if (isHome) {
+                      onNext();
+                    }
+
                     bool res = await Navigator.push(context, CupertinoPageRoute(builder: (context) => RoomInfo(roomId: houseInfo.id.toString())));
                     bool res = await Navigator.push(context, CupertinoPageRoute(builder: (context) => RoomInfo(roomId: houseInfo.id.toString())));
                     if (res != null && res) {
                     if (res != null && res) {
-                      onBack();
+                      if (isHome) {
+                        onBack();
+                      }
                     }
                     }
                   }
                   }
                   //
                   //

+ 2 - 2
lib/widget/LinearButton.dart

@@ -15,12 +15,12 @@ class LinearButton extends StatelessWidget {
   LinearButton(
   LinearButton(
       {this.btntext = '',
       {this.btntext = '',
       this.onTapHomeMenu,
       this.onTapHomeMenu,
-      this.colorList = const [Color(0xFFC2524D), Color(0xFFC2524D)],
+      this.colorList = const [Color(0xFFD4504B), Color(0xFFD4504B)],
       this.btnHeight = 48.0,
       this.btnHeight = 48.0,
       this.childWidget,
       this.childWidget,
       this.textColor = Colors.white,
       this.textColor = Colors.white,
       this.textSize = 16.0,
       this.textSize = 16.0,
-      this.radius = 4.0,
+      this.radius = 0.0,
       this.textWeight=FontWeight.w600});
       this.textWeight=FontWeight.w600});
 
 
   @override
   @override

+ 1 - 1
lib/widget/SuccessfulReception.dart

@@ -55,7 +55,7 @@ class SuccessfulReceptionState extends State<SuccessfulReception> {
                       Container(
                       Container(
                         height: 25,
                         height: 25,
                       ),
                       ),
-                      Text('恭喜你获得${widget.money}积分', style: TextStyle(color: Color(0xFFC2524D), fontSize: 18, fontWeight: FontWeight.w600)),
+                      Text('恭喜你获得${widget.money}积分', style: TextStyle(color: Color(0xFFD4504B), fontSize: 18, fontWeight: FontWeight.w600)),
                       Container(
                       Container(
                         height: 44,
                         height: 44,
                       ),
                       ),

+ 14 - 0
pubspec.lock

@@ -326,6 +326,13 @@ packages:
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
     version: "1.0.2"
     version: "1.0.2"
+  image_gallery_saver:
+    dependency: "direct main"
+    description:
+      name: image_gallery_saver
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.2.0"
   image_picker:
   image_picker:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
@@ -452,6 +459,13 @@ packages:
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
     version: "1.5.0"
     version: "1.5.0"
+  permission_handler:
+    dependency: "direct main"
+    description:
+      name: permission_handler
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "3.2.2"
   photo_view:
   photo_view:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:

+ 2 - 0
pubspec.yaml

@@ -43,6 +43,8 @@ dependencies:
   image_picker: ^0.6.0+4
   image_picker: ^0.6.0+4
   get_ip: ^0.3.0
   get_ip: ^0.3.0
   photo_view: ^0.3.3
   photo_view: ^0.3.3
+  image_gallery_saver: ^1.2.0
+  permission_handler: ^3.0.1
   fluwx:
   fluwx:
     git:
     git:
       url: https://github.com/x1ongzhu/fluwx.git
       url: https://github.com/x1ongzhu/fluwx.git

+ 1 - 1
screen_stream_plugin/android/src/main/java/com/izouma/screen_stream_plugin/VideoProcessService.java

@@ -104,7 +104,7 @@ public class VideoProcessService extends Service implements ImageAvailableListen
                             e.printStackTrace();
                             e.printStackTrace();
                         }
                         }
                         try {
                         try {
-                            String uploadId = new MultipartUploadRequest(VideoProcessService.this, "http://117.81.233.142:8206/playerInfo/uploadVideo")
+                            String uploadId = new MultipartUploadRequest(VideoProcessService.this, "http://202.79.174.56:8206/playerInfo/uploadVideo")
                                     .addFileToUpload(imageAvailableListener.getVideoPath(), "video")
                                     .addFileToUpload(imageAvailableListener.getVideoPath(), "video")
                                     // .addFileToUpload("/storage/emulated/0/Android/data/com.izouma.mobilecybergames/files/record/record1553655902913.flv", "video")
                                     // .addFileToUpload("/storage/emulated/0/Android/data/com.izouma.mobilecybergames/files/record/record1553655902913.flv", "video")
                                     .addParameter("id", String.valueOf(playerInfoId))
                                     .addParameter("id", String.valueOf(playerInfoId))

+ 1 - 1
screen_stream_plugin/android/src/main/res/drawable/bg_dialog.xml

@@ -3,5 +3,5 @@
     <solid android:color="#FF15151D" />
     <solid android:color="#FF15151D" />
     <stroke
     <stroke
         android:width="1dp"
         android:width="1dp"
-        android:color="#FFC2524D" />
+        android:color="#FFD4504B" />
 </shape>
 </shape>

+ 2 - 2
screen_stream_plugin/android/src/main/res/layout/dialog.xml

@@ -28,7 +28,7 @@
             android:layout_width="wrap_content"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginTop="20dp"
             android:layout_marginTop="20dp"
-            android:text="是否立即返回全民电竞APP"
+            android:text="是否立即返回电竞APP"
             android:textColor="@android:color/white" />
             android:textColor="@android:color/white" />
 
 
         <LinearLayout
         <LinearLayout
@@ -54,7 +54,7 @@
                 android:layout_width="100dp"
                 android:layout_width="100dp"
                 android:layout_height="36dp"
                 android:layout_height="36dp"
                 android:layout_marginLeft="20dp"
                 android:layout_marginLeft="20dp"
-                android:background="#FFC2524D"
+                android:background="#FFD4504B"
                 android:padding="0dp"
                 android:padding="0dp"
                 android:text="确认"
                 android:text="确认"
                 android:textColor="@android:color/white"
                 android:textColor="@android:color/white"