panhui пре 6 година
родитељ
комит
f08ac3bf72

+ 3 - 1
lib/model/PlayerInfo.dart

@@ -8,7 +8,7 @@ part 'PlayerInfo.g.dart';
 @JsonSerializable()
 class PlayerInfo {
   PlayerInfo(
-      this.id, this.houseId, this.userId, this.statusFlag, this.userInfo,this.bonus,this.gameInfo,this.houseInfo,this.rank,this.houseRank,this.video,this.platinum,this.gold,this.silver,this.bronze,this.medal,this.liveTime,this.score,this.ranking,this.beginTime,this.endTime,this.dataError);
+      this.id, this.houseId, this.userId, this.statusFlag, this.userInfo,this.bonus,this.gameInfo,this.houseInfo,this.rank,this.houseRank,this.video,this.platinum,this.gold,this.silver,this.bronze,this.medal,this.liveTime,this.score,this.ranking,this.beginTime,this.endTime,this.dataError,this.killNumber,this.needkill);
   int id;
   int houseId; //房间id
   int userId; //用户id
@@ -31,6 +31,8 @@ class PlayerInfo {
   int beginTime;//开始比赛时间
   int endTime;//结束比赛时间
   bool dataError;//数据异常
+  int killNumber;//
+  int needkill;
   
   factory PlayerInfo.fromJson(Map<String, dynamic> json) =>
       _$PlayerInfoFromJson(json);

+ 6 - 2
lib/model/PlayerInfo.g.dart

@@ -29,7 +29,9 @@ PlayerInfo _$PlayerInfoFromJson(Map<String, dynamic> json) {
       json['ranking'] == null ? 0 : (json['ranking'] as int),
       json['beginTime'] as int,
       json['endTime'] as int,
-      json['dataError'] as bool);
+      json['dataError'] as bool,
+      json['killNumber'] != null ? json['killNumber'] as int : 0,
+      json['needkill'] != null ? json['needkill'] as int : 999);
 }
 
 Map<String, dynamic> _$PlayerInfoToJson(PlayerInfo instance) => <String, dynamic>{
@@ -51,5 +53,7 @@ Map<String, dynamic> _$PlayerInfoToJson(PlayerInfo instance) => <String, dynamic
       'medal': instance.medal,
       'beginTime': instance.beginTime,
       'endTime': instance.endTime,
-      'dataError':instance.dataError
+      'dataError': instance.dataError,
+      'killNumber': instance.killNumber,
+      'needkill': instance.needkill
     };

+ 22 - 21
lib/pages/ChoosePay.dart

@@ -8,11 +8,7 @@ import '../redux/AppState.dart';
 import '../model/ProductInfo.dart';
 import '../redux/UserRedux.dart';
 import '../model/UserInfo.dart';
-import 'package:fluwx/fluwx.dart' as fluwx;
-import 'package:get_ip/get_ip.dart';
-import 'package:dio/dio.dart';
-import 'dart:convert';
-import '../widget/Dialog.dart';
+import 'package:url_launcher/url_launcher.dart';
 
 class ChoosePay extends StatefulWidget {
   ChoosePay(this.type, this.chooseProduct);
@@ -89,6 +85,12 @@ class _ChoosePayState extends State<ChoosePay> with WidgetsBindingObserver {
           textColor: Colors.white,
           child: Text('立即支付'),
           onPressed: () async {
+            const url = 'https://flutter.dev';
+            if (await canLaunch(url)) {
+              await launch(url);
+            } else {
+              throw 'Could not launch $url';
+            }
             // return;
             // String ipAddress = await GetIp.ipAddress;
             // print(ipAddress);
@@ -117,22 +119,21 @@ class _ChoosePayState extends State<ChoosePay> with WidgetsBindingObserver {
             //   });
             // }
 
-            
-            Toast.show(context, '加载中', -1, 'loading');
-            final Result res = await HttpManager.post('productInfo/buy', data: {
-              'userId': StoreProvider.of<AppState>(context).state.userInfo.id,
-              'typeFlag': widget.type,
-              'money': widget.chooseProduct.money,
-              'id': widget.chooseProduct.id
-            });
-            Toast.hide();
-            if (res.success) {
-              Toast.show(context, '购买成功', 1500, 'success');
-              getUserInfo();
-              Navigator.of(context).pop();
-            } else {
-              Toast.show(context, res.error, 1500, 'info');
-            }
+            // Toast.show(context, '加载中', -1, 'loading');
+            // final Result res = await HttpManager.post('productInfo/buy', data: {
+            //   'userId': StoreProvider.of<AppState>(context).state.userInfo.id,
+            //   'typeFlag': widget.type,
+            //   'money': widget.chooseProduct.money,
+            //   'id': widget.chooseProduct.id
+            // });
+            // Toast.hide();
+            // if (res.success) {
+            //   Toast.show(context, '购买成功', 1500, 'success');
+            //   getUserInfo();
+            //   Navigator.of(context).pop();
+            // } else {
+            //   Toast.show(context, res.error, 1500, 'info');
+            // }
           },
         ),
       ),

+ 23 - 2
lib/pages/MatchPage.dart

@@ -44,6 +44,8 @@ class _MatchPageState extends State<MatchPage> with WidgetsBindingObserver {
   FocusNode _focusNode = new FocusNode();
   List<PhoneInfo> phoneList = [];
   int tipNum = 0;
+  bool showMoreRoom = false;
+  bool isFinish = false;
 
   Future<void> getUnreadMsg() async {
     Result res = await HttpManager.get('systemNotice/unread', data: {'userId': StoreProvider.of<AppState>(context).state.userInfo.id, 'statusFlag': 0});
@@ -146,6 +148,9 @@ class _MatchPageState extends State<MatchPage> with WidgetsBindingObserver {
       if (res.data['page']['currentPage'] < res.data['page']['totalPage']) {
         scrollFlag = true;
       } else {
+        setState(() {
+          isFinish = true;
+        });
         scrollFlag = false;
       }
     } else {}
@@ -225,11 +230,21 @@ class _MatchPageState extends State<MatchPage> with WidgetsBindingObserver {
     // gameList.add(GameInfo.fromJson({"id": 0, "gameName": '全部游戏'}));
     _controller.addListener(() {
       if (_controller.position.pixels == _controller.position.maxScrollExtent) {
+        print('底部。。。');
+        setState(() {
+          showMoreRoom = true;
+        });
         if (scrollFlag) {
           setState(() {
             currentPage++;
           });
           getRoomInfo();
+        } else {
+          Future.delayed(Duration(seconds: 2), () async {
+            setState(() {
+              showMoreRoom = false;
+            });
+          });
         }
       }
     });
@@ -484,7 +499,8 @@ class _MatchPageState extends State<MatchPage> with WidgetsBindingObserver {
                           },
                         );
                       } else if (index == houseList.length) {
-                        return Text('更多房间敬请期待...', style: TextStyle(color: Colors.grey, fontSize: 13, height: 3), textAlign: TextAlign.center);
+                        return Text(isFinish ? '更多房间敬请期待...' : '加载中...',
+                            style: TextStyle(color: Colors.grey, fontSize: 13, height: 3), textAlign: TextAlign.center);
                       }
                       return HouseItem(
                         houseList[index],
@@ -496,7 +512,12 @@ class _MatchPageState extends State<MatchPage> with WidgetsBindingObserver {
                           });
                         },
                       );
-                    }, childCount: (houseList.length!=0&& houseList.length<5)?houseList.length : houseList.length + 1),
+                    }, childCount: (houseList.length != 0 && (houseList.length < 5 || !showMoreRoom)) ? houseList.length : houseList.length + 1),
+                  ),
+                  SliverToBoxAdapter(
+                    child: Container(
+                      height: 30,
+                    ),
                   )
                 ],
               ),

+ 36 - 16
lib/pages/RankList.dart

@@ -32,10 +32,11 @@ class RankListState extends State<RankList> {
   int gameId = 0;
   List<CompetitionSeason> seasonList = [];
   UserInfo myPlayInfo;
+  bool isFinish = false;
+  bool showMore = false;
 
   Future<void> getUserRank() async {
-    Result res = await HttpManager.get('userInfo/myCoinRank',
-        data: { 'id': 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) {
@@ -55,7 +56,7 @@ class RankListState extends State<RankList> {
   Future<void> getListPage() async {
     scrollFlag = false;
     Toast.show(context, '加载中', -1, 'loading');
-    Result res = await HttpManager.get('userInfo/coinRank', data: { 'currentPage': currentPage, 'pageNumber': 20});
+    Result res = await HttpManager.get('userInfo/coinRank', data: {'currentPage': currentPage, 'pageNumber': 20});
     Toast.hide();
     List<UserInfo> list = rankList;
     if (currentPage == 1) {
@@ -69,6 +70,10 @@ class RankListState extends State<RankList> {
       }
       if (res.data['page']['currentPage'] < res.data['page']['totalPage']) {
         scrollFlag = true;
+      } else {
+        setState(() {
+          isFinish = true;
+        });
       }
     } else {}
     setState(() {
@@ -136,9 +141,18 @@ class RankListState extends State<RankList> {
     _mcontroller = ScrollController();
     _mcontroller.addListener(() {
       if (_mcontroller.position.pixels == _mcontroller.position.maxScrollExtent) {
+        setState(() {
+          showMore = true;
+        });
         if (scrollFlag) {
           currentPage++;
           getListPage();
+        } else {
+          Future.delayed(Duration(seconds: 2), () {
+            setState(() {
+              showMore = false;
+            });
+          });
         }
       }
     });
@@ -177,9 +191,7 @@ class RankListState extends State<RankList> {
                 child: CustomScrollView(
                   controller: _mcontroller,
                   physics: AlwaysScrollableScrollPhysics(),
-                  slivers: <Widget>[
-                    _sliverList()
-                  ],
+                  slivers: <Widget>[_sliverList()],
                 )),
           ),
         ),
@@ -258,14 +270,20 @@ class RankListState extends State<RankList> {
           if (index != rankList.length) {
             return RankItem(rankList[index], index);
           } else {
-            return Padding(
-              padding: EdgeInsets.only(top: 10, bottom: 68),
-              child: Text(
-                '没有更多了',
-                textAlign: TextAlign.center,
-                style: TextStyle(color: Colors.white30),
-              ),
-            );
+            return showMore
+                ? Container(
+                    height: 60,
+                    child: Center(
+                      child: Text(
+                        isFinish ? '没有更多了' : '加载中...',
+                        textAlign: TextAlign.center,
+                        style: TextStyle(color: Colors.white30),
+                      ),
+                    ),
+                  )
+                : Container(
+                    height: 60,
+                  );
           }
         },
         childCount: rankList.length + 1,
@@ -506,7 +524,7 @@ class RankItem extends StatelessWidget {
               ),
               Expanded(
                 flex: 1,
-                child: Text(playerInfo.nickname!=null?playerInfo.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(), '铂金'),
@@ -550,7 +568,9 @@ class Medal extends StatelessWidget {
       child: Row(
         children: <Widget>[
           Image.asset(medalInfo[name]["img"]),
-          Container(width: 5,),
+          Container(
+            width: 5,
+          ),
           Text(
             value,
             style: TextStyle(color: Colors.white, fontSize: 14),

+ 157 - 84
lib/pages/RoomInfo.dart

@@ -95,6 +95,7 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
 
 //隔一秒检查是否开始
   Future<void> getNowStatus() async {
+    print('检查执行');
     Result res = await HttpManager.get('houseInfo/getPlayerNum', data: {'id': widget.roomId});
     if (res.success) {
       if (houseInfo.statusFlag == 0 && res.data['statusFlag'] == 2) {
@@ -110,6 +111,8 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
 
       if (houseInfo.statusFlag == 4) {
         checkJoinInfo();
+      } else if (!isJoin) {
+        checkJoinInfo();
       }
     }
   }
@@ -211,6 +214,7 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
       int time = houseInfo.beginTime + 1 * 3600 * 1000 - DateTime.now().millisecondsSinceEpoch;
       var nowTime = (time ~/ 1000 ~/ 60) % 60;
       setState(() {
+        showHelloWord = false;
         roomTipsList.add([
           {"value": '你已完成本次比赛,当前完成人数 ', "type": 0},
           {"value": res.data.toString(), "type": 1},
@@ -248,17 +252,19 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
             changeScroll();
           }
 
-          setState(() {
-            showHelloWord = true;
-          });
+          if (!showHelloWord) {
+            setState(() {
+              showHelloWord = true;
+            });
 
-          // if (isJoin) {
-          // roomTipsList.add([{
-          //   "value":'亲爱的玩家:',
-          // }]);
-          // }
+            // if (isJoin) {
+            // roomTipsList.add([{
+            //   "value":'亲爱的玩家:',
+            // }]);
+            // }
 
-          changeScroll();
+            changeScroll();
+          }
         }
       } else {
         // if (houseInfo.statusFlag == 0) {
@@ -314,9 +320,17 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
     }
 
     if (isJoin && houseInfo.statusFlag != 4 || houseInfo.statusFlag == 0) {
+      print('检查1');
+      if (timer != null) {
+        timer.cancel();
+      }
       timer = Timer.periodic(Duration(seconds: 1), (timer) {
         print('检查');
-        getNowStatus();
+        if (houseInfo.statusFlag == 4) {
+          timer.cancel();
+        } else {
+          getNowStatus();
+        }
       });
     }
 
@@ -324,6 +338,7 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
       setState(() {
         showJiexie = true;
       });
+      //申诉
       HttpManager.get('appealInfo/getOne', data: {
         'userId': StoreProvider.of<AppState>(context).state.userInfo.id,
         'playerInfoId': playerInfo.id,
@@ -358,33 +373,33 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
     }
 
     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();
+        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;
+        } else {
+          Toast.show(context, '加入成功', 1500, 'success');
+        }
       } else {
         Toast.show(context, res.error, 1500, 'info');
       }
@@ -456,6 +471,10 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
       userInfo = StoreProvider.of<AppState>(context).state.userInfo;
       // showStart();
     });
+
+    if (timer != null) {
+      timer.cancel();
+    }
   }
 
   @override
@@ -745,7 +764,7 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
                           timeStr != ''
                               ? Container(
                                   decoration: BoxDecoration(
-                                    color: Color.fromARGB(10, 212, 80, 75),
+                                    color: Color(0xFF3E3348),
                                     borderRadius: BorderRadius.all(Radius.circular(4)),
                                   ),
                                   margin: EdgeInsets.fromLTRB(15, 15, 15, 0),
@@ -774,7 +793,7 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
                                   ))
                               : Container(),
 
-                          showHelloWord
+                          statuFlag != 4 && showHelloWord
                               ? Container(
                                   width: double.infinity,
                                   padding: EdgeInsets.all(15),
@@ -833,11 +852,13 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
                                               height: 40,
                                               decoration: BoxDecoration(color: Color(0xFF3E3348), borderRadius: BorderRadius.all(Radius.circular(4))),
                                               child: Text(
-                                                playerInfo.houseRank < 4
-                                                    ? '恭喜您,您获得了第${playerInfo.houseRank}名!'
-                                                    : (playerInfo.statusFlag != 7 && playerInfo.statusFlag != 9 && !playerInfo.dataError
-                                                        ? '很遗憾您未能进入前三名,下次加油!'
-                                                        : '很遗憾您本次上传的比赛结果解析失败'),
+                                                playerInfo.statusFlag == 7 ||
+                                                        playerInfo.statusFlag == 9 ||
+                                                        playerInfo.dataError ||
+                                                        playerInfo.statusFlag == 6 ||
+                                                        playerInfo.killNumber < playerInfo.needkill
+                                                    ? (playerInfo.statusFlag == 6 ? '很遗憾您本次未参赛' : '很遗憾您本次任务失败,下次加油!')
+                                                    : (playerInfo.houseRank < 4 ? '恭喜您,您获得了第${playerInfo.houseRank}名!' : '很遗憾您未能进入前三名,下次加油!'),
                                                 style: prefix0.TextStyle(
                                                   color: Color(0xFFD4504B),
                                                   fontSize: 15,
@@ -845,7 +866,11 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
                                                 textAlign: TextAlign.center,
                                               ),
                                             ),
-                                            ((playerInfo.statusFlag != 7 && playerInfo.statusFlag != 9 && !playerInfo.dataError) || playerInfo.houseRank < 4)
+                                            (playerInfo.statusFlag != 7 &&
+                                                    playerInfo.statusFlag != 9 &&
+                                                    !playerInfo.dataError &&
+                                                    playerInfo.statusFlag != 6 &&
+                                                    playerInfo.killNumber >= playerInfo.needkill)
                                                 ? Container(
                                                     margin: EdgeInsets.symmetric(vertical: 10, horizontal: 15),
                                                     padding: EdgeInsets.all(15),
@@ -891,48 +916,80 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
                                                       ],
                                                     ),
                                                   )
-                                                : 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),
+                                                : playerInfo.statusFlag == 6
+                                                    ? 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(
-                                                          '4、游戏时间过长,没有在最大时间内返回平台APP点击结束游戏 ',
-                                                          style: TextStyle(color: Colors.white, fontSize: 13),
+                                                      )
+                                                    : 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、使用作弊手段进行游戏  ',
+                                                              style: TextStyle(color: Colors.white, fontSize: 13),
+                                                            ),
+                                                            Text(
+                                                              '4、手机性能或电量过低,在运行和平精英游戏时自动将我们平台APP从后台进程中退掉  ',
+                                                              style: TextStyle(color: Colors.white, fontSize: 13),
+                                                            ),
+                                                            Text(
+                                                              '5、游戏时间过长,没有在最大时间内返回平台APP点击结束游戏 ',
+                                                              style: TextStyle(color: Colors.white, fontSize: 13),
+                                                            ),
+                                                          ],
                                                         ),
-                                                      ],
-                                                    ),
-                                                  )
+                                                      )
                                           ],
                                         )
                                       : Container(),
                                 ),
+
                           Container(
                             width: double.infinity,
                             height: 78,
@@ -1149,7 +1206,15 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
         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)) {
+      if (isJoin &&
+          canAppeal &&
+          appealState == 0 &&
+          playerInfo != null &&
+          (playerInfo.statusFlag == 9 ||
+              playerInfo.statusFlag == 7 ||
+              playerInfo.dataError ||
+              playerInfo.statusFlag == 6 ||
+              playerInfo.killNumber < playerInfo.needkill)) {
         return Container(
             width: double.infinity,
             padding: EdgeInsets.symmetric(horizontal: 15, vertical: 20),
@@ -1223,10 +1288,18 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
                         ),
                       )
                     : Container(),
-                Text(
-                  '${myRank}',
-                  style: TextStyle(fontSize: 14, color: Color(0xFF252532), fontWeight: FontWeight.w500),
-                )
+                playerInfo != null
+                    ? Text(
+                        (playerInfo.statusFlag == 7 ||
+                                playerInfo.statusFlag == 9 ||
+                                playerInfo.dataError ||
+                                playerInfo.statusFlag == 6 ||
+                                playerInfo.killNumber < playerInfo.needkill)
+                            ? '任务失败'
+                            : '${playerInfo.houseRank}',
+                        style: TextStyle(fontSize: 14, color: Color(0xFF252532), fontWeight: FontWeight.w500),
+                      )
+                    : Container()
               ],
             ),
           ),
@@ -1247,7 +1320,7 @@ class TipsListContent extends StatelessWidget {
   @override
   Widget build(BuildContext context) {
     return Container(
-      margin: EdgeInsets.only(top: 15),
+      // margin: EdgeInsets.only(top: 15),
       width: double.infinity,
       child: Column(
         children: _list(),
@@ -1292,7 +1365,7 @@ class Tips extends StatelessWidget {
       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),
+            item['type'] == 0 ? TextStyle(color: Colors.white, fontSize: 13) : TextStyle(fontWeight: FontWeight.w600, color: Color(0xFFFFB726), fontSize: 13),
       ));
     }
     return Text.rich(TextSpan(children: list));

+ 10 - 7
lib/pages/SecondRoomInfo.dart

@@ -133,13 +133,16 @@ class SecondPageState extends State<SecondPage> {
 
   Widget PersonItem(PlayerInfo info, int index) {
     String img = '';
-     if (info.houseRank ==1) {
-      img = jiangpaiImg[0];
-    } else if (info.houseRank ==2) {
-      img = jiangpaiImg[1];
-    } else if (info.houseRank ==3) {
-      img = jiangpaiImg[2];
+    if (info.statusFlag != 7 && info.statusFlag != 9 && !info.dataError && info.statusFlag != 6 && info.killNumber >= info.needkill) {
+      if (info.houseRank == 1) {
+        img = jiangpaiImg[0];
+      } else if (info.houseRank == 2) {
+        img = jiangpaiImg[1];
+      } else if (info.houseRank == 3) {
+        img = jiangpaiImg[2];
+      }
     }
+
     return Container(
       width: double.infinity,
       height: 60,
@@ -172,7 +175,7 @@ class SecondPageState extends State<SecondPage> {
                 overflow: TextOverflow.ellipsis,
               ),
             ),
-            widget.status == 4 && index < 3 && info.video != '' && info.video != null
+            (widget.status == 4 && index < 3 && info.video != '' && info.video != null && img != '')
                 ? Container(
                     width: 68,
                     height: 24,

+ 42 - 8
lib/pages/TipInfo.dart

@@ -197,10 +197,40 @@ 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,playerInfo: playerInfo,) : Container(),
+                houseInfo != null && type != 3
+                    ? HouseItem(
+                        houseInfo,
+                        gameInfo,
+                        playerInfo: playerInfo,
+                      )
+                    : Container(),
                 houseInfo != null && playerInfo != null && type != 3
-                    ? (playerInfo != null && playerInfo.dataError && playerInfo.houseRank > 3
-                        ? Container(
+                    ? (playerInfo != null &&  (type == 4 || type == 0)
+                        ? ( type == 0?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),
+                                ),
+                              ],
+                            ),
+                          ):Container(
                             margin: EdgeInsets.symmetric(vertical: 10, horizontal: 15),
                             padding: EdgeInsets.all(15),
                             // height: 239,
@@ -219,24 +249,28 @@ class TipInfoState extends State<TipInfo> {
                                   height: 10,
                                 ),
                                 Text(
-                                  '1、没有实际进行游戏比赛 ',
+                                  '1、游戏中杀戮人数未到房间任务要求',
+                                  style: TextStyle(color: Colors.white, fontSize: 13),
+                                ),
+                                Text(
+                                  '2、没有实际进行游戏比赛 ',
                                   style: TextStyle(color: Colors.white, fontSize: 13),
                                 ),
                                 Text(
-                                  '2、使用作弊手段进行游戏  ',
+                                  '3、使用作弊手段进行游戏  ',
                                   style: TextStyle(color: Colors.white, fontSize: 13),
                                 ),
                                 Text(
-                                  '3、手机性能或电量过低,在运行和平精英游戏时自动将我们平台APP从后台进程中退掉  ',
+                                  '4、手机性能或电量过低,在运行和平精英游戏时自动将我们平台APP从后台进程中退掉  ',
                                   style: TextStyle(color: Colors.white, fontSize: 13),
                                 ),
                                 Text(
-                                  '4、游戏时间过长,没有在最大时间内返回平台APP点击结束游戏 ',
+                                  '5、游戏时间过长,没有在最大时间内返回平台APP点击结束游戏 ',
                                   style: TextStyle(color: Colors.white, fontSize: 13),
                                 ),
                               ],
                             ),
-                          )
+                          ))
                         : _resultContent(houseInfo, playerInfo, tipInfo.typeFlag))
                     : Container(),
                 // (type == 2 || type == 3)

+ 6 - 1
lib/pages/TipList.dart

@@ -90,7 +90,7 @@ class TipListState extends State<TipList> {
                 child: ListView.builder(
                     physics: AlwaysScrollableScrollPhysics(),
                     controller: _mControll,
-                    itemCount: tipList.isNotEmpty ? tipList.length : 1,
+                    itemCount: tipList.isNotEmpty ? tipList.length+1: 1,
                     itemBuilder: (BuildContext context, int index) {
                       if (tipList.isEmpty) {
                         return Text(
@@ -99,6 +99,11 @@ class TipListState extends State<TipList> {
                           textAlign: TextAlign.center,
                         );
                       }
+                      if(index==tipList.length){
+                        return Container(
+                          height: 30,
+                        );
+                      }
                       return TipItem(
                           tipInfo: tipList[index],
                           tapInfo: () async {

+ 10 - 6
lib/widget/HouseItem.dart

@@ -107,13 +107,17 @@ class HouseItem extends StatelessWidget {
       }
     } else {
       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));
+        return Text('待结算', style: TextStyle(color: Color(0xFF5C5C5C), fontSize: 14, fontWeight: FontWeight.w600));
+      } else if (houseInfo.statusFlag == 8) {
+        return Text('结算中', style: TextStyle(color: Color(0xFF5C5C5C), fontSize: 14, fontWeight: FontWeight.w600));
+      } else if (playerInfo.houseRank != null && playerInfo.statusFlag != 7 && playerInfo.statusFlag != 9 && !playerInfo.dataError&&playerInfo.statusFlag!=6&&playerInfo.killNumber>=playerInfo.needkill) {
+        if (playerInfo.houseRank < 4) {
+          return Text('第${playerInfo.houseRank}名', style: TextStyle(color: Color(0xFFD4504B), fontSize: 14, fontWeight: FontWeight.w600));
+        } else {
+          return Text('第${playerInfo.houseRank}名', style: TextStyle(color: Color(0xFF5C5C5C), fontSize: 14, fontWeight: FontWeight.w600));
+        }
       } else {
-        return Text('解析失败', style: prefix0.TextStyle(color: Color(0xFF5C5C5C), fontSize: 14, fontWeight: FontWeight.w600));
+        return Text('任务失败', style: TextStyle(color: Color(0xFF5C5C5C), fontSize: 14, fontWeight: FontWeight.w600));
       }
     }
     // return Container();