Ver Fonte

B版本更新

panhui há 6 anos atrás
pai
commit
66c9f9a16d

BIN
images/2x/icon_jifen.png


BIN
images/2x/img_guangmang.png


BIN
images/2x/img_guangmang1.png


BIN
images/2x/iocn_dajiafen.png


BIN
images/3x/icon_jifen.png


BIN
images/3x/img_guangmang.png


BIN
images/3x/img_guangmang1.png


BIN
images/3x/iocn_dajiafen.png


BIN
images/icon_jifen.png


BIN
images/img_guangmang.png


BIN
images/img_guangmang1.png


BIN
images/iocn_dajiafen.png


+ 2 - 1
lib/model/PhoneInfo.dart

@@ -4,10 +4,11 @@ part 'PhoneInfo.g.dart';
 
 @JsonSerializable()
 class PhoneInfo {
-  PhoneInfo(this.id, this.phone, this.image);
+  PhoneInfo(this.id, this.phone, this.image,this.icon);
   int id;
   String phone;//手机型号
   String image;//图标
+  String icon;//icon
   factory PhoneInfo.fromJson(Map<String, dynamic> json) =>
       _$PhoneInfoFromJson(json);
 

+ 4 - 2
lib/model/PhoneInfo.g.dart

@@ -10,11 +10,13 @@ PhoneInfo _$PhoneInfoFromJson(Map<String, dynamic> json) {
   return PhoneInfo(
       json['id'] as int,
       json['phone'] as String,
-      json['image'] as String);
+      json['image'] as String,
+      json['icon'] as String);
 }
 
 Map<String, dynamic> _$PhoneInfoToJson(PhoneInfo instance) => <String, dynamic>{
       'id': instance.id,
       'phone': instance.phone,
-      'image': instance.image
+      'image': instance.image,
+      'icon':instance.icon
     };

+ 12 - 12
lib/model/UserInfo.dart

@@ -4,8 +4,8 @@ part 'UserInfo.g.dart';
 
 @JsonSerializable()
 class UserInfo {
-  UserInfo(this.id, this.nickname, this.username, this.icon, this.phone,
-      this.sex, this.moneyCoin, this.moneyPoint,this.birthday,this.noticeFlag,this.remindFlag,this.createFlag,this.houseCard,this.recommender,this.levelId,this.moneyTicket,this.channel);
+  UserInfo(this.id, this.nickname, this.username, this.icon, this.phone, this.sex, this.moneyCoin, this.moneyPoint, this.birthday, this.noticeFlag,
+      this.remindFlag, this.createFlag, this.houseCard, this.recommender, this.levelId, this.moneyTicket, this.channel, this.rank);
   int id;
   String nickname;
   String username;
@@ -15,16 +15,16 @@ class UserInfo {
   double moneyCoin; //余额
   double moneyPoint; //积分
   int birthday;
-  bool noticeFlag;//是否通知
-   bool remindFlag;//是否通知
-   bool createFlag;//创建房间权限
-   int houseCard;
-   int recommender;//上级ID
-   int levelId;//用户级别ID
-   int moneyTicket;//门票数量
-   int channel;//渠道ID
-  factory UserInfo.fromJson(Map<String, dynamic> json) =>
-      _$UserInfoFromJson(json);
+  bool noticeFlag; //是否通知
+  bool remindFlag; //是否通知
+  bool createFlag; //创建房间权限
+  int houseCard;
+  int recommender; //上级ID
+  int levelId; //用户级别ID
+  int moneyTicket; //门票数量
+  int channel; //渠道ID
+  int rank; //排名
+  factory UserInfo.fromJson(Map<String, dynamic> json) => _$UserInfoFromJson(json);
 
   Map<String, dynamic> toJson() => _$UserInfoToJson(this);
 

+ 4 - 2
lib/model/UserInfo.g.dart

@@ -24,7 +24,8 @@ UserInfo _$UserInfoFromJson(Map<String, dynamic> json) {
       json['recommender'] as int,
       json['levelId'] as int,
       json['moneyTicket'] as int,
-      json['channel'] as int);
+      json['channel'] as int,
+      json['rank']!=null?json['rank'] as int : 0);
 }
 
 Map<String, dynamic> _$UserInfoToJson(UserInfo instance) => <String, dynamic>{
@@ -44,5 +45,6 @@ Map<String, dynamic> _$UserInfoToJson(UserInfo instance) => <String, dynamic>{
       'recommender': instance.recommender,
       'levelId': instance.levelId,
       'moneyTicket': instance.moneyTicket,
-      'channel':instance.channel
+      'channel': instance.channel,
+      'rank': instance.rank != null ? instance.rank : 0
     };

+ 123 - 84
lib/pages/CompetitionInformation.dart

@@ -1,10 +1,12 @@
 import 'package:flutter/material.dart';
 import 'package:flutter_swiper/flutter_swiper.dart';
+import 'package:wanna_battle/model/HouseInfo.dart';
 import '../widget/LinearButton.dart';
 
 //竞赛须知
 class CompetitionInformation extends StatefulWidget {
-  CompetitionInformation();
+  HouseInfo houseInfo;
+  CompetitionInformation({this.houseInfo});
   @override
   CompetitionInformationState createState() => CompetitionInformationState();
 }
@@ -32,11 +34,12 @@ class CompetitionInformationState extends State<CompetitionInformation> {
                     itemHeight: 422.0,
                     control: SwiperControl(color: Theme.of(context).primaryColor, disableColor: Colors.transparent),
                     index: nowSwiperIndex,
-                    itemCount: 3,
+                    itemCount: 1,
                     scrollDirection: Axis.horizontal,
                     loop: false,
                     itemBuilder: (context, index) {
                       return InfoBox(
+                          killNum: widget.houseInfo.killnumber,
                           typeIndex: index + 1,
                           next: () {
                             _swiperController.next();
@@ -56,10 +59,11 @@ class CompetitionInformationState extends State<CompetitionInformation> {
 typedef OnTapHomeMenu = void Function();
 
 class InfoBox extends StatelessWidget {
-  InfoBox({Key key, this.typeIndex, this.next, this.end}) : super(key: key);
+  InfoBox({Key key, this.typeIndex, this.next, this.end, this.killNum}) : super(key: key);
   final int typeIndex;
   final OnTapHomeMenu next;
   final OnTapHomeMenu end;
+  final int killNum;
 
   @override
   Widget build(BuildContext context) {
@@ -75,7 +79,12 @@ class InfoBox extends StatelessWidget {
             padding: EdgeInsets.only(top: 25),
             child: Column(
               children: <Widget>[
-                Text('竞赛须知 ' + typeIndex.toString() + '/3', style: TextStyle(color: Color(0xFFC2524D), fontSize: 20, fontWeight: FontWeight.w600)),
+                Text('注意啦!', style: TextStyle(color: Color(0xFFC2524D), fontSize: 20, fontWeight: FontWeight.w600)),
+                Container(height: 10,),
+                Text(
+                  '本次任务:游戏中最短时间内杀戮${killNum}人',
+                  style: TextStyle(color: Color(0xFFFFB726), fontSize: 13, fontWeight: FontWeight.w500),
+                ),
                 _centerContent(typeIndex, context)
               ],
             ),
@@ -88,6 +97,14 @@ class InfoBox extends StatelessWidget {
               // width: 131,
             ),
           ),
+          Positioned(
+            top:-72,
+            left: 16,
+            child: Image.asset(
+              'images/img_guangmang.png',
+              // width: 148,
+            ),
+          ),
           Positioned(
             bottom: 0,
             right: 4,
@@ -97,7 +114,7 @@ class InfoBox extends StatelessWidget {
             ),
           ),
           Positioned(
-            bottom: 15,
+            bottom:0,
             left: 25,
             child: Column(
               children: <Widget>[
@@ -105,8 +122,8 @@ class InfoBox extends StatelessWidget {
                     width: 220,
                     height: 36,
                     child: LinearButton(
-                      btntext: typeIndex != 3 ? '下一个' : '知道了',
-                      onTapHomeMenu: typeIndex != 3 ? next : end,
+                      btntext: typeIndex != 1 ? '下一个' : '知道了',
+                      onTapHomeMenu: typeIndex != 1 ? next : end,
                     )
                     //  RaisedButton(
                     //   textColor: Colors.white,
@@ -114,18 +131,20 @@ class InfoBox extends StatelessWidget {
                     //   onPressed: typeIndex != 4 ? next : end,
                     // ),
                     ),
-               typeIndex!=3? FlatButton(
-                  textColor: Color(0xFF727785),
-                  highlightColor: Colors.transparent,
-                  splashColor: Colors.transparent,
-                  child: Text('关闭'),
-                  onPressed: () {
-                    end();
-                  },
-                ):Container(
-                  width: 10,
-                  height: 43,
-                )
+                typeIndex != 1
+                    ? FlatButton(
+                        textColor: Color(0xFF727785),
+                        highlightColor: Colors.transparent,
+                        splashColor: Colors.transparent,
+                        child: Text('关闭'),
+                        onPressed: () {
+                          end();
+                        },
+                      )
+                    : Container(
+                        width: 10,
+                        height: 43,
+                      )
               ],
             ),
           )
@@ -159,107 +178,127 @@ class InfoBox extends StatelessWidget {
     //       ],
     //     ),
     //   );
-    // } else 
+    // } else
+    // if (index == 1) {
+    //   useContent = Container(
+    //     margin: EdgeInsets.only(top: 20),
+    //     padding: EdgeInsets.symmetric(horizontal: 20),
+    //     child: Column(
+    //       children: <Widget>[
+    //         Image.asset('images/img_xuzhi_02.png', width: 136),
+    //         Container(
+    //           height: 10,
+    //         ),
+    //         Text.rich(
+    //             TextSpan(children: [
+    //               TextSpan(
+    //                 text: '竞赛开始前请在此耐心等待,在开始时会有上图所示弹窗,',
+    //                 style: _text,
+    //               ),
+    //               TextSpan(
+    //                 text: '玩家必须在10秒内点击确认',
+    //                 style: TextStyle(color: Color(0xFFFFB726), fontSize: 14, fontWeight: FontWeight.w500),
+    //               ),
+    //               TextSpan(
+    //                 text: ',否则视为放弃此次竞赛,已支付参赛券概不退换',
+    //                 style: _text,
+    //               )
+    //             ]),
+    //             textAlign: TextAlign.center)
+    //       ],
+    //     ),
+    //   );
+    // } else if (index == 2) {
+    //   useContent = Container(
+    //     margin: EdgeInsets.only(top: 20),
+    //     padding: EdgeInsets.symmetric(horizontal: 20),
+    //     child: Column(
+    //       children: <Widget>[
+    //         Image.asset('images/img_xuzhi_03.png', width: 176),
+    //         Container(
+    //           height: 10,
+    //         ),
+    //         Text.rich(
+    //             TextSpan(children: [
+    //               TextSpan(
+    //                 text: '确认竞赛后会有弹窗提示授权进行录屏的操作,请一定',
+    //                 style: _text,
+    //               ),
+    //               TextSpan(
+    //                 text: '点击“确定”',
+    //                 style: TextStyle(color: Color(0xFFFFB726), fontSize: 14, fontWeight: FontWeight.w500),
+    //               ),
+    //               TextSpan(
+    //                 text: '或',
+    //                 style: _text,
+    //               ),
+    //               TextSpan(
+    //                 text: '“允许”',
+    //                 style: TextStyle(color: Color(0xFFFFB726), fontSize: 14, fontWeight: FontWeight.w500),
+    //               ),
+    //               TextSpan(
+    //                 text: '此操作,否则竞赛判定失败',
+    //                 style: _text,
+    //               )
+    //             ]),
+    //             textAlign: TextAlign.center)
+    //       ],
+    //     ),
+    //   );
+    // } else
     if (index == 1) {
       useContent = Container(
         margin: EdgeInsets.only(top: 20),
         padding: EdgeInsets.symmetric(horizontal: 20),
         child: Column(
           children: <Widget>[
-            Image.asset('images/img_xuzhi_02.png', width: 136),
+            Image.asset('images/img_xuzhi_04.png', width: 216),
             Container(
               height: 10,
             ),
             Text.rich(
                 TextSpan(children: [
                   TextSpan(
-                    text: '竞赛开始前请在此耐心等待,在开始时会有上图所示弹窗,',
+                    text: '游戏开始后,将会',
                     style: _text,
                   ),
                   TextSpan(
-                    text: '玩家必须在10秒内点击确认',
-                    style: TextStyle(color: Color(0xFFFFB726), fontSize: 14, fontWeight: FontWeight.w500),
+                    text: '自动',
+                    style: TextStyle(color: Color(0xFFFFB726), fontSize: 14, fontWeight: FontWeight.w600),
                   ),
                   TextSpan(
-                    text: ',否则视为放弃此次竞赛,已支付参赛券概不退换',
-                    style: _text,
-                  )
-                ]),
-                textAlign: TextAlign.center)
-          ],
-        ),
-      );
-    } else if (index == 2) {
-      useContent = Container(
-        margin: EdgeInsets.only(top: 20),
-        padding: EdgeInsets.symmetric(horizontal: 20),
-        child: Column(
-          children: <Widget>[
-            Image.asset('images/img_xuzhi_03.png', width: 176),
-            Container(
-              height: 10,
-            ),
-            Text.rich(
-                TextSpan(children: [
-                  TextSpan(
-                    text: '确认竞赛后会有弹窗提示授权进行录屏的操作,请一定',
+                    text: '启动《和平精英》游戏,在任何模式中',
                     style: _text,
                   ),
                   TextSpan(
-                    text: '点击“确定”',
-                    style: TextStyle(color: Color(0xFFFFB726), fontSize: 14, fontWeight: FontWeight.w500),
+                    text: '最快杀戮3人',
+                    style: TextStyle(color: Color(0xFFFFB726), fontSize: 14, fontWeight: FontWeight.w600),
                   ),
                   TextSpan(
-                    text: '或',
+                    text: '后(具体人数参见房间内信息),',
                     style: _text,
                   ),
                   TextSpan(
-                    text: '“允许”',
-                    style: TextStyle(color: Color(0xFFFFB726), fontSize: 14, fontWeight: FontWeight.w500),
+                    text: '千万记得',
+                    style: TextStyle(color: Color(0xFFFFB726), fontSize: 14, fontWeight: FontWeight.w600),
                   ),
                   TextSpan(
-                    text: '此操作,否则竞赛判定失败',
-                    style: _text,
-                  )
-                ]),
-                textAlign: TextAlign.center)
-          ],
-        ),
-      );
-    } else if (index == 3) {
-      useContent = Container(
-        margin: EdgeInsets.only(top: 20),
-        padding: EdgeInsets.symmetric(horizontal: 20),
-        child: Column(
-          children: <Widget>[
-            Image.asset('images/img_xuzhi_04.png', width: 216),
-            Container(
-              height: 10,
-            ),
-            Text.rich(
-                TextSpan(children: [
-                  TextSpan(
-                    text: '进入《和平精英》游戏,',
+                    text: '完成杀人目标后立刻点击',
                     style: _text,
                   ),
                   TextSpan(
-                    text: '在任何模式中,击杀1-3人后(具体人数参见房间内信息),',
-                    style: TextStyle(color:Color(0xFFFFB726), fontSize: 14, fontWeight: FontWeight.w600),
+                    text: '悬浮窗',
+                    style: TextStyle(color: Color(0xFFFFB726), fontSize: 14, fontWeight: FontWeight.w600),
                   ),
                   TextSpan(
-                    text: '立刻点击悬浮窗返回游戏,并点击',
+                    text: '返回房间,取最快的',
                     style: _text,
                   ),
                   TextSpan(
-                    text: '“完成比赛”',
-                    style: TextStyle(color:Color(0xFFFFB726), fontSize: 14, fontWeight: FontWeight.w600),
-                  ),
-                  TextSpan(
-                    text: '。最快完成的三位选手,获得1、2、3名。',
-                    style: _text,
+                    text: '前三名',
+                    style: TextStyle(color: Color(0xFFFFB726), fontSize: 14, fontWeight: FontWeight.w600),
                   )
-                ]),
-                textAlign: TextAlign.center)
+                ]),)
           ],
         ),
       );

+ 17 - 6
lib/pages/HomePage.dart

@@ -1,4 +1,5 @@
 import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
 import 'package:wanna_battle/model/PlayerInfo.dart';
 import 'package:flutter/cupertino.dart';
 import 'GuidePage.dart';
@@ -8,10 +9,10 @@ import '../widget/BottomTabs.dart';
 import 'UserPage.dart';
 import '../net/HttpManager.dart';
 import '../net/Result.dart';
-import '../widget/Dialog.dart';
-import 'Appeal.dart';
-import '../model/HouseInfo.dart';
 import 'RoomInfo.dart';
+import '../styles/totast.dart';
+import 'dart:async';
+import 'dart:ui';
 
 class HomePage extends StatefulWidget {
   @override
@@ -20,6 +21,7 @@ class HomePage extends StatefulWidget {
 
 class _HomePageState extends State<HomePage> with SingleTickerProviderStateMixin {
   TabController controller;
+  bool isFirst = true;
 
   Future<void> checkErrorPlayerInfo() async {
     final Result res = await HttpManager.get('playerInfo/getErrorPlayerInfo');
@@ -41,7 +43,7 @@ class _HomePageState extends State<HomePage> with SingleTickerProviderStateMixin
           context,
           CupertinoPageRoute(
             builder: (context) => RoomInfo(
-                  roomId:res1.data['id'].toString(),
+                  roomId: res1.data['id'].toString(),
                   // playerInfo: playerInfo,
                   // interrupted: true,
                 ),
@@ -80,8 +82,17 @@ class _HomePageState extends State<HomePage> with SingleTickerProviderStateMixin
               children: <Widget>[MatchPage(), RankList(), UserPage()],
             ),
           ),
-          onWillPop: () {
-            return Future.value(true);
+          onWillPop: () async {
+            if (isFirst) {
+              isFirst = false;
+              Toast.show(context, '再次点击退出程序', 1000, 'info');
+              Timer(Duration(seconds: 1), () {
+                isFirst = true;
+              });
+              return Future.value(false);
+            } else {
+              return await SystemChannels.platform.invokeMethod('SystemNavigator.pop');
+            }
           },
         ),
         bottomNavigationBar: new Container(

+ 282 - 236
lib/pages/MatchPage.dart

@@ -1,4 +1,6 @@
 import 'package:flutter/material.dart';
+import 'package:flutter/material.dart' as prefix0;
+import 'package:flutter/painting.dart';
 import 'package:flutter_swiper/flutter_swiper.dart';
 import 'package:shared_preferences/shared_preferences.dart';
 import 'package:flutter/cupertino.dart';
@@ -20,7 +22,6 @@ import 'dart:convert';
 import 'dart:ui';
 import 'dart:math';
 import 'SelectRoom.dart';
-import 'package:flutter/services.dart';
 import 'PhotoView.dart';
 import '../model/PhoneInfo.dart';
 
@@ -40,9 +41,27 @@ class _MatchPageState extends State<MatchPage> with WidgetsBindingObserver {
   ScrollController _controller;
   List<GameInfo> gameList = [];
   String gameName = '全部游戏';
-  bool isFirst = true;
   FocusNode _focusNode = new FocusNode();
   List<PhoneInfo> phoneList = [];
+  int tipNum = 0;
+
+  Future<void> getUnreadMsg() async {
+    Result res = await HttpManager.get('systemNotice/unread', data: {'userId': StoreProvider.of<AppState>(context).state.userInfo.id, 'statusFlag': 0});
+    if (res.success && res.data != null) {
+      setState(() {
+        tipNum = res.data;
+      });
+      if (res.data > 0) {
+        setState(() {
+          showBadge = true;
+        });
+      } else {
+        setState(() {
+          showBadge = false;
+        });
+      }
+    }
+  }
 
   //展示通知
   void showNotice() {
@@ -96,24 +115,14 @@ class _MatchPageState extends State<MatchPage> with WidgetsBindingObserver {
     } else {}
   }
 
-  Future<void> getUnreadMsg() async {
-    Result res = await HttpManager.get('systemNotice/unread', data: {'userId': StoreProvider.of<AppState>(context).state.userInfo.id, 'statusFlag': 0});
-    if (res.success && res.data != null) {
-      if (res.data > 0) {
-        setState(() {
-          showBadge = true;
-        });
-      } else {
-        setState(() {
-          showBadge = false;
-        });
-      }
-    }
-  }
-
   Future<void> getRoomInfo() async {
     print('获取房间');
-    Map<String, dynamic> data = {'currentPage': currentPage, 'pageNumber': 20, 'myUserId': StoreProvider.of<AppState>(context).state.userInfo.id};
+    Map<String, dynamic> data = {
+      'currentPage': currentPage,
+      'pageNumber': 20,
+      'statusStr': '0,2',
+      'myUserId': StoreProvider.of<AppState>(context).state.userInfo.id
+    };
 
     data['advancedQuery'] = '';
     if (gameId != 0) {
@@ -200,7 +209,7 @@ class _MatchPageState extends State<MatchPage> with WidgetsBindingObserver {
         },
         pageBuilder: (BuildContext context, _, __) {
           return LoadingDialog(
-            text: '部分手机自动设置了省电策略,会将我们的app在游戏进程中从后台停掉,为了你的正常比赛,请点击你的手机型号查看具体设置',
+            // text: '部分手机自动设置了省电策略,会将我们的app在游戏进程中从后台停掉,为了你的正常比赛,请点击你的手机型号查看具体设置',
             phoneList: phoneList,
           );
         },
@@ -225,6 +234,7 @@ class _MatchPageState extends State<MatchPage> with WidgetsBindingObserver {
       }
     });
     Future.delayed(Duration.zero, () async {
+      getUnreadMsg();
       getBannerInfo();
       getGame();
       getRoomInfo();
@@ -237,6 +247,13 @@ class _MatchPageState extends State<MatchPage> with WidgetsBindingObserver {
     });
   }
 
+  @override
+  void didChangeAppLifecycleState(AppLifecycleState state) {
+    if (state == AppLifecycleState.resumed) {
+      getUnreadMsg();
+    }
+  }
+
   @override
   void dispose() {
     super.dispose();
@@ -244,233 +261,249 @@ class _MatchPageState extends State<MatchPage> with WidgetsBindingObserver {
 
   @override
   Widget build(BuildContext context) {
-    return WillPopScope(
-      child: GestureDetector(
-        behavior: HitTestBehavior.translucent,
-        child: Scaffold(
-            appBar: AppBar(
-              title: Text('赛事'),
-              centerTitle: true,
-              leading: Material(
-                color: Colors.transparent,
-                child: Builder(
-                  builder: (context) => InkWell(
-                        onTap: () async {
-                          bool result = await Navigator.push(context, CupertinoPageRoute(builder: (context) => TipList()));
-                          if (result) {
-                            getUnreadMsg();
-                          }
-                        },
-                        child: Image.asset('images/home_icon_xiaoxi.png'),
+    return GestureDetector(
+      behavior: HitTestBehavior.translucent,
+      child: Scaffold(
+          appBar: AppBar(
+            title: Text('赛事'),
+            centerTitle: true,
+            leading: Material(
+              color: Colors.transparent,
+              child: Builder(
+                builder: (context) => InkWell(
+                      onTap: () async {
+                        bool result = await Navigator.push(context, CupertinoPageRoute(builder: (context) => TipList()));
+                        if (result) {
+                          getUnreadMsg();
+                        }
+                      },
+                      child: Container(
+                        width: 30,
+                        height: 30,
+                        child: Stack(
+                          children: <Widget>[
+                            Center(
+                              child: Image.asset('images/home_icon_xiaoxi.png'),
+                            ),
+                            showBadge
+                                ? Positioned(
+                                    right: 10,
+                                    top: 12,
+                                    child: Container(
+                                      padding: EdgeInsets.all(1),
+                                      decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(100))),
+                                      child: Center(
+                                        child: Container(
+                                          padding: EdgeInsets.symmetric(horizontal: 3),
+                                          height: 12,
+                                          decoration: BoxDecoration(color: Color(0xFFD4504B), borderRadius: BorderRadius.all(Radius.circular(12))),
+                                          child: Center(
+                                            child: Text('${tipNum}', style: TextStyle(color: Colors.white, fontSize: 10)),
+                                          ),
+                                        ),
+                                      ),
+                                    ),
+                                  )
+                                : Container()
+                          ],
+                        ),
                       ),
-                ),
+                    ),
               ),
-              actions: <Widget>[
-                Container(
-                  width: 102,
-                  padding: EdgeInsets.all(15),
-                  child: LinearButton(
-                    btntext: '配置帮助',
-                    textColor: Color(0xFF2E3049),
-                    btnHeight: 26.0,
-                    colorList: [Color(0xFFFFB726), Color(0xFFFFB726)],
-                    textSize: 12.0,
-                    onTapHomeMenu: () {
-                      // showNotice();
-                      getPhoneInfo();
-                    },
-                  ),
-                )
-              ],
             ),
-            body: Container(
-              color: Color(0xFF2E3049),
-              height: double.infinity,
-              width: double.infinity,
-              child: RefreshIndicator(
-                color: Theme.of(context).primaryColor,
-                backgroundColor: Colors.white,
-                displacement: 10,
-                onRefresh: () async {
-                  await Future.delayed(const Duration(seconds: 1));
-                  gameId = 0;
-                  currentPage = 1;
-                  searchKey = '';
-                  getRoomInfo();
-                  // getBannerInfo();
-                  getGame();
-                },
-                child: CustomScrollView(
-                  physics: AlwaysScrollableScrollPhysics(),
-                  controller: _controller,
-                  slivers: <Widget>[
-                    SliverToBoxAdapter(
-                      child: Container(
-                        width: double.infinity,
-                        height: 200,
-                        child: new Swiper(
-                            itemBuilder: (BuildContext context, int index) {
-                              return Image.network(
-                                bannerList[index].imageUrl,
-                                fit: BoxFit.fill,
-                              );
-                            },
-                            itemCount: bannerList.length,
-                            loop: false,
-                            autoplay: true,
-                            autoplayDelay: 5000,
-                            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 ? 8 : 3,
-                                        height: 3,
-                                        decoration: BoxDecoration(color: active ? activeColor : color, borderRadius: BorderRadius.all(Radius.circular(3))),
-                                      )),
-                                );
-                              }
-
-                              return Container(
-                                margin: EdgeInsets.only(top: 186),
-                                child: Row(
-                                  mainAxisAlignment: MainAxisAlignment.center,
-                                  children: list,
-                                ),
+            actions: <Widget>[
+              Container(
+                width: 102,
+                padding: EdgeInsets.all(15),
+                child: LinearButton(
+                  btntext: '配置帮助',
+                  textColor: Color(0xFF2E3049),
+                  btnHeight: 26.0,
+                  colorList: [Color(0xFFFFB726), Color(0xFFFFB726)],
+                  textSize: 12.0,
+                  onTapHomeMenu: () {
+                    // showNotice();
+                    getPhoneInfo();
+                  },
+                ),
+              )
+            ],
+          ),
+          body: Container(
+            color: Color(0xFF2E3049),
+            height: double.infinity,
+            width: double.infinity,
+            child: RefreshIndicator(
+              color: Theme.of(context).primaryColor,
+              backgroundColor: Colors.white,
+              displacement: 10,
+              onRefresh: () async {
+                await Future.delayed(const Duration(seconds: 1));
+                gameId = 0;
+                currentPage = 1;
+                searchKey = '';
+                getRoomInfo();
+                // getBannerInfo();
+                getGame();
+              },
+              child: CustomScrollView(
+                physics: AlwaysScrollableScrollPhysics(),
+                controller: _controller,
+                slivers: <Widget>[
+                  SliverToBoxAdapter(
+                    child: Container(
+                      width: double.infinity,
+                      height: 200,
+                      child: new Swiper(
+                          itemBuilder: (BuildContext context, int index) {
+                            return Image.network(
+                              bannerList[index].imageUrl,
+                              fit: BoxFit.fill,
+                            );
+                          },
+                          itemCount: bannerList.length,
+                          loop: false,
+                          autoplay: true,
+                          autoplayDelay: 5000,
+                          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 ? 8 : 3,
+                                      height: 3,
+                                      decoration: BoxDecoration(color: active ? activeColor : color, borderRadius: BorderRadius.all(Radius.circular(3))),
+                                    )),
                               );
-                            })),
-                      ),
+                            }
+
+                            return Container(
+                              margin: EdgeInsets.only(top: 186),
+                              child: Row(
+                                mainAxisAlignment: MainAxisAlignment.center,
+                                children: list,
+                              ),
+                            );
+                          })),
                     ),
-                    SliverPersistentHeader(
-                      pinned: true, //是否固定在顶部
-                      floating: true,
-                      delegate: _SliverAppBarDelegate(
-                          minHeight: 60, //收起的高度
-                          maxHeight: 60, //展开的最大高度
-                          child: InkWell(
-                              onTap: () {
-                                Navigator.push(context, CupertinoPageRoute(builder: (context) => SelectRoom()));
-                              },
+                  ),
+                  SliverPersistentHeader(
+                    pinned: true, //是否固定在顶部
+                    floating: true,
+                    delegate: _SliverAppBarDelegate(
+                        minHeight: 60, //收起的高度
+                        maxHeight: 60, //展开的最大高度
+                        child: InkWell(
+                            onTap: () {
+                              Navigator.push(context, CupertinoPageRoute(builder: (context) => SelectRoom()));
+                            },
+                            child: Container(
+                              color: Color(0xFF2E3049),
+                              height: 60,
+                              padding: EdgeInsets.symmetric(vertical: 10, horizontal: 15),
                               child: Container(
-                                color: Color(0xFF2E3049),
-                                height: 60,
-                                padding: EdgeInsets.symmetric(vertical: 10, horizontal: 15),
-                                child: Container(
-                                  decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(4))),
-                                  child: Row(
-                                    children: <Widget>[
-                                      Container(
-                                        width: 10,
-                                      ),
-                                      ImageIcon(
-                                        AssetImage('images/home_icon_sousuo.png'),
-                                        color: Color(0xFF727785),
-                                      ),
-                                      Expanded(
-                                        flex: 1,
-                                        child: Container(
-                                          decoration: BoxDecoration(
-                                            color: Colors.white,
-                                            borderRadius: BorderRadius.all(Radius.circular(100)),
-                                          ),
-                                          child: Text('搜索竞赛房间', style: TextStyle(color: Color(0xFF9BA0AE), fontSize: 13)),
+                                decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(4))),
+                                child: Row(
+                                  children: <Widget>[
+                                    Container(
+                                      width: 10,
+                                    ),
+                                    ImageIcon(
+                                      AssetImage('images/home_icon_sousuo.png'),
+                                      color: Color(0xFF727785),
+                                    ),
+                                    Expanded(
+                                      flex: 1,
+                                      child: Container(
+                                        decoration: BoxDecoration(
+                                          color: Colors.white,
+                                          borderRadius: BorderRadius.all(Radius.circular(100)),
                                         ),
+                                        child: Text('搜索竞赛房间', style: TextStyle(color: Color(0xFF9BA0AE), fontSize: 13)),
                                       ),
-                                      Container(
-                                        width: 1,
-                                        height: 10,
-                                        color: Color(0xFFB1B5C0),
-                                      ),
-                                      Container(
-                                          width: 99,
-                                          child: Row(
-                                            mainAxisAlignment: MainAxisAlignment.center,
-                                            children: <Widget>[
-                                              Expanded(
-                                                flex: 1,
-                                                child: Container(
-                                                  padding: EdgeInsets.only(left: 5),
-                                                  alignment: Alignment.center,
-                                                  child: Text(
-                                                    gameName,
-                                                    style: TextStyle(color: Color(0xFFB1B5C0)),
-                                                    overflow: TextOverflow.ellipsis,
-                                                  ),
+                                    ),
+                                    Container(
+                                      width: 1,
+                                      height: 10,
+                                      color: Color(0xFFB1B5C0),
+                                    ),
+                                    Container(
+                                        width: 99,
+                                        child: Row(
+                                          mainAxisAlignment: MainAxisAlignment.center,
+                                          children: <Widget>[
+                                            Expanded(
+                                              flex: 1,
+                                              child: Container(
+                                                padding: EdgeInsets.only(left: 5),
+                                                alignment: Alignment.center,
+                                                child: Text(
+                                                  gameName,
+                                                  style: TextStyle(color: Color(0xFFB1B5C0)),
+                                                  overflow: TextOverflow.ellipsis,
                                                 ),
                                               ),
-                                              Image.asset('images/icon_zhankai_huise.png'),
-                                              Container(
-                                                width: 5,
-                                              )
-                                            ],
-                                          ))
-                                    ],
-                                  ),
+                                            ),
+                                            Image.asset('images/icon_zhankai_huise.png'),
+                                            Container(
+                                              width: 5,
+                                            )
+                                          ],
+                                        ))
+                                  ],
                                 ),
-                              ))),
-                    ),
-                    SliverFixedExtentList(
-                      itemExtent: houseList.isEmpty ? 300 : 90,
-                      delegate: SliverChildBuilderDelegate((BuildContext context, int index) {
-                        if (houseList.isEmpty) {
-                          return InkWell(
-                            child: Container(
-                              padding: EdgeInsets.only(top: 105),
-                              child: Column(
-                                children: <Widget>[
-                                  Image.asset('images/icon_kong.png'),
-                                  Text('暂时没有此房间哦~', style: TextStyle(fontSize: 14, color: Theme.of(context).primaryColor.withOpacity(0.3)))
-                                ],
                               ),
+                            ))),
+                  ),
+                  SliverFixedExtentList(
+                    itemExtent: houseList.isEmpty ? 300 : 90,
+                    delegate: SliverChildBuilderDelegate((BuildContext context, int index) {
+                      if (houseList.isEmpty) {
+                        return InkWell(
+                          child: Container(
+                            padding: EdgeInsets.only(top: 105),
+                            child: Column(
+                              children: <Widget>[
+                                Image.asset('images/icon_kong.png'),
+                                Text('暂时没有此房间哦~', style: TextStyle(fontSize: 14, color: Theme.of(context).primaryColor.withOpacity(0.3)))
+                              ],
                             ),
-                            onTap: () {
-                              _focusNode.unfocus();
-                            },
-                          );
-                        } else if (index == houseList.length) {
-                          return Text('更多房间敬请期待...', style: TextStyle(color: Colors.grey, fontSize: 13, height: 3), textAlign: TextAlign.center);
-                        }
-                        return HouseItem(
-                          houseList[index],
-                          houseList[index].gameInfo,
-                          isNext: !_focusNode.hasFocus,
-                          onTapHomeMenu: () {
-                            setState(() {
-                              _focusNode.unfocus();
-                            });
+                          ),
+                          onTap: () {
+                            _focusNode.unfocus();
                           },
                         );
-                      }, childCount: houseList.length + 1),
-                    )
-                  ],
-                ),
+                      } else if (index == houseList.length) {
+                        return Text('更多房间敬请期待...', style: TextStyle(color: Colors.grey, fontSize: 13, height: 3), textAlign: TextAlign.center);
+                      }
+                      return HouseItem(
+                        houseList[index],
+                        houseList[index].gameInfo,
+                        isNext: !_focusNode.hasFocus,
+                        onTapHomeMenu: () {
+                          setState(() {
+                            _focusNode.unfocus();
+                          });
+                        },
+                      );
+                    }, childCount: (houseList.length!=0&& houseList.length<5)?houseList.length : houseList.length + 1),
+                  )
+                ],
               ),
-            )),
-        onTap: () {
-          _focusNode.unfocus();
-        },
-      ),
-      onWillPop: () async {
-        if (isFirst) {
-          isFirst = false;
-          Toast.show(context, '再次点击退出程序', 1000, 'info');
-          Timer(Duration(seconds: 1), () {
-            isFirst = true;
-          });
-          return Future.value(false);
-        } else {
-          return await SystemChannels.platform.invokeMethod('SystemNavigator.pop');
-        }
+            ),
+          )),
+      onTap: () {
+        _focusNode.unfocus();
       },
     );
   }
@@ -516,10 +549,9 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
 typedef OnTapHomeMenu = void Function();
 
 class LoadingDialog extends Dialog {
-  String text;
   final List<PhoneInfo> phoneList;
 
-  LoadingDialog({Key key, @required this.text, this.phoneList = const []}) : super(key: key);
+  LoadingDialog({Key key, this.phoneList = const []}) : super(key: key);
 
   @override
   Widget build(BuildContext context) {
@@ -532,7 +564,7 @@ class LoadingDialog extends Dialog {
               child: Container(
                 width: 320,
                 // padding: EdgeInsets.symmetric(horizontal: 20, vertical: 25),
-                height: 360,
+                height: 380,
                 decoration: BoxDecoration(color: Color(0xFF15151D), border: Border.all(width: 1, color: Theme.of(context).primaryColor)),
                 child: Stack(
                   children: <Widget>[
@@ -541,7 +573,11 @@ class LoadingDialog extends Dialog {
                       child: Column(
                         mainAxisAlignment: MainAxisAlignment.center,
                         children: <Widget>[
-                          Text(text, style: TextStyle(color: Color(0xFFC2524D), fontSize: 14), textAlign: TextAlign.center),
+                          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,
                           // ),
@@ -562,8 +598,18 @@ class LoadingDialog extends Dialog {
                                       child: Container(
                                         margin: EdgeInsets.all(5),
                                         color: Colors.white,
-                                        child: Center(
-                                          child: Text(phoneList[index].phone),
+                                        child: Row(
+                                          mainAxisAlignment: MainAxisAlignment.center,
+                                          children: <Widget>[
+                                            Image.network(
+                                              phoneList[index].icon,
+                                              width: 20,
+                                            ),
+                                            Container(
+                                              width: 5,
+                                            ),
+                                            Text(phoneList[index].phone)
+                                          ],
                                         ),
                                       ),
                                       onTap: () async {

+ 2 - 2
lib/pages/OpenRoom.dart

@@ -381,7 +381,7 @@ class OpenRoomState extends State<OpenRoom> {
                   //房间人数
                   ChooseContent(
                     title: '胜利条件',
-                    val:"杀${editRoomInfo['killnumber']}人模式",
+                    val:"杀${editRoomInfo['killnumber']}人模式",
                     onTapHomeMenu: () {
                       showScoreType(context);
                     },
@@ -542,7 +542,7 @@ class OpenRoomState extends State<OpenRoom> {
   }
 
   void showScoreType(BuildContext context) {
-    List _list = ['杀3人模式', '杀5人模式', '杀10人模式'];
+    List _list = ['杀3人模式', '杀5人模式', '杀10人模式'];
     List _val = [3, 5, 10];
     String PickerData = json.encode(_list);
     Picker(

+ 70 - 76
lib/pages/RankList.dart

@@ -1,4 +1,5 @@
 import 'package:flutter/material.dart';
+import 'package:flutter/widgets.dart';
 import '../styles/colors.dart';
 import 'dart:ui';
 import '../styles/totast.dart';
@@ -10,6 +11,7 @@ import '../redux/AppState.dart';
 import '../model/CompetitionSeason.dart';
 import '../widget/Dialog.dart';
 import 'dart:math';
+import '../model/UserInfo.dart';
 
 class RankList extends StatefulWidget {
   RankList({Key key, this.raceId = 0, this.gameId}) : super(key: key);
@@ -22,23 +24,23 @@ class RankList extends StatefulWidget {
 class RankListState extends State<RankList> {
   String raceName = '2019';
   List raceNameList = ['2019', '2018', '2017'];
-  List<PlayerInfo> rankList = [];
+  List<UserInfo> rankList = [];
   ScrollController _mcontroller;
   bool scrollFlag = true;
   int currentPage = 1;
   int raceId = 0;
   int gameId = 0;
   List<CompetitionSeason> seasonList = [];
-  PlayerInfo myPlayInfo;
+  UserInfo myPlayInfo;
 
   Future<void> getUserRank() async {
-    Result res = await HttpManager.get('playerInfo/seasonUserRank',
-        data: {'seasonId': raceId, 'userId': StoreProvider.of<AppState>(context).state.userInfo.id, 'gameId': gameId});
+    Result res = await HttpManager.get('userInfo/myCoinRank',
+        data: { 'id': StoreProvider.of<AppState>(context).state.userInfo.id, 'gameId': gameId});
     print('*******************************************');
     print(res.data);
     if (res.success && res.data != null) {
       setState(() {
-        myPlayInfo = PlayerInfo.fromJson(res.data);
+        myPlayInfo = UserInfo.fromJson(res.data);
       });
     } else {
       setState(() {
@@ -53,16 +55,16 @@ class RankListState extends State<RankList> {
   Future<void> getListPage() async {
     scrollFlag = false;
     Toast.show(context, '加载中', -1, 'loading');
-    Result res = await HttpManager.get('playerInfo/seasonRankPage', data: {'seasonId': raceId, 'currentPage': currentPage, 'pageNumber': 20});
+    Result res = await HttpManager.get('userInfo/coinRank', data: { 'currentPage': currentPage, 'pageNumber': 20});
     Toast.hide();
-    List<PlayerInfo> list = rankList;
+    List<UserInfo> list = rankList;
     if (currentPage == 1) {
       list = [];
     }
     if (res.success) {
       print(res.data['pp']);
       for (var item in res.data['pp']) {
-        PlayerInfo tip = PlayerInfo.fromJson(item);
+        UserInfo tip = UserInfo.fromJson(item);
         list.add(tip);
       }
       if (res.data['page']['currentPage'] < res.data['page']['totalPage']) {
@@ -156,6 +158,13 @@ class RankListState extends State<RankList> {
   Widget build(BuildContext context) {
     return WillPopScope(
         child: Scaffold(
+          appBar: AppBar(
+              title: Text('排行榜'),
+              centerTitle: true,
+              bottom: PreferredSize(
+                preferredSize: const Size.fromHeight(66),
+                child: myPlayInfo == null ? Container() : RankItem(myPlayInfo, myPlayInfo.rank, height: 66, color: 0xFF23253C, border: false),
+              )),
           body: Container(
             color: BG_SUB_COLOR,
             child: RefreshIndicator(
@@ -169,23 +178,6 @@ class RankListState extends State<RankList> {
                   controller: _mcontroller,
                   physics: AlwaysScrollableScrollPhysics(),
                   slivers: <Widget>[
-                    _sliverAppBar(),
-                    myPlayInfo == null
-                        ? SliverToBoxAdapter()
-                        : SliverPersistentHeader(
-                            pinned: true, //是否固定在顶部
-                            floating: true,
-                            delegate: _SliverAppBarDelegate(
-                                minHeight: 66, //收起的高度
-                                maxHeight: 66, //展开的最大高度
-                                child: RankItem(
-                                  myPlayInfo,
-                                  myPlayInfo.rank,
-                                  height: 66,
-                                  color: 0xFF23253C,
-                                  border:false
-                                )),
-                          ),
                     _sliverList()
                   ],
                 )),
@@ -208,38 +200,38 @@ class RankListState extends State<RankList> {
     return SliverAppBar(
         title: Text('排行榜'),
         centerTitle: true,
-        actions: <Widget>[
-          PopupMenuButton(
-              initialValue: raceId,
-              child: Row(
-                crossAxisAlignment: CrossAxisAlignment.center,
-                mainAxisAlignment: MainAxisAlignment.center,
-                children: <Widget>[
-                  Text(
-                    competitionSeason != null ? competitionSeason.season : '',
-                    style: TextStyle(color: Colors.white, fontSize: 13, fontWeight: FontWeight.w400),
-                  ),
-                  Image.asset(
-                    'images/icon_zhankai_baise.png',
-                    width: 20,
-                  ),
-                  Container(
-                    width: 15,
-                  )
-                ],
-              ),
-              onSelected: (value) {
-                setState(() {
-                  raceId = value;
-                });
-                getUserRank();
-              },
-              itemBuilder: (BuildContext context) {
-                return seasonList.map((choice) {
-                  return PopupMenuItem(child: Text(choice.season), value: choice.id);
-                }).toList();
-              }),
-        ],
+        // actions: <Widget>[
+        //   PopupMenuButton(
+        //       initialValue: raceId,
+        //       child: Row(
+        //         crossAxisAlignment: CrossAxisAlignment.center,
+        //         mainAxisAlignment: MainAxisAlignment.center,
+        //         children: <Widget>[
+        //           Text(
+        //             competitionSeason != null ? competitionSeason.season : '',
+        //             style: TextStyle(color: Colors.white, fontSize: 13, fontWeight: FontWeight.w400),
+        //           ),
+        //           Image.asset(
+        //             'images/icon_zhankai_baise.png',
+        //             width: 20,
+        //           ),
+        //           Container(
+        //             width: 15,
+        //           )
+        //         ],
+        //       ),
+        //       onSelected: (value) {
+        //         setState(() {
+        //           raceId = value;
+        //         });
+        //         getUserRank();
+        //       },
+        //       itemBuilder: (BuildContext context) {
+        //         return seasonList.map((choice) {
+        //           return PopupMenuItem(child: Text(choice.season), value: choice.id);
+        //         }).toList();
+        //       }),
+        // ],
         pinned: true);
   }
 
@@ -305,12 +297,12 @@ class RankListState extends State<RankList> {
                             colors: [Color(0xFFFECF01), Color(0xFFD48E00)],
                           ),
                           boxShadow: [BoxShadow(color: Colors.black12, offset: Offset(2.0, 4.0), blurRadius: 4.0)]),
-                      child: CircleAvatar(backgroundImage: NetworkImage(rankList[0].userInfo.icon))),
+                      child: CircleAvatar(backgroundImage: NetworkImage(rankList[0].icon))),
                 ),
                 Container(
                   padding: EdgeInsets.only(top: 7, bottom: 3),
                   width: 60,
-                  child: Text(rankList[0].userInfo.nickname,
+                  child: Text(rankList[0].nickname,
                       style: TextStyle(color: Color(0xFF2E3049), fontSize: 14), overflow: TextOverflow.ellipsis, textAlign: TextAlign.center),
                 ),
                 Row(
@@ -319,7 +311,7 @@ class RankListState extends State<RankList> {
                       padding: EdgeInsets.only(right: 2),
                       child: Image.asset('images/icon_jinbi_da_bai.png', width: 20),
                     ),
-                    Text(rankList[0].bonus.toString(), style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500))
+                    Text(rankList[0].moneyCoin.toString(), style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500))
                   ],
                 )
               ],
@@ -356,7 +348,7 @@ class RankListState extends State<RankList> {
                                       colors: [Color(0xFFE3E3E3), Color(0xFFC5C5C5)],
                                     ),
                                     boxShadow: [BoxShadow(color: Colors.black12, offset: Offset(2.0, 4.0), blurRadius: 4.0)]),
-                                child: CircleAvatar(backgroundImage: NetworkImage(rankList[1].userInfo.icon))),
+                                child: CircleAvatar(backgroundImage: NetworkImage(rankList[1].icon))),
                           ],
                         ),
                       ),
@@ -364,7 +356,7 @@ class RankListState extends State<RankList> {
                         padding: EdgeInsets.only(top: 7, bottom: 3),
                         width: 60,
                         child: Text(
-                          rankList[1].userInfo.nickname,
+                          rankList[1].nickname,
                           style: TextStyle(color: Color(0xFF2E3049), fontSize: 14),
                           overflow: TextOverflow.ellipsis,
                           textAlign: TextAlign.center,
@@ -376,7 +368,7 @@ class RankListState extends State<RankList> {
                             padding: EdgeInsets.only(right: 2),
                             child: Image.asset('images/icon_jinbi_da_bai.png', width: 20),
                           ),
-                          Text(rankList[1].bonus.toString(), style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500))
+                          Text(rankList[1].moneyCoin.toString(), style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500))
                         ],
                       )
                     ],
@@ -410,14 +402,14 @@ class RankListState extends State<RankList> {
                                   colors: [Color(0xFFF89E58), Color(0xFFE77023)],
                                 ),
                                 boxShadow: [BoxShadow(color: Colors.black12, offset: Offset(2.0, 4.0), blurRadius: 4.0)]),
-                            child: CircleAvatar(backgroundImage: NetworkImage(rankList[2].userInfo.icon))),
+                            child: CircleAvatar(backgroundImage: NetworkImage(rankList[2].icon))),
                       ],
                     ),
                   ),
                   Container(
                     width: 60,
                     padding: EdgeInsets.only(top: 7, bottom: 3),
-                    child: Text(rankList[2].userInfo.nickname,
+                    child: Text(rankList[2].nickname,
                         style: TextStyle(color: Color(0xFF2E3049), fontSize: 14), overflow: TextOverflow.ellipsis, textAlign: TextAlign.center),
                   ),
                   Row(
@@ -426,7 +418,7 @@ class RankListState extends State<RankList> {
                         padding: EdgeInsets.only(right: 2),
                         child: Image.asset('images/icon_jinbi_da_bai.png', width: 20),
                       ),
-                      Text(rankList[2].bonus.toString(), style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500))
+                      Text(rankList[2].moneyCoin.toString(), style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500))
                     ],
                   )
                 ],
@@ -463,8 +455,8 @@ class RankListState extends State<RankList> {
 }
 
 class RankItem extends StatelessWidget {
-  RankItem(this.playerInfo, this.index, {this.color = 0, this.height = 66.0,this.border=true});
-  final PlayerInfo playerInfo;
+  RankItem(this.playerInfo, this.index, {this.color = 0, this.height = 66.0, this.border = true});
+  final UserInfo playerInfo;
   final int index;
   final int color;
   final double height;
@@ -482,7 +474,7 @@ class RankItem extends StatelessWidget {
             color: color == 0 ? Color(0xFF2E3049) : Color(color)),
         child: Container(
           decoration: BoxDecoration(
-            border: Border(bottom: BorderSide(width: border?1:0, color: Colors.black26, style: BorderStyle.solid)),
+            border: Border(bottom: BorderSide(width: border ? 1 : 0, color: Colors.black26, style: BorderStyle.solid)),
           ),
           child: Row(
             children: <Widget>[
@@ -509,18 +501,18 @@ class RankItem extends StatelessWidget {
                 height: 36,
                 margin: EdgeInsets.only(right: 15),
                 child: CircleAvatar(
-                  backgroundImage: NetworkImage(playerInfo.userInfo.icon),
+                  backgroundImage: NetworkImage(playerInfo.icon),
                 ),
               ),
               Expanded(
                 flex: 1,
-                child: Text(playerInfo.userInfo.nickname,
+                child: Text(playerInfo.nickname!=null?playerInfo.nickname:'无名氏',
                     style: TextStyle(color: Theme.of(context).primaryColor, fontSize: 14, height: 1.2), overflow: TextOverflow.ellipsis),
               ),
               // Medal(playerInfo.getPlatinum(), '铂金'),
-              Medal(playerInfo.getGold(), '金牌'),
-              Medal(playerInfo.getSilver(), '银牌'),
-              Medal(playerInfo.getBronze(), '铜牌'),
+              // Medal(playerInfo.getGold(), '金牌'),
+              // Medal(playerInfo.getSilver(), '银牌'),
+              Medal('${playerInfo.moneyCoin}', '积分'),
             ],
           ),
         ));
@@ -547,16 +539,18 @@ class Medal extends StatelessWidget {
     "铂金": {"img": 'images/jiangpai_bojin_xiao.png'},
     "金牌": {"img": 'images/jiangpai_jinpai_xiao.png'},
     "银牌": {"img": 'images/jiangpai_baiyin_xiao.png'},
-    "铜牌": {"img": 'images/jiangpai_qingtong_xiao.png'}
+    "铜牌": {"img": 'images/jiangpai_qingtong_xiao.png'},
+    "积分": {"img": 'images/icon_jifen.png'}
   };
 
   @override
   Widget build(BuildContext context) {
     return Container(
-      width: 41,
+      width: 100,
       child: Row(
         children: <Widget>[
           Image.asset(medalInfo[name]["img"]),
+          Container(width: 5,),
           Text(
             value,
             style: TextStyle(color: Colors.white, fontSize: 14),

+ 2 - 16
lib/pages/RecordList.dart

@@ -1,18 +1,13 @@
 import 'dart:ui';
 import 'package:flutter/material.dart';
-import '../styles/colors.dart';
 import 'package:flutter/cupertino.dart';
 import '../styles/totast.dart';
 import '../model/PlayerInfo.dart';
 import '../net/HttpManager.dart';
 import '../net/Result.dart';
 import '../model/HouseInfo.dart';
-import '../model/GameInfo.dart';
-import '../pages/RoomInfo.dart';
 import 'package:flutter_redux/flutter_redux.dart';
 import '../redux/AppState.dart';
-import '../widget/ScoreType.dart';
-import 'package:cached_network_image/cached_network_image.dart';
 import '../widget/HouseItem.dart';
 class RecordList extends StatefulWidget {
   @override
@@ -39,22 +34,13 @@ class RecordListState extends State<RecordList> with SingleTickerProviderStateMi
     return Scaffold(
         appBar: AppBar(
           // backgroundColor: PRIMARY_COLOR,
-          title: Padding(
-            padding: EdgeInsets.only(right: 56),
-            child: TabBar(
-              controller: _tabController,
-              tabs: myTabs,
-              indicatorColor: Colors.white,
-              labelColor: Colors.white,
-              indicatorSize: TabBarIndicatorSize.label,
-            ),
-          ),
+          title:Text('我的战绩'),
           centerTitle: true,
           elevation: 0,
         ),
         body: Container(
           padding: EdgeInsets.only(top: 10),
-          child: TabBarView(controller: _tabController, children: <Widget>[RecordInfo(0), RecordInfo(1)]),
+          child:  RecordInfo(1),
           color: Color(0xFF2B2B42),
         ));
   }

+ 369 - 0
lib/pages/RecordListOld.dart

@@ -0,0 +1,369 @@
+import 'dart:ui';
+import 'package:flutter/material.dart';
+import '../styles/colors.dart';
+import 'package:flutter/cupertino.dart';
+import '../styles/totast.dart';
+import '../model/PlayerInfo.dart';
+import '../net/HttpManager.dart';
+import '../net/Result.dart';
+import '../model/HouseInfo.dart';
+import '../model/GameInfo.dart';
+import '../pages/RoomInfo.dart';
+import 'package:flutter_redux/flutter_redux.dart';
+import '../redux/AppState.dart';
+import '../widget/ScoreType.dart';
+import 'package:cached_network_image/cached_network_image.dart';
+import '../widget/HouseItem.dart';
+class RecordList extends StatefulWidget {
+  @override
+  RecordListState createState() => RecordListState();
+}
+
+class RecordListState extends State<RecordList> with SingleTickerProviderStateMixin {
+  final List<Tab> myTabs = <Tab>[Tab(text: '我创建的'), Tab(text: '我加入的')];
+  TabController _tabController;
+  @override
+  void initState() {
+    super.initState();
+    _tabController = TabController(length: myTabs.length, vsync: this);
+  }
+
+  @override
+  void dispose() {
+    super.dispose();
+    _tabController.dispose();
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+        appBar: AppBar(
+          // backgroundColor: PRIMARY_COLOR,
+          title: Padding(
+            padding: EdgeInsets.only(right: 56),
+            child: TabBar(
+              controller: _tabController,
+              tabs: myTabs,
+              indicatorColor: Colors.white,
+              labelColor: Colors.white,
+              indicatorSize: TabBarIndicatorSize.label,
+            ),
+          ),
+          centerTitle: true,
+          elevation: 0,
+        ),
+        body: Container(
+          padding: EdgeInsets.only(top: 10),
+          child: TabBarView(controller: _tabController, children: <Widget>[RecordInfo(0), RecordInfo(1)]),
+          color: Color(0xFF2B2B42),
+        ));
+  }
+}
+
+class RecordInfo extends StatefulWidget {
+  int type;
+  RecordInfo(this.type);
+
+  @override
+  RecordInfoState createState() => RecordInfoState();
+}
+
+class RecordInfoState extends State<RecordInfo> {
+  ScrollController _mControll;
+  List<PlayerInfo> playerList = [];
+  List<HouseInfo> houseList = [];
+
+  int currentPage = 1;
+  bool isMore = false;
+  Future<void> getHousePage() async {
+    Result res = await HttpManager.get('houseInfo/page', data: {
+      'userId': StoreProvider.of<AppState>(context).state.userInfo.id,
+      'currentPage': currentPage,
+      'pageNumber': 20,
+      'orderByStr': 'status_flag_,asc'
+    });
+    Toast.hide();
+    List<HouseInfo> list = houseList;
+    if (currentPage == 1) {
+      list = [];
+    }
+    if (res.success) {
+      for (var item in res.data['pp']) {
+        HouseInfo tip = HouseInfo.fromJson(item);
+        list.add(tip);
+      }
+      if (res.data['page']['currentPage'] < res.data['page']['totalPage']) {
+        isMore = true;
+      }
+    } else {}
+    setState(() {
+      houseList = list;
+    });
+  }
+
+  Future<void> getListPage() async {
+    isMore = false;
+    Toast.show(context, '加载中', -1, 'loading');
+    if (widget.type == 0) {
+      getHousePage();
+      return;
+    }
+    Result res = await HttpManager.get('playerInfo/page',
+        data: {'userId': StoreProvider.of<AppState>(context).state.userInfo.id, 'currentPage': currentPage, 'pageNumber': 20});
+    Toast.hide();
+    List<PlayerInfo> list = playerList;
+    if (currentPage == 1) {
+      list = [];
+    }
+    if (res.success) {
+      for (var item in res.data['pp']) {
+        PlayerInfo tip = PlayerInfo.fromJson(item);
+        list.add(tip);
+      }
+      if (res.data['page']['currentPage'] < res.data['page']['totalPage']) {
+        isMore = true;
+      }
+    } else {}
+    setState(() {
+      playerList = list;
+    });
+  }
+
+  @override
+  void initState() {
+    super.initState();
+
+    _mControll = ScrollController();
+    _mControll.addListener(() {
+      if (_mControll.position.pixels == _mControll.position.maxScrollExtent) {
+        if (isMore) {
+          currentPage++;
+          getListPage();
+        }
+      }
+    });
+
+    Future.delayed(Duration.zero, () => getListPage());
+  }
+
+  @override
+  void dispose() {
+    _mControll.dispose();
+    super.dispose();
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      body: Container(
+          color: Color(0xFF2B2B42),
+          child: RefreshIndicator(
+            color: ThemeData().primaryColor,
+            backgroundColor: Colors.white,
+            onRefresh: () async {
+              await Future.delayed(const Duration(seconds: 1));
+            },
+            child: widget.type == 0
+                ? ListView.builder(
+                    physics: AlwaysScrollableScrollPhysics(),
+                    controller: _mControll,
+                    itemCount: houseList.isNotEmpty ? houseList.length : 1,
+                    itemBuilder: (BuildContext context, int index) {
+                      if (houseList.isEmpty) {
+                        return Text(
+                          '还没有战绩快去比赛吧...',
+                          style: TextStyle(color: Colors.white30, fontSize: 13, height: 2),
+                          textAlign: TextAlign.center,
+                        );
+                      }
+                      return HouseItem(houseList[index],houseList[index].gameInfo);
+                    })
+                : ListView.builder(
+                    physics: AlwaysScrollableScrollPhysics(),
+                    controller: _mControll,
+                    itemCount: playerList.isNotEmpty ? playerList.length : 1,
+                    itemBuilder: (BuildContext context, int index) {
+                      if (playerList.isEmpty) {
+                        return Text(
+                          '还没有战绩快去比赛吧...',
+                          style: TextStyle(color: Colors.white30, fontSize: 13, height: 2),
+                          textAlign: TextAlign.center,
+                        );
+                      }
+                      return HouseItem( playerList[index].houseInfo, playerList[index].gameInfo, playerInfo: playerList[index]);
+                    }),
+          )),
+    );
+  }
+}
+
+// class houseItem extends StatelessWidget {
+//   houseItem({Key key, this.roomInfo, this.gameInfo, this.playerInfo, this.type = 0}) : super(key: key);
+//   final HouseInfo roomInfo;
+//   final GameInfo gameInfo;
+//   final PlayerInfo playerInfo;
+//   final int type;
+
+//   @override
+//   Widget build(BuildContext context) {
+//     List imageList = [
+//       'images/jiangpai_huangjin.png',
+//       'images/jiangpai_baiyin.png',
+//       'images/jiangpai_qingtong.png',
+//       'images/zhanji_icon_04.png',
+//       'images/jiangpai_bojin.png'
+//     ];
+//     String imageSrc = '';
+//     String tishiStr = '';
+//     Color tishiColor;
+//     bool isImport = false;
+//     if (playerInfo != null) {
+//       if (playerInfo.medal != null) {
+//         if (playerInfo.medal == 'platinum') {
+//           imageSrc = imageList[4];
+//         } else if (playerInfo.medal == 'gold') {
+//           imageSrc = imageList[0];
+//         } else if (playerInfo.medal == 'silver') {
+//           imageSrc = imageList[1];
+//         } else if (playerInfo.medal == 'bronze') {
+//           imageSrc = imageList[2];
+//         }
+//         else if(playerInfo.rank!=null){
+//           tishiStr='第${playerInfo.rank}名';
+//         }
+//         // if (playerInfo.houseRank < 4) {
+//         //   imageSrc = imageList[playerInfo.houseRank - 1];
+//         // } else {
+//         //   imageSrc = imageList[3];
+//         // }
+//       }
+
+//       if (playerInfo.statusFlag != null) {
+//         if (playerInfo.statusFlag == 6) {
+//           imageSrc = imageList[3];
+//         } else if (playerInfo.statusFlag == 0) {
+//           tishiStr = '未开始';
+//         } else if (playerInfo.statusFlag == 2) {
+//           tishiStr = '进行中';
+//         } else if (playerInfo.statusFlag < 4 || (roomInfo.statusFlag >= 2 && roomInfo.statusFlag < 4)) {
+//           tishiStr = '结算中';
+//         }
+//       }
+//     } else {
+//       if (roomInfo.statusFlag == 0) {
+//         tishiStr = '未开始';
+//         tishiColor = Theme.of(context).primaryColor;
+//       } else if (roomInfo.statusFlag == 2) {
+//         tishiStr = '进行中';
+//         tishiColor = Color(0xFFA9AABA);
+//       } else if (roomInfo.statusFlag == 4) {
+//         tishiStr = '已结束';
+//         tishiColor = Color(0xFF595B77);
+//       } else {
+//         tishiStr = '结算中';
+//         tishiColor = Color(0xFF595B77);
+//       }
+//     }
+
+//     if (roomInfo == null) {
+//       return Container();
+//     }
+//     return Container(
+//       decoration: BoxDecoration(
+//         // gradient: LinearGradient(
+//         //   colors: [Color(0xFF3F4261), Color(0xFF323456)],
+//         //   begin: Alignment.topCenter,
+//         //   end: Alignment.bottomCenter,
+//         // ),
+//         color: Color(0xFF363759),
+//       ),
+//       child: Column(
+//         children: <Widget>[
+//           Material(
+//             color: Colors.transparent,
+//             child: InkWell(
+//               child: Padding(
+//                 padding: EdgeInsets.all(15),
+//                 child: Row(
+//                   children: <Widget>[
+//                     Image.network(
+//                       gameInfo.icon,
+//                       width: 48,
+//                       height: 48,
+//                     ),
+//                     Container(
+//                       width: 10,
+//                     ),
+//                     Expanded(
+//                       flex: 1,
+//                       child: Column(
+//                         crossAxisAlignment: CrossAxisAlignment.start,
+//                         children: <Widget>[
+//                           Row(
+//                             children: <Widget>[
+//                               LimitedBox(
+//                                 maxWidth: 170,
+//                                 child: Text(
+//                                   roomInfo.houseName,
+//                                   style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500),
+//                                   maxLines: 1,
+//                                   overflow: TextOverflow.ellipsis,
+//                                 ),
+//                               ),
+//                               Container(
+//                                 width: 5,
+//                               ),
+//                               ScoreType(roomInfo.scoreType)
+//                               // Container(
+//                               //   margin: EdgeInsets.only(left: 6),
+//                               //   child: Image.network(roomInfo.houseLevel.icon,
+//                               //       width: 14),
+//                               // ),
+//                               // Container(
+//                               //     margin: EdgeInsets.only(left: 1),
+//                               //     child: Text(
+//                               //       roomInfo.houseLevel.levelName,
+//                               //       style: TextStyle(
+//                               //           color: Color(0xFFF9D881), fontSize: 9),
+//                               //     )),
+//                             ],
+//                           ),
+//                           Text(
+//                             roomInfo.houseAbstract ?? '',
+//                             style: TextStyle(fontSize: 12, fontWeight: FontWeight.w400, color: Color(0xFF9BA0AE)),
+//                             maxLines: 2,
+//                             overflow: TextOverflow.ellipsis,
+//                           )
+//                         ],
+//                       ),
+//                     ),
+//                     imageSrc != ''
+//                         ? Image.asset(imageSrc)
+//                         : (type == 2
+//                             ? Text(tishiStr, style: TextStyle(color: isImport ? PRIMARY_COLOR : Colors.white54, fontSize: 14))
+//                             : Container(
+//                                 color: tishiColor,
+//                                 padding: EdgeInsets.symmetric(vertical: 4, horizontal: 9),
+//                                 child: Text(
+//                                   tishiStr,
+//                                   style: TextStyle(color: Color(0xFF252532), fontSize: 12),
+//                                 ),
+//                               ))
+//                   ],
+//                 ),
+//               ),
+//               onTap: () {
+//                 Navigator.push(context, CupertinoPageRoute(builder: (context) => RoomInfo(roomId: roomInfo.id.toString())));
+//               },
+//             ),
+//           ),
+//           Container(
+//             margin: EdgeInsets.symmetric(horizontal: 15),
+//             height: 1,
+//             color: Color(0xFF2B2B42),
+//           )
+//         ],
+//       ),
+//     );
+//   }
+// }

+ 256 - 144
lib/pages/RoomInfo.dart

@@ -3,11 +3,13 @@ import 'dart:ui';
 import 'package:flutter/cupertino.dart' as prefix0;
 import 'package:flutter/material.dart';
 import 'package:flutter/material.dart' as prefix1;
+import 'package:flutter/painting.dart';
 import 'package:flutter_screenutil/flutter_screenutil.dart';
 import 'package:url_launcher/url_launcher.dart';
 import 'package:battery/battery.dart';
 import 'package:flutter_redux/flutter_redux.dart';
 import 'package:flutter/cupertino.dart';
+import 'package:wanna_battle/model/HouseLevel.dart';
 import '../styles/colors.dart';
 import '../plugins/ScreenStramPlugin.dart';
 import '../net/HttpManager.dart';
@@ -25,6 +27,7 @@ import 'VideoPlayer.dart';
 import '../model/UserInfo.dart';
 import '../widget/LinearButton.dart';
 import 'Appeal.dart';
+import 'ShoppingMall.dart';
 
 class RoomInfo extends StatefulWidget {
   RoomInfo({Key key, this.roomId}) : super(key: key);
@@ -45,7 +48,7 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
   bool isPop = false;
   bool showBack = false;
   Timer timer;
-  List<List<String>> roomTipsList = [];
+  List<List<Map>> roomTipsList = [];
   ScrollController _tipController;
   String _myUrl;
   int tabIndex = 0;
@@ -54,6 +57,9 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
   String mymedal = '';
   bool canAppeal = false;
   int appealState = 0;
+  bool showJiexie = false;
+  bool showHelloWord = false;
+  bool showWait = false;
 
 //获取房间信息
   Future<void> getRoomInfo(type) async {
@@ -101,6 +107,10 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
         houseInfo.bonus = res.data['bonus'];
         houseInfo.beginTime = res.data['beginTime'];
       });
+
+      if (houseInfo.statusFlag == 4) {
+        checkJoinInfo();
+      }
     }
   }
 
@@ -181,7 +191,7 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
         ],
         title: '完成比赛',
         submitText: '我已完成比赛', onsubmit: () async {
-      HttpManager.post('playerInfo/update', data: {'id': playerInfo.id, 'statusFlag': status, 'endTime': DateTime.now().millisecondsSinceEpoch});
+      HttpManager.post('playerInfo/gameOver', data: {'id': playerInfo.id, 'statusFlag': status, 'endTime': DateTime.now().millisecondsSinceEpoch});
       bool success = await ScreenStreamPlugin.stop();
 
       Timer(Duration(seconds: 1), () {
@@ -201,7 +211,16 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
       int time = houseInfo.beginTime + 1 * 3600 * 1000 - DateTime.now().millisecondsSinceEpoch;
       var nowTime = (time ~/ 1000 ~/ 60) % 60;
       setState(() {
-        roomTipsList.add(['你已完成本次比赛,当前完成人数 ', res.data.toString(), '人,比赛需要等待所有人完成后方可结算奖励', '', ',你可以先去参加其他竞赛,稍后在“个人中心-我的战绩”中可以查看本次竞赛排名及领取奖励']);
+        roomTipsList.add([
+          {"value": '你已完成本次比赛,当前完成人数 ', "type": 0},
+          {"value": res.data.toString(), "type": 1},
+          {"value": '人,比赛需要等待其他人完成后方可结算奖励,你可以先去参加其他竞赛,稍后会有', "type": 0},
+          {"value": '邮件', "type": 1},
+          {"value": '提醒你本次竞赛结果以及领取奖励,请注意查看', "type": 0},
+          {"value": '首页左上角邮件提醒', "type": 1},
+          {"value": '哦', "type": 0}
+        ]);
+        showWait = true;
         changeScroll();
       });
     }
@@ -222,13 +241,21 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
         });
         if (houseInfo.statusFlag == 0) {
           if (houseInfo.createUser == StoreProvider.of<AppState>(context).state.userInfo.id.toString()) {
-            roomTipsList.add(['房间创建成功,待人数满员时会自动开启比赛,房主也可以手动开启比赛,同时,你也可以加入本次比赛']);
+            // roomTipsList.add([{
+            //   "value":'房间创建成功,待人数满员时会自动开启比赛,房主也可以手动开启比赛,同时,你也可以加入本次比赛',
+            //   "type":0
+            // }]);
             changeScroll();
           }
 
+          setState(() {
+            showHelloWord = true;
+          });
+
           // if (isJoin) {
-            roomTipsList
-                .add(['待倒计时结束或人数满员时会自动开启比赛,请在此页面耐心等待其他人的加入,加入房间后再次退出则视为自动放弃比赛。', '由于部分手机在低电量情况下无法在后台正常运行竞赛APP,为了你比赛数据的正常获取,请保持手机电量在50%以上', '', '', '']);
+          // roomTipsList.add([{
+          //   "value":'亲爱的玩家:',
+          // }]);
           // }
 
           changeScroll();
@@ -294,6 +321,9 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
     }
 
     if (isJoin && houseInfo.statusFlag == 4) {
+      setState(() {
+        showJiexie = true;
+      });
       HttpManager.get('appealInfo/getOne', data: {
         'userId': StoreProvider.of<AppState>(context).state.userInfo.id,
         'playerInfoId': playerInfo.id,
@@ -320,41 +350,45 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
 //加入房间
   Future<void> joinRoom() async {
     print(StoreProvider.of<AppState>(context).state.userInfo.moneyTicket);
-    if (StoreProvider.of<AppState>(context).state.userInfo.moneyTicket < 1) {
-      MyDialog.showDialog(context, '门票不足不能加入');
-
-      return;
-    }
-    bool hasPermission = await ScreenStreamPlugin.checkPermission();
-    if (!hasPermission) {
-      showDialog(
-        context: context,
-        builder: (context) => AlertDialog(
-              title: Text('需要悬浮窗权限'),
-              contentTextStyle: TextStyle(color: Colors.black87),
-              content: Text('请在点击确定后,勾选"允许显示在其他应用的上层"'),
-              actions: <Widget>[
-                FlatButton(
-                  child: Text('确定'),
-                  onPressed: () {
-                    Navigator.of(context).pop();
-                    ScreenStreamPlugin.requestPermission();
-                  },
-                ),
-              ],
-            ),
-      );
+    if (StoreProvider.of<AppState>(context).state.userInfo.moneyTicket < houseInfo.houseLevel.entryCoin) {
+      MyDialog.showDialog(context, '门票不足不能加入', onsubmit: () {
+        Navigator.push(context, CupertinoPageRoute(builder: (context) => ShoppingMall()));
+      });
       return;
     }
-    Toast.show(context, '加载中', -1, 'loading');
-    Result res = await HttpManager.post('houseInfo/join', data: {'houseId': widget.roomId, 'userId': StoreProvider.of<AppState>(context).state.userInfo.id});
-    Toast.hide();
-    if (res.success) {
-      Toast.show(context, '加入成功', 1500, 'success');
-      checkJoinInfo();
-    } else {
-      Toast.show(context, res.error, 1500, 'info');
-    }
+
+    MyDialog.showDialog(context, '加入房间后再次退出则示为自动放弃比赛', submitText: '确认加入', isCancel: true, onsubmit: () async {
+      bool hasPermission = await ScreenStreamPlugin.checkPermission();
+      if (!hasPermission) {
+        showDialog(
+          context: context,
+          builder: (context) => AlertDialog(
+                title: Text('需要悬浮窗权限'),
+                contentTextStyle: TextStyle(color: Colors.black87),
+                content: Text('请在点击确定后,勾选"允许显示在其他应用的上层"'),
+                actions: <Widget>[
+                  FlatButton(
+                    child: Text('确定'),
+                    onPressed: () {
+                      Navigator.of(context).pop();
+                      ScreenStreamPlugin.requestPermission();
+                    },
+                  ),
+                ],
+              ),
+        );
+        return;
+      }
+      Toast.show(context, '加载中', -1, 'loading');
+      Result res = await HttpManager.post('houseInfo/join', data: {'houseId': widget.roomId, 'userId': StoreProvider.of<AppState>(context).state.userInfo.id});
+      Toast.hide();
+      if (res.success) {
+        Toast.show(context, '加入成功', 1500, 'success');
+        checkJoinInfo();
+      } else {
+        Toast.show(context, res.error, 1500, 'info');
+      }
+    });
   }
 
 //展示通知
@@ -369,7 +403,7 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
           );
         },
         pageBuilder: (BuildContext context, _, __) {
-          return CompetitionInformation();
+          return CompetitionInformation(houseInfo: houseInfo);
         }));
   }
 
@@ -463,18 +497,17 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
           elevation: 0,
           actions: <Widget>[
             Container(
-              padding: EdgeInsets.only(right: 30, left: 20),
-              child: Container(
-                width: 24,
-              )
-            )
+                padding: EdgeInsets.only(right: 30, left: 20),
+                child: Container(
+                  width: 24,
+                ))
           ],
         ),
         body: Container(
-            color: BG_SUB_COLOR,
+            color: Color(0xFF2E3049),
             child: TabBarView(
               controller: mController,
-              children: [_firstPage(), SecondPage(roomId: widget.roomId, status: status,houseInfo:houseInfo)],
+              children: [_firstPage(), SecondPage(roomId: widget.roomId, status: status, houseInfo: houseInfo)],
             )),
         floatingActionButton: _joinBtn(),
         floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
@@ -567,7 +600,7 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
                                   Container(
                                     child: Text(
                                       houseInfo != null ? houseInfo.houseName : '',
-                                      style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.w500),
+                                      style: TextStyle(color: Colors.white, fontSize: 20, fontWeight: FontWeight.w600),
                                     ),
                                   ),
                                   Container(
@@ -579,19 +612,7 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
                                       textSize: 12.0,
                                       colorList: [Color(0xFFFFB726), Color(0xFFFFB726)],
                                       onTapHomeMenu: () {
-                                        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 CompetitionInformation();
-                                            }));
+                                        showNotice();
                                       },
                                     ),
                                   )
@@ -619,6 +640,10 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
                             child: Row(
                               mainAxisAlignment: MainAxisAlignment.spaceBetween,
                               children: <Widget>[
+                                Text(
+                                  '本次任务:游戏中最短时间内杀戮${houseInfo.killnumber}人',
+                                  style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xFFFFB726)),
+                                ),
                                 Row(
                                   children: <Widget>[
                                     Image.asset(
@@ -633,35 +658,86 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
                                   ],
                                 ),
 
-                                   Row(
+                                // Row(
+                                //   children: <Widget>[
+                                //     Image.asset(
+                                //       'images/house2.png',
+                                //     ),
+                                //     Text(
+                                //       'X${houseInfo.bonus}',
+                                //       style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: Color(0xFFB1B2C0)),
+                                //     ),
+                                //   ],
+                                // ),
+                                // Container(
+                                //   width: 30,
+                                // ),
+
+                                // Container(
+                                //   width: 10,
+                                // ),
+                              ],
+                            ),
+                          ),
+
+                          Container(
+                            padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10),
+                            margin: EdgeInsets.fromLTRB(15, 7, 15, 0),
+                            decoration: BoxDecoration(color: Color(0xFF23253C), borderRadius: BorderRadius.all(Radius.circular(4))),
+                            child: Row(
+                              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                              children: <Widget>[
+                                Column(
                                   children: <Widget>[
-                                    Image.asset(
-                                      'images/house2.png',
+                                    Row(
+                                      children: <Widget>[
+                                        Image.asset('images/icon_jifen.png'),
+                                        Text(
+                                          'x${houseInfo.bonus * houseInfo.houseLevel.firstRatio / 100}',
+                                          style: TextStyle(color: Color(0xFFB1B2C0), fontSize: 14, fontWeight: FontWeight.w600),
+                                        )
+                                      ],
                                     ),
-                                    Text('X${houseInfo.bonus}',
-                                      style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: Color(0xFFB1B2C0)),
+                                    Container(
+                                      height: 3,
                                     ),
+                                    Text('第一名奖励', style: TextStyle(fontSize: 12, color: Color(0xFFB1B2C0)))
                                   ],
                                 ),
-                                // Container(
-                                //   width: 30,
-                                // ),
-                                Row(
+                                Column(
                                   children: <Widget>[
-                                    Image.asset(
-                                      'images/icon_jisha.png',
+                                    Row(
+                                      children: <Widget>[
+                                        Image.asset('images/icon_jifen.png'),
+                                        Text(
+                                          'x${houseInfo.bonus * houseInfo.houseLevel.secondRatio / 100}',
+                                          style: TextStyle(color: Color(0xFFB1B2C0), fontSize: 14, fontWeight: FontWeight.w600),
+                                        )
+                                      ],
                                     ),
-                                    Text('在游戏中击败${houseInfo.killnumber}人',
-                                      style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: Color(0xFFB1B2C0)),
+                                    Container(
+                                      height: 3,
                                     ),
+                                    Text('第二名奖励', style: TextStyle(fontSize: 12, color: Color(0xFFB1B2C0)))
                                   ],
                                 ),
-
-                               
-                                // Container(
-                                //   width: 10,
-                                // ),
-                                
+                                Column(
+                                  children: <Widget>[
+                                    Row(
+                                      children: <Widget>[
+                                        Image.asset('images/icon_jifen.png'),
+                                        Text(
+                                          'x${houseInfo.bonus * houseInfo.houseLevel.thirdRatio / 100}',
+                                          style: TextStyle(color: Color(0xFFB1B2C0), fontSize: 14, fontWeight: FontWeight.w600),
+                                        )
+                                      ],
+                                    ),
+                                    Container(
+                                      height: 3,
+                                    ),
+                                    Text('第三名奖励', style: TextStyle(fontSize: 12, color: Color(0xFFB1B2C0)))
+                                  ],
+                                )
                               ],
                             ),
                           ),
@@ -681,10 +757,72 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
                                 )
                               : Container(),
 
+                          statuFlag != 4 && showWait
+                              ? Container(
+                                  width: double.infinity,
+                                  margin: EdgeInsets.fromLTRB(15, 10, 15, 0),
+                                  padding: EdgeInsets.symmetric(vertical: 10),
+                                  height: 40,
+                                  decoration: BoxDecoration(color: Color(0xFF3E3348), borderRadius: BorderRadius.all(Radius.circular(4))),
+                                  child: Text(
+                                    '你已完成比赛,等待游戏解析中',
+                                    style: TextStyle(
+                                      color: Color(0xFFD4504B),
+                                      fontSize: 15,
+                                    ),
+                                    textAlign: TextAlign.center,
+                                  ))
+                              : Container(),
+
+                          showHelloWord
+                              ? Container(
+                                  width: double.infinity,
+                                  padding: EdgeInsets.all(15),
+                                  margin: EdgeInsets.fromLTRB(15, 10, 15, 0),
+                                  decoration: BoxDecoration(
+                                      // gradient: LinearGradient(colors: [Color(0xFF464B6A), Color(0xFF35395E)], begin: Alignment.topCenter, end: Alignment.bottomCenter),
+                                      color: Color(0xFF3A3E61),
+                                      borderRadius:
+                                          BorderRadius.only(topRight: Radius.circular(8), bottomLeft: Radius.circular(8), bottomRight: Radius.circular(8))),
+                                  child: DefaultTextStyle(
+                                    style: TextStyle(
+                                      color: Colors.white,
+                                      fontSize: 13.0,
+                                    ),
+                                    child: Column(
+                                      crossAxisAlignment: CrossAxisAlignment.start,
+                                      children: <Widget>[
+                                        Text('亲爱的玩家:'),
+                                        Text('欢迎来到有奖杀戮的世界!'),
+                                        Text(
+                                          '请保持手机电量在50%以上',
+                                          style: TextStyle(fontWeight: FontWeight.w600, color: Color(0xFFFFB726)),
+                                        ),
+                                        Text.rich(TextSpan(children: [
+                                          TextSpan(text: '倒计时结束或人数满员时会'),
+                                          TextSpan(
+                                            text: '自动',
+                                            style: TextStyle(fontWeight: FontWeight.w600, color: Color(0xFFFFB726)),
+                                          ),
+                                          TextSpan(text: '开启比赛!请在此等候其他玩家加入')
+                                        ])),
+                                        Text.rich(TextSpan(children: [
+                                          TextSpan(text: '完成本房间任务目标后,'),
+                                          TextSpan(
+                                            text: '切记立刻点击悬浮窗',
+                                            style: TextStyle(fontWeight: FontWeight.w600, color: Color(0xFFFFB726)),
+                                          ),
+                                          TextSpan(text: '回到房间')
+                                        ])),
+                                      ],
+                                    ),
+                                  ))
+                              : Container(),
+
                           statuFlag != 4
                               ? TipsListContent(tipsList: roomTipsList, houseInfo: houseInfo)
                               : Container(
-                                  child: playerInfo != null
+                                  child: playerInfo != null && showJiexie
                                       ? Column(
                                           children: <Widget>[
                                             // ( playerInfo.statusFlag!=7&&playerInfo.statusFlag!=9&&!playerInfo.dataError)?
@@ -693,12 +831,13 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
                                               margin: EdgeInsets.symmetric(horizontal: 15, vertical: 10),
                                               padding: EdgeInsets.symmetric(vertical: 10),
                                               height: 40,
-                                              decoration:
-                                                  BoxDecoration(color: Color(0xFFD4504B).withOpacity(0.1), borderRadius: BorderRadius.all(Radius.circular(4))),
+                                              decoration: BoxDecoration(color: Color(0xFF3E3348), borderRadius: BorderRadius.all(Radius.circular(4))),
                                               child: Text(
-                                                (playerInfo.statusFlag != 7 && playerInfo.statusFlag != 9 && !playerInfo.dataError)
-                                                    ? (playerInfo.houseRank < 3 ? '恭喜您,您获得了第${playerInfo.houseRank}名!' : '很遗憾您未能进入前三名,下次加油!')
-                                                    : '很遗憾您本次上传的比赛结果解析失败',
+                                                playerInfo.houseRank < 4
+                                                    ? '恭喜您,您获得了第${playerInfo.houseRank}名!'
+                                                    : (playerInfo.statusFlag != 7 && playerInfo.statusFlag != 9 && !playerInfo.dataError
+                                                        ? '很遗憾您未能进入前三名,下次加油!'
+                                                        : '很遗憾您本次上传的比赛结果解析失败'),
                                                 style: prefix0.TextStyle(
                                                   color: Color(0xFFD4504B),
                                                   fontSize: 15,
@@ -706,7 +845,7 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
                                                 textAlign: TextAlign.center,
                                               ),
                                             ),
-                                            (playerInfo.statusFlag != 7 && playerInfo.statusFlag != 9 && !playerInfo.dataError)
+                                            ((playerInfo.statusFlag != 7 && playerInfo.statusFlag != 9 && !playerInfo.dataError) || playerInfo.houseRank < 4)
                                                 ? Container(
                                                     margin: EdgeInsets.symmetric(vertical: 10, horizontal: 15),
                                                     padding: EdgeInsets.all(15),
@@ -739,20 +878,14 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
                                                         Row(
                                                           mainAxisAlignment: MainAxisAlignment.spaceBetween,
                                                           children: <Widget>[
-                                                            Text("获得奖牌 ", style: TextStyle(color: Colors.white, fontSize: 14)),
-                                                            img != ''
-                                                                ? Row(
-                                                                    children: <Widget>[
-                                                                      Image.asset(
-                                                                        img,
-                                                                        width: 20,
-                                                                      ),
-                                                                      Text("+1",
-                                                                          style: TextStyle(color: Color(0xFFFFB726), fontWeight: FontWeight.w500, fontSize: 14))
-                                                                    ],
-                                                                  )
-                                                                : Text("无",
+                                                            Text("获得积分 ", style: TextStyle(color: Colors.white, fontSize: 14)),
+                                                            Row(
+                                                              children: <Widget>[
+                                                                Image.asset('images/icon_jifen.png'),
+                                                                Text('x${playerInfo.bonus}',
                                                                     style: TextStyle(color: Color(0xFFFFB726), fontWeight: FontWeight.w500, fontSize: 14))
+                                                              ],
+                                                            )
                                                           ],
                                                         )
                                                       ],
@@ -761,7 +894,7 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
                                                 : Container(
                                                     margin: EdgeInsets.symmetric(vertical: 10, horizontal: 15),
                                                     padding: EdgeInsets.all(15),
-                                                    height: 239,
+                                                    // height: 239,
                                                     width: double.infinity,
                                                     decoration: BoxDecoration(
                                                         color: Color(0xFF3A3E61),
@@ -832,6 +965,8 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
       }
     }
 
+    int entryCoin = houseInfo != null ? houseInfo.houseLevel.entryCoin : 0;
+
     if (!isJoin && statusFlag == 0 && houseInfo.userId == StoreProvider.of<AppState>(context).state.userInfo.id) {
       return Container(
         padding: EdgeInsets.symmetric(vertical: 15, horizontal: 10),
@@ -851,7 +986,7 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
                     Container(
                       margin: EdgeInsets.only(left: 6),
                       child: Text(
-                        '×1',
+                        '×${entryCoin}',
                         style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.w500),
                       ),
                     ),
@@ -898,7 +1033,7 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
               Container(
                 margin: EdgeInsets.only(left: 6),
                 child: Text(
-                  '×1',
+                  '×${entryCoin}',
                   style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.w500),
                 ),
               ),
@@ -1005,13 +1140,13 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
     } else if (isJoin && (statusFlag == 2 || statusFlag == 3)) {
       int _time;
       if (houseInfo != null) {
-        _time = houseInfo.beginTime + 3600000 - DateTime.now().millisecondsSinceEpoch;
+        _time = houseInfo.beginTime + 1800000 - DateTime.now().millisecondsSinceEpoch;
       }
       return Container(
         width: double.infinity,
         padding: EdgeInsets.symmetric(horizontal: 15, vertical: 20),
         height: 88,
-        child: LinearButton(btntext: '预计还有 ' + getSecondsMIn(_time) + ' 结算', colorList: [Color(0xFFB34A4A), Color(0xFFB34A4A)], textColor: Color(0xFF252532)),
+        child: LinearButton(btntext: '预计还有 ' + getSecondsMIn(_time) + ' 结算游戏', colorList: [Color(0xFFB34A4A), Color(0xFFB34A4A)], textColor: Color(0xFF252532)),
       );
     } else if (statusFlag == 4 && tabIndex == 0) {
       if (isJoin && canAppeal && appealState == 0 && playerInfo != null && (playerInfo.statusFlag == 9 || playerInfo.statusFlag == 7 || playerInfo.dataError)) {
@@ -1088,15 +1223,10 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
                         ),
                       )
                     : Container(),
-                myRank != 0 && myRank < 4
-                    ? Text(
-                        img,
-                        style: TextStyle(fontSize: 14, color: Color(0xFF252532), fontWeight: FontWeight.w500),
-                      )
-                    : Text(
-                        '未上榜',
-                        style: TextStyle(fontSize: 14, color: Color(0xFF252532), fontWeight: FontWeight.w500),
-                      )
+                Text(
+                  '${myRank}',
+                  style: TextStyle(fontSize: 14, color: Color(0xFF252532), fontWeight: FontWeight.w500),
+                )
               ],
             ),
           ),
@@ -1111,7 +1241,7 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
 //房间的提示信息
 class TipsListContent extends StatelessWidget {
   TipsListContent({Key key, this.tipsList, this.houseInfo}) : super(key: key);
-  final List<List<String>> tipsList;
+  final List<List<Map>> tipsList;
   final HouseInfo houseInfo;
 
   @override
@@ -1137,7 +1267,7 @@ class TipsListContent extends StatelessWidget {
 
 class Tips extends StatelessWidget {
   Tips({Key key, this.content, this.showTongzhi, this.houseInfo}) : super(key: key);
-  final List<String> content;
+  final List<Map> content;
   final bool showTongzhi;
   final HouseInfo houseInfo;
   @override
@@ -1151,39 +1281,21 @@ class Tips extends StatelessWidget {
             borderRadius: BorderRadius.only(topRight: Radius.circular(8), bottomLeft: Radius.circular(8), bottomRight: Radius.circular(8))),
         child: Column(
           children: <Widget>[
-            content.length == 1
-                ? Text(
-                    content[0],
-                    style: TextStyle(color: Colors.white, fontSize: 13),
-                  )
-                : _textList(),
+            _textList(),
           ],
         ));
   }
 
   Widget _textList() {
-    return Text.rich(TextSpan(children: [
-      TextSpan(
-        text: content[0],
-        style: TextStyle(color: Colors.white, fontSize: 13),
-      ),
-      TextSpan(
-        text: content[1],
-        style: TextStyle(color: Color(0xFFFFB726), fontSize: 13, fontWeight: FontWeight.w500),
-      ),
-      TextSpan(
-        text: content[2],
-        style: TextStyle(color: Colors.white, fontSize: 13),
-      ),
-      TextSpan(
-        text: content[3],
-        style: TextStyle(color: Color(0xFFFFB726), fontSize: 13, fontWeight: FontWeight.w500),
-      ),
-      TextSpan(
-        text: content[4],
-        style: TextStyle(color: Colors.white, fontSize: 13),
-      )
-    ]));
+    List<TextSpan> list = [];
+    for (var item in content) {
+      list.add(TextSpan(
+        text: item['value'],
+        style:
+            item['type'] == 0 ? TextStyle(color: Colors.white, fontSize: 13) : TextStyle(color: Color(0xFFFFB726), fontSize: 13, fontWeight: FontWeight.w500),
+      ));
+    }
+    return Text.rich(TextSpan(children: list));
   }
 }
 

+ 3 - 5
lib/pages/SecondRoomInfo.dart

@@ -133,13 +133,11 @@ class SecondPageState extends State<SecondPage> {
 
   Widget PersonItem(PlayerInfo info, int index) {
     String img = '';
-    if (info.medal == 'platinum') {
-      img = jiangpaiImg[3];
-    } else if (info.medal == 'gold') {
+     if (info.houseRank ==1) {
       img = jiangpaiImg[0];
-    } else if (info.medal == 'silver') {
+    } else if (info.houseRank ==2) {
       img = jiangpaiImg[1];
-    } else if (info.medal == 'bronze') {
+    } else if (info.houseRank ==3) {
       img = jiangpaiImg[2];
     }
     return Container(

+ 6 - 31
lib/pages/ShoppingMall.dart

@@ -103,36 +103,11 @@ class RechargeState extends State<Recharge> {
       body: Container(
         color: BG_COLOR,
         child: ListView.builder(
-            itemCount: productInfoList.length + 1,
+            itemCount: productInfoList.length,
             itemBuilder: (BuildContext context, int index) {
-              if (index == 0) {
-                return Padding(
-                  padding: EdgeInsets.fromLTRB(15, 15, 15, 10),
-                  child: Row(
-                    crossAxisAlignment: CrossAxisAlignment.center,
-                    mainAxisAlignment: MainAxisAlignment.center,
-                    children: <Widget>[
-                      Expanded(
-                        flex: 1,
-                        child: ShoopingBtn('images/icon_haoli.png', '更多好礼', onTapHomeMenu: () {
-                          showDialog(2);
-                        }),
-                      ),
-                      Container(
-                        width: 15,
-                      ),
-                      Expanded(
-                        flex: 1,
-                        child: ShoopingBtn('images/icon_shangwu.png', '商务合作', onTapHomeMenu: () {
-                          showDialog(3);
-                        }),
-                      ),
-                    ],
-                  ),
-                );
-              }
+            
               bool isChoose = false;
-              if (productInfoList[index - 1].id == chooseProduct.id) {
+              if (productInfoList[index].id == chooseProduct.id) {
                 isChoose = true;
               }
               return Container(
@@ -153,13 +128,13 @@ class RechargeState extends State<Recharge> {
                           child: Row(
                             mainAxisAlignment: MainAxisAlignment.center,
                             children: <Widget>[
-                              Text(productInfoList[index - 1].productName,
+                              Text(productInfoList[index].productName,
                                   style: TextStyle(color: Color(0xFFFFFFFF), fontWeight: FontWeight.w500, fontSize: 15)),
                               Container(
                                 width: 10,
                               ),
                               Text(
-                                '¥' + productInfoList[index - 1].money.toString(),
+                                '¥' + productInfoList[index].money.toString(),
                                 style: TextStyle(color: Color(0xFF727785), fontWeight: FontWeight.w400, fontSize: 14),
                               )
                             ],
@@ -177,7 +152,7 @@ class RechargeState extends State<Recharge> {
                       ? null
                       : () {
                           setState(() {
-                            chooseProduct = productInfoList[index - 1];
+                            chooseProduct = productInfoList[index];
                           });
                         },
                 ),

+ 162 - 101
lib/pages/TipInfo.dart

@@ -1,5 +1,4 @@
 import 'package:flutter/material.dart';
-import '../styles/colors.dart';
 import 'package:flutter/cupertino.dart';
 import 'dart:ui';
 import '../styles/totast.dart';
@@ -8,15 +7,14 @@ import '../net/HttpManager.dart';
 import '../net/Result.dart';
 import '../model/HouseInfo.dart';
 import '../model/GameInfo.dart';
-import '../pages/RoomInfo.dart';
 import '../widget/SuccessfulReception.dart';
 import '../widget/LinearButton.dart';
 import '../model/PlayerInfo.dart';
-import '../widget/ScoreType.dart';
 import '../widget/HouseItem.dart';
 import '../redux/AppState.dart';
 import 'package:flutter_redux/flutter_redux.dart';
 import 'Appeal.dart';
+import 'dart:io';
 
 class TipInfo extends StatefulWidget {
   TipInfo({Key key, this.tipId}) : super(key: key);
@@ -56,7 +54,8 @@ class TipInfoState extends State<TipInfo> {
       });
     }
 
-    Result res3 = await HttpManager.get('playerInfo/getOne', data: {'userId': StoreProvider.of<AppState>(context).state.userInfo.id, 'houseId': tipInfo.houseId});
+    Result res3 =
+        await HttpManager.get('playerInfo/getOne', data: {'userId': StoreProvider.of<AppState>(context).state.userInfo.id, 'houseId': tipInfo.houseId});
     if (res3.success) {
       playerInfo = PlayerInfo.fromJson(res3.data);
       print(res3.data);
@@ -79,10 +78,14 @@ class TipInfoState extends State<TipInfo> {
       }
     });
 
-    // showSuccess(1000);
+    // if (tipInfo.typeFlag == 2 || tipInfo.typeFlag == 3) {
+    //   if (tipInfo.statusFlag == 0) {
+    //     showSuccess(tipInfo.playerInfo.bonus, playerInfo.id);
+    //   }
+    // }
   }
 
-  void showSuccess(money) {
+  void showSuccess(money, playerId) {
     Navigator.of(context).push(
       PageRouteBuilder(
         opaque: false,
@@ -94,7 +97,7 @@ class TipInfoState extends State<TipInfo> {
           );
         },
         pageBuilder: (BuildContext context, _, __) {
-          return SuccessfulReception(money: money);
+          return SuccessfulReception(money: money, playerId: playerId);
         },
       ),
     );
@@ -142,32 +145,15 @@ class TipInfoState extends State<TipInfo> {
                         height: 1,
                         color: Colors.black26,
                       ),
-                      Padding(padding: EdgeInsets.only(top: 10, bottom: 0), child: Text.rich(TextSpan(style: TextStyle(color: Colors.white, fontSize: 14), children: _tipContent(tipInfo.content, context)))),
+                      Padding(
+                          padding: EdgeInsets.only(top: 10, bottom: 0),
+                          child: Text.rich(TextSpan(style: TextStyle(color: Colors.white, fontSize: 14), children: _tipContent(tipInfo.content, context)))),
                     ],
                   ),
                 ),
-                playerInfo != null && playerInfo.dataError
-                    ? Container(
-                      width: double.infinity,
-                        padding: EdgeInsets.fromLTRB(15, 5, 15, 20),
-                        child: DefaultTextStyle(
-                          style: TextStyle(
-                            fontSize: 13,
-                            color: Colors.white54,
-                          ),
-                          child: Column(
-                            crossAxisAlignment: CrossAxisAlignment.start,
-                            children: <Widget>[
-                              Text('造成此情况等原因可能是:'),
-                              Text('1、没有实际进行游戏比赛 '),
-                              Text('2、使用作弊手段进行游戏'),
-                            ],
-                          ),
-                        ),
-                      )
-                    : Container(
-                        height: 30,
-                      ),
+                Container(
+                  height: 30,
+                ),
                 // tipInfo.typeFlag == 4
                 //     ? Padding(
                 //         padding: EdgeInsets.symmetric(horizontal: 15, vertical: 20),
@@ -211,62 +197,104 @@ class TipInfoState extends State<TipInfo> {
                 //         height: 30,
                 //       ),
                 // houseInfo != null && tipInfo.typeFlag != 4 && tipInfo.typeFlag != 5 ? RankContent(roomId: houseInfo.id.toString()) : Container(),
-                houseInfo != null && type != 3 ? HouseItem(houseInfo, gameInfo) : Container(),
-                houseInfo != null && playerInfo != null && type != 3 ? _resultContent(houseInfo, playerInfo, tipInfo.typeFlag) : Container(),
-                (type == 2 || type == 3)
-                    ? Container(
-                        width: double.infinity,
-                        height: 48,
-                        padding: EdgeInsets.symmetric(horizontal: 15),
-                        child: status == 0
-                            ? LinearButton(
-                                btntext: '立即领取',
-                                onTapHomeMenu: () async {
-                                  Toast.show(context, '加载中', -1, 'loading');
-                                  Result res = type == 2 ? await HttpManager.post('playerInfo/receive', data: {'id': tipInfo.playerId}) : await HttpManager.post('systemNotice/receive', data: {'id': widget.tipId});
-                                  Toast.hide();
-                                  if (res.success) {
-                                    if (tipInfo.playerInfo != null) {
-                                      showSuccess(tipInfo.playerInfo.bonus);
-                                    } else {
-                                      showSuccess(tipInfo.bonus);
-                                    }
-                                    getInfo();
-                                  } else {
-                                    Toast.show(context, res.error, 1000, 'info');
-                                  }
-                                },
-                              )
-                            : LinearButton(btntext: '已领取', colorList: [Color(0xFFC99C09), Color(0xFFC7873E)], textColor: Color(0xFF252532)),
-                      )
+                houseInfo != null && type != 3 ? HouseItem(houseInfo, gameInfo,playerInfo: playerInfo,) : Container(),
+                houseInfo != null && playerInfo != null && type != 3
+                    ? (playerInfo != null && playerInfo.dataError && playerInfo.houseRank > 3
+                        ? Container(
+                            margin: EdgeInsets.symmetric(vertical: 10, horizontal: 15),
+                            padding: EdgeInsets.all(15),
+                            // height: 239,
+                            width: double.infinity,
+                            decoration: BoxDecoration(
+                                color: Color(0xFF3A3E61),
+                                borderRadius: BorderRadius.only(topRight: Radius.circular(8), bottomLeft: Radius.circular(8), bottomRight: Radius.circular(8))),
+                            child: Column(
+                              crossAxisAlignment: CrossAxisAlignment.start,
+                              children: <Widget>[
+                                Text(
+                                  '造成此情况等原因可能是:',
+                                  style: TextStyle(color: Colors.white54, fontSize: 13),
+                                ),
+                                Container(
+                                  height: 10,
+                                ),
+                                Text(
+                                  '1、没有实际进行游戏比赛 ',
+                                  style: TextStyle(color: Colors.white, fontSize: 13),
+                                ),
+                                Text(
+                                  '2、使用作弊手段进行游戏  ',
+                                  style: TextStyle(color: Colors.white, fontSize: 13),
+                                ),
+                                Text(
+                                  '3、手机性能或电量过低,在运行和平精英游戏时自动将我们平台APP从后台进程中退掉  ',
+                                  style: TextStyle(color: Colors.white, fontSize: 13),
+                                ),
+                                Text(
+                                  '4、游戏时间过长,没有在最大时间内返回平台APP点击结束游戏 ',
+                                  style: TextStyle(color: Colors.white, fontSize: 13),
+                                ),
+                              ],
+                            ),
+                          )
+                        : _resultContent(houseInfo, playerInfo, tipInfo.typeFlag))
+                    : Container(),
+                // (type == 2 || type == 3)
+                //     ? Container(
+                //         width: double.infinity,
+                //         height: 48,
+                //         padding: EdgeInsets.symmetric(horizontal: 15),
+                //         child: status == 0
+                //             ? LinearButton(
+                //                 btntext: '立即领取',
+                //                 onTapHomeMenu: () async {
+                //                   Toast.show(context, '加载中', -1, 'loading');
+                //                   Result res = type == 2
+                //                       ? await HttpManager.post('playerInfo/receive', data: {'id': tipInfo.playerId})
+                //                       : await HttpManager.post('systemNotice/receive', data: {'id': widget.tipId});
+                //                   Toast.hide();
+                //                   if (res.success) {
+                //                     if (tipInfo.playerInfo != null) {
+                //                       showSuccess(tipInfo.playerInfo.bonus);
+                //                     } else {
+                //                       showSuccess(tipInfo.bonus);
+                //                     }
+                //                     getInfo();
+                //                   } else {
+                //                     Toast.show(context, res.error, 1000, 'info');
+                //                   }
+                //                 },
+                //               )
+                //             : LinearButton(btntext: '已领取', colorList: [Color(0xFFC99C09), Color(0xFFC7873E)], textColor: Color(0xFF252532)),
+                //       )
 
-                    // RaisedButton(
-                    //   textColor: Colors.white,
-                    //   disabledColor: Color(0xFF763939),
-                    //   disabledTextColor: Color(0xFF252532),
-                    //   child: Text(status==0?'立即领取':'已领取'),
-                    //   onPressed: status==0?() async {
-                    //     Toast.show(context, '加载中', -1, 'loading');
-                    //     Result res = type == 2
-                    //         ? await HttpManager.post('playerInfo/receive',
-                    //             data: {'id': tipInfo.playerId})
-                    //         : await HttpManager.post('systemNotice/receive',
-                    //             data: {'id': widget.tipId});
-                    //     Toast.hide();
-                    //     if (res.success) {
-                    //       if (tipInfo.playerInfo != null) {
-                    //         showSuccess(tipInfo.playerInfo.bonus);
-                    //       } else {
-                    //         showSuccess(tipInfo.bonus);
-                    //       }
-                    //       getInfo();
-                    //     } else {
-                    //       Toast.show(context, res.error, 1000, 'info');
-                    //     }
-                    //   }:null,
-                    // ),
+                // RaisedButton(
+                //   textColor: Colors.white,
+                //   disabledColor: Color(0xFF763939),
+                //   disabledTextColor: Color(0xFF252532),
+                //   child: Text(status==0?'立即领取':'已领取'),
+                //   onPressed: status==0?() async {
+                //     Toast.show(context, '加载中', -1, 'loading');
+                //     Result res = type == 2
+                //         ? await HttpManager.post('playerInfo/receive',
+                //             data: {'id': tipInfo.playerId})
+                //         : await HttpManager.post('systemNotice/receive',
+                //             data: {'id': widget.tipId});
+                //     Toast.hide();
+                //     if (res.success) {
+                //       if (tipInfo.playerInfo != null) {
+                //         showSuccess(tipInfo.playerInfo.bonus);
+                //       } else {
+                //         showSuccess(tipInfo.bonus);
+                //       }
+                //       getInfo();
+                //     } else {
+                //       Toast.show(context, res.error, 1000, 'info');
+                //     }
+                //   }:null,
+                // ),
 
-                    : Container(),
+                // : Container(),
                 // CustomPaint(
                 //   painter: CircleProgressBarPainter(
                 //       Color(0xFFDCA659), Color(0xFFAE4945), 0.0, 270.0, 360.0, 18.0),
@@ -288,7 +316,36 @@ class TipInfoState extends State<TipInfo> {
   }
 
   Widget _btnContent() {
-    if ((tipInfo.typeFlag == 4 || tipInfo.typeFlag == 5 || (playerInfo != null && playerInfo.dataError)) && canAppeal && appealState == 0) {
+    if (tipInfo.typeFlag == 2 || tipInfo.typeFlag == 3) {
+      if (tipInfo.statusFlag == 0) {
+        return Container(
+            width: double.infinity,
+            padding: EdgeInsets.symmetric(horizontal: 15, vertical: 20),
+            height: 88,
+            child: LinearButton(
+              btntext: '立即领取',
+              onTapHomeMenu: () async {
+                Toast.show(context, '加载中', -1, 'loading');
+                Result res = tipInfo.typeFlag == 2
+                    ? await HttpManager.post('playerInfo/receive', data: {'id': tipInfo.playerId})
+                    : await HttpManager.post('systemNotice/receive', data: {'id': widget.tipId});
+                Toast.hide();
+                if (res.success) {
+                  showSuccess(tipInfo.playerInfo.bonus, playerInfo.id);
+                  getInfo();
+                } else {
+                  Toast.show(context, res.error, 1000, 'info');
+                }
+              },
+            ));
+      } else {
+        return Container(
+            width: double.infinity,
+            padding: EdgeInsets.symmetric(horizontal: 15, vertical: 20),
+            height: 88,
+            child: LinearButton(btntext: '已领取', colorList: [Color(0xFFB34A4A), Color(0xFFB34A4A)], textColor: Color(0xFF252532)));
+      }
+    } else if ((tipInfo.typeFlag == 4 || tipInfo.typeFlag == 5 || (playerInfo != null && playerInfo.dataError)) && canAppeal && appealState == 0) {
       return Container(
           width: double.infinity,
           padding: EdgeInsets.symmetric(horizontal: 15, vertical: 20),
@@ -308,7 +365,11 @@ class TipInfoState extends State<TipInfo> {
             },
           ));
     } else if (tipInfo.typeFlag != 3 && canAppeal && appealState == 1) {
-      return Container(width: double.infinity, padding: EdgeInsets.symmetric(horizontal: 15, vertical: 20), height: 88, child: LinearButton(btntext: '已提交申诉', colorList: [Color(0xFFAF4946), Color(0xFFAF4946)], textColor: Color(0xFF252532)));
+      return Container(
+          width: double.infinity,
+          padding: EdgeInsets.symmetric(horizontal: 15, vertical: 20),
+          height: 88,
+          child: LinearButton(btntext: '已提交申诉', colorList: [Color(0xFFAF4946), Color(0xFFAF4946)], textColor: Color(0xFF252532)));
     } else {
       return Container();
     }
@@ -365,7 +426,6 @@ class TipInfoState extends State<TipInfo> {
       }
     }
     return Column(children: <Widget>[
-     
       Container(
         margin: EdgeInsets.symmetric(vertical: 5, horizontal: 15),
         padding: EdgeInsets.all(15),
@@ -378,27 +438,28 @@ class TipInfoState extends State<TipInfo> {
             Text('比赛结果', style: TextStyle(color: Colors.white54, fontSize: 13)),
             Row(
               mainAxisAlignment: MainAxisAlignment.spaceBetween,
-              children: <Widget>[Text("参数成员 ", style: TextStyle(color: Colors.white, fontSize: 14)), Text("${houseInfo.playerNumber}人 ", style: TextStyle(color: Color(0xFFFFB726), fontWeight: FontWeight.w500, fontSize: 14))],
+              children: <Widget>[
+                Text("参数成员 ", style: TextStyle(color: Colors.white, fontSize: 14)),
+                Text("${houseInfo.playerNumber}人 ", style: TextStyle(color: Color(0xFFFFB726), fontWeight: FontWeight.w500, fontSize: 14))
+              ],
             ),
             Row(
               mainAxisAlignment: MainAxisAlignment.spaceBetween,
-              children: <Widget>[Text("我的排名", style: TextStyle(color: Colors.white, fontSize: 14)), Text("${playerInfo.houseRank}", style: TextStyle(color: Color(0xFFFFB726), fontWeight: FontWeight.w500, fontSize: 14))],
+              children: <Widget>[
+                Text("我的排名", style: TextStyle(color: Colors.white, fontSize: 14)),
+                Text("${playerInfo.houseRank}", style: TextStyle(color: Color(0xFFFFB726), fontWeight: FontWeight.w500, fontSize: 14))
+              ],
             ),
             Row(
               mainAxisAlignment: MainAxisAlignment.spaceBetween,
               children: <Widget>[
-                Text("获得奖牌 ", style: TextStyle(color: Colors.white, fontSize: 14)),
-                img != ''
-                    ? Row(
-                        children: <Widget>[
-                          Image.asset(
-                            img,
-                            width: 20,
-                          ),
-                          Text("+1", style: TextStyle(color: Color(0xFFFFB726), fontWeight: FontWeight.w500, fontSize: 14))
-                        ],
-                      )
-                    : Text("无", style: TextStyle(color: Color(0xFFFFB726), fontWeight: FontWeight.w500, fontSize: 14))
+                Text("获得积分 ", style: TextStyle(color: Colors.white, fontSize: 14)),
+                Row(
+                  children: <Widget>[
+                    Image.asset('images/icon_jifen.png'),
+                    Text('x${playerInfo.bonus}', style: TextStyle(color: Color(0xFFFFB726), fontWeight: FontWeight.w500, fontSize: 14))
+                  ],
+                )
               ],
             )
           ],

+ 53 - 18
lib/pages/UserPage.dart

@@ -12,13 +12,12 @@ import '../net/HttpManager.dart';
 import '../net/Result.dart';
 import '../redux/UserRedux.dart';
 import '../pages/UserChange.dart';
-import '../pages/RoomCardList.dart';
 import '../pages/MyTeam.dart';
 import '../pages/MyCode.dart';
 import '../widget/LinearButton.dart';
 import 'Setting.dart';
 import 'ShoppingMall.dart';
-import 'OpenRoom.dart';
+import '../model/CustomerService.dart';
 
 class UserPage extends StatefulWidget {
   @override
@@ -26,12 +25,21 @@ class UserPage extends StatefulWidget {
 }
 
 class _UserPageState extends State<UserPage> with WidgetsBindingObserver {
+  CustomerService customerService;
+
   Future<void> getUserInfo() async {
     Result res = await HttpManager.get('userInfo/getUserInfo');
     if (res.success) {
       print(res.data);
       StoreProvider.of<AppState>(context).dispatch(UpdateUserAction(UserInfo.fromJson(res.data)));
     } else {}
+
+    Result res2 = await HttpManager.get('customerService/random');
+    if (res2.success) {
+      setState(() {
+        customerService = CustomerService.fromJson(res2.data);
+      });
+    }
   }
 
   @override
@@ -73,33 +81,60 @@ class _UserPageState extends State<UserPage> with WidgetsBindingObserver {
                               },
                             ),
                             Container(
-                              height: 4,
+                              height: 2,
                             ),
                             Text(
                               userInfo.nickname,
                               style: TextStyle(fontSize: 20, color: Colors.white, fontWeight: FontWeight.w700),
                             ),
                             Container(
-                              height: 20,
+                              height: 5,
                             ),
                             Row(
-                              mainAxisAlignment: MainAxisAlignment.spaceAround,
+                              mainAxisAlignment: MainAxisAlignment.center,
                               children: <Widget>[
+                                Text(
+                                  '我的积分',
+                                  style: TextStyle(fontSize: 14, color: Color(0xFFFFB726), fontWeight: FontWeight.w700),
+                                ),
+                                Container(
+                                  width: 5,
+                                ),
+                                Image.asset('images/icon_jifen.png'),
+                                Text(
+                                  'x${userInfo.moneyCoin}',
+                                  style: TextStyle(fontSize: 14, color: Color(0xFFFFB726), fontWeight: FontWeight.w700),
+                                ),
                                 Container(
-                                  width: 165,
-                                  child: LinearButton(
-                                    btntext: '发起比赛',
-                                    btnHeight: 38.0,
-                                    colorList: [Colors.white, Colors.white],
-                                    textColor: Color(0xFF252532),
-                                    textSize: 13.0,
-                                    onTapHomeMenu: () {
-                                      Navigator.push(context, CupertinoPageRoute(builder: (context) => OpenRoom(roomFlag: '0')));
-                                    },
-                                  ),
+                                  width: 10,
                                 ),
+                                customerService!=null?Text(
+                                  '客服QQ:${customerService.qq}',
+                                  style: TextStyle(fontSize: 14, color: Colors.white, fontWeight: FontWeight.w600),
+                                ):Container(),
+                              ],
+                            ),
+                            Container(
+                              height: 20,
+                            ),
+                            Row(
+                              mainAxisAlignment: MainAxisAlignment.spaceAround,
+                              children: <Widget>[
+                                // Container(
+                                //   width: 165,
+                                //   child: LinearButton(
+                                //     btntext: '发起比赛',
+                                //     btnHeight: 38.0,
+                                //     colorList: [Colors.white, Colors.white],
+                                //     textColor: Color(0xFF252532),
+                                //     textSize: 13.0,
+                                //     onTapHomeMenu: () {
+                                //       Navigator.push(context, CupertinoPageRoute(builder: (context) => OpenRoom(roomFlag: '0')));
+                                //     },
+                                //   ),
+                                // ),
                                 Container(
-                                    width: 165,
+                                    width: 250,
                                     child: LinearButton(
                                       btntext: '充值参赛券',
                                       btnHeight: 38.0,
@@ -223,7 +258,7 @@ class DrawerMenu extends StatelessWidget {
             tipValue != null
                 ? Text(
                     tipValue.toString(),
-                    style: TextStyle(fontSize: 13, color: Theme.of(context).primaryColor,fontWeight: FontWeight.w600),
+                    style: TextStyle(fontSize: 13, color: Theme.of(context).primaryColor, fontWeight: FontWeight.w600),
                   )
                 : Container(),
             Image.asset('images/icon_inter.png')

+ 3 - 3
lib/pages/VideoPlayer.dart

@@ -39,9 +39,9 @@ class _VideoPlayerPageState extends State<VideoPlayerPage> {
   @override
   Widget build(BuildContext context) {
     return Scaffold(
-        // appBar: AppBar(
-        //   title: Text('视频'),
-        // ),
+        appBar: AppBar(
+          title: Text('比赛记录'),
+        ),
         body: Container(
             // height: 300.0,
             child: isNet

+ 1 - 1
lib/styles/colors.dart

@@ -10,7 +10,7 @@ const SUB_COLOR = Color(0xFFA6554F);
 const BG_COLOR = Color(0xFF2E3049);
 
 //辅助背景色
-const BG_SUB_COLOR = Color(0xFF232437);
+const BG_SUB_COLOR = Color(0xFF2E3049);
 
 const PLACEHOLDER_COLOR = Color(0xFF727785);
 

+ 19 - 5
lib/widget/HouseItem.dart

@@ -68,7 +68,7 @@ class HouseItem extends StatelessWidget {
                             Container(
                               height: 4,
                             ),
-                            Text('游戏中击败${houseInfo.killnumber}人', style: TextStyle(fontSize: 13, color: Color(0xFF999999)))
+                            Text('目标:杀戮${houseInfo.killnumber}人', style: TextStyle(fontSize: 13, color: Color(0xFF999999)))
                           ],
                         ),
                       ),
@@ -94,12 +94,26 @@ class HouseItem extends StatelessWidget {
 
   Widget _topWidget(PlayerInfo playerInfo) {
     if (playerInfo == null) {
-      return Image.asset('images/join.png');
+      if (houseInfo.statusFlag == 0) {
+        return Image.asset('images/join.png');
+      } else if (houseInfo.statusFlag == 2) {
+        return Text('进行中', style: prefix0.TextStyle(color: Color(0xFF5C5C5C), fontSize: 14, fontWeight: FontWeight.w600));
+      } else if (houseInfo.statusFlag == 3) {
+        return Text('解析中', style: prefix0.TextStyle(color: Color(0xFF5C5C5C), fontSize: 14, fontWeight: FontWeight.w600));
+      } else if (houseInfo.statusFlag == 8) {
+        return Text('结算中', style: prefix0.TextStyle(color: Color(0xFF5C5C5C), fontSize: 14, fontWeight: FontWeight.w600));
+      } else {
+        return Text('已结束', style: prefix0.TextStyle(color: Color(0xFF5C5C5C), fontSize: 14, fontWeight: FontWeight.w600));
+      }
     } else {
-      if (playerInfo.ranking == 1) {
-        return Text('吃鸡', style: prefix0.TextStyle(color: Color(0xFFD4504B), fontSize: 14, fontWeight: FontWeight.w600));
+      if (houseInfo.statusFlag == 2 || houseInfo.statusFlag == 3) {
+        return Text('待结算', style: prefix0.TextStyle(color: Color(0xFF5C5C5C), fontSize: 14, fontWeight: FontWeight.w600));
+      } else if (playerInfo.houseRank!=null&&playerInfo.houseRank < 4) {
+        return Text('第${playerInfo.houseRank}名', style: prefix0.TextStyle(color: Color(0xFFD4504B), fontSize: 14, fontWeight: FontWeight.w600));
+      } else if (playerInfo.houseRank != null && playerInfo.statusFlag != 7 && playerInfo.statusFlag != 9 && !playerInfo.dataError) {
+        return Text('第${playerInfo.houseRank}名', style: prefix0.TextStyle(color: Color(0xFFD4504B), fontSize: 14, fontWeight: FontWeight.w600));
       } else {
-        return Text('未吃鸡', style: prefix0.TextStyle(color: Color(0xFF5C5C5C), fontSize: 14, fontWeight: FontWeight.w600));
+        return Text('解析失败', style: prefix0.TextStyle(color: Color(0xFF5C5C5C), fontSize: 14, fontWeight: FontWeight.w600));
       }
     }
     // return Container();

+ 9 - 8
lib/widget/ITextInput.dart

@@ -207,14 +207,15 @@ class _ITextFieldState extends State<ITextField> {
               child: Text('取消', style: TextStyle(fontSize: 16, color: Colors.white)),
             ),
             onTap: () {
-              setState(() {
-                setState(() {
-                  _inputText = '';
-                  _hasdeleteIcon = (_inputText.isNotEmpty);
-                  widget.fieldCallBack(_inputText);
-                  _focusNode.unfocus();
-                });
-              });
+              Navigator.of(context).pop(true);
+              // setState(() {
+               
+              //     _inputText = '';
+              //     _hasdeleteIcon = (_inputText.isNotEmpty);
+              //     widget.fieldCallBack(_inputText);
+              //     _focusNode.unfocus();
+               
+              // });
             },
           )
         ],

+ 55 - 43
lib/widget/SuccessfulReception.dart

@@ -1,8 +1,15 @@
 import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'dart:ui';
+import '../styles/totast.dart';
+import '../net/HttpManager.dart';
+import '../net/Result.dart';
+import '../widget/LinearButton.dart';
 
 class SuccessfulReception extends StatefulWidget {
-  SuccessfulReception({Key key, this.money}) : super(key: key);
+  SuccessfulReception({Key key, this.money, this.playerId}) : super(key: key);
   final int money;
+  final int playerId;
   @override
   SuccessfulReceptionState createState() => SuccessfulReceptionState();
 }
@@ -27,56 +34,61 @@ class SuccessfulReceptionState extends State<SuccessfulReception> {
         body: Container(
           child: Center(
               child: Stack(
-                children: <Widget>[
-                  Container(
-                  padding: EdgeInsets.only(top: 29, bottom: 49),
+            children: <Widget>[
+              Container(
+                  // padding: EdgeInsets.only(top: 29, bottom: 49),
                   width: 268,
-                  height: 160,
+                  height: 294,
                   decoration: BoxDecoration(
                       border: Border.all(width: 1, color: Theme.of(context).primaryColor),
-                      image: DecorationImage(
-                          image: AssetImage('images/img_guangmang_1.png'),
-                          fit: BoxFit.cover)),
+                      color: Color(0xFF15151D),
+                      image: DecorationImage(image: AssetImage('images/img_guangmang1.png'), alignment: Alignment.topCenter, fit: BoxFit.contain)),
                   child: Column(
-                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                     crossAxisAlignment: CrossAxisAlignment.center,
                     children: <Widget>[
-                      Text('领取成功',
-                          style: TextStyle(
-                              color: Color(0xFFFDC372),
-                              fontSize: 18,
-                              fontWeight: FontWeight.w600)),
-                      Row(
-                        mainAxisAlignment: MainAxisAlignment.center,
-                        children: <Widget>[
-                          Image.asset('images/icon_jinbi_da_hong.png'),
-                          Text(' X ' + widget.money.toString(),
-                              style: TextStyle(
-                                  color: Theme.of(context).primaryColor,
-                                  fontSize: 32,
-                                  fontWeight: FontWeight.w900))
-                        ],
-                      )
-                    ],
-                  )),
-                   Positioned(
-                      top: 0,
-                      left: 0,
-                      child: Image.asset(
-                        'images/tancuang_shang.png',
-                        // width: 131,
+                      Container(
+                        height: 63,
+                      ),
+                      Image.asset(
+                        'images/iocn_dajiafen.png',
+                      ),
+                      Container(
+                        height: 25,
                       ),
-                    ),
-                    Positioned(
-                      bottom: 0,
-                      right: 4,
-                      child: Image.asset(
-                        'images/tancuang_xia.png',
-                        // width: 148,
+                      Text('恭喜你获得${widget.money}积分', style: TextStyle(color: Color(0xFFC2524D), fontSize: 18, fontWeight: FontWeight.w600)),
+                      Container(
+                        height: 44,
                       ),
-                    ),
-                ],
-              )),
+                      Padding(
+                        padding: EdgeInsets.symmetric(horizontal: 25),
+                        child: LinearButton(
+                          btntext: '确定',
+                          btnHeight: 36.0,
+                          onTapHomeMenu: () {
+                             Navigator.of(context).pop();
+                          },
+                        ),
+                      ),
+                    ],
+                  )),
+              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,
+                ),
+              ),
+            ],
+          )),
         ),
       ),
     );

+ 5 - 5
lib/widget/VideoWidget.dart

@@ -1,6 +1,7 @@
 import 'package:video_player/video_player.dart';
 import 'package:flutter/material.dart';
 import 'package:cached_network_image/cached_network_image.dart';
+import '../net/HttpManager.dart';
 
 class VideoWidget extends StatefulWidget {
   VideoWidget({Key key, this.videoSrc}) : super(key: key);
@@ -12,8 +13,7 @@ class VideoWidget extends StatefulWidget {
 
 class VideoWidgetState extends State<VideoWidget> {
   VideoPlayerController _controller;
-  String _defaultVideo =
-      'http://oss.izouma.com/shouyoudianjing/video/2019-03-01-11-19-41-ivqsgiy9.mp4';
+  String _defaultVideo =HttpManager.baseUrl+'houseinfo.mp4';
   bool isVideo = true;
   bool showVideo = false;
   bool isPlay = false;
@@ -77,7 +77,7 @@ class VideoWidgetState extends State<VideoWidget> {
             : Image.network(
                 widget.videoSrc,
                 width: double.infinity,
-                height: 210,
+                height: 200,
                 fit: BoxFit.cover,
               )
       ],
@@ -86,8 +86,8 @@ class VideoWidgetState extends State<VideoWidget> {
 
   Widget _playContainer() {
     return Container(
-      color: Colors.black,
-      height: 200,
+      // color: Colors.black,
+      // height: 200,
       width: double.infinity,
       child: Center(
         child: Stack(