Explorar el Código

Merge branch 'master' of http://git.izouma.com/panhui/mobileCyberGamesApp

x1ongzhu hace 6 años
padre
commit
03662617fd

+ 2 - 3
lib/main.dart

@@ -61,9 +61,8 @@ void main() async {
   ));
   final prefs = await SharedPreferences.getInstance();
   print(prefs.getString('token'));
-  // HttpManager.token = prefs.getString('token') ??
-  //     "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJkZWM2OTMxMy01Yjc3LTRlMTctOTcwOC0wYTZhM2JhZmZhM2EiLCJpc3MiOiJhZG1pbiIsImlhdCI6MTU1MTA3OTMzMCwic3ViIjoiODQ3MDMiLCJleHAiOjE1NTEzMzg1MzB9.6olL1T38rYRLBwKtTbFSI4cEMAbQf4iWVr1xXLObu8g";
-  HttpManager.token = prefs.getString('token') ?? "";
+  HttpManager.token = prefs.getString('token') ??
+      "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI0NWY0OGY2NS1jODQxLTRjNDgtYmY0My1jYTAwYzlkZjk5OWQiLCJpc3MiOiJhZG1pbiIsImlhdCI6MTU1MTMxNzAzMCwic3ViIjoiODQ3MDIiLCJleHAiOjE1NTE1NzYyMzB9.ILhuOwvblQKqVxNaLk9CbYas6aoUQAlzlZrTk4VLqY8";
   Result result = await HttpManager.get("userInfo/getUserInfo");
   AppState state = AppState.empty();
   if (result.success && result.data != null) {

+ 3 - 7
lib/model/GameInfo.g.dart

@@ -7,19 +7,15 @@ part of 'GameInfo.dart';
 // **************************************************************************
 
 GameInfo _$GameInfoFromJson(Map<String, dynamic> json) {
-  return GameInfo(
-      json['id'] as int,
-      json['gameName'] as String,
-      json['icon'] as String,
-      json['typeFlag'] as int);
+  return GameInfo(json['id'] as int, json['gameName'] as String,
+      json['icon'] as String, json['typeFlag'] as int);
 }
 
 //  int id;
 //   String gameName;//名称
 //   String icon;//图标
 //   int typeFlag;//类型
-Map<String, dynamic> _$GameInfoToJson(GameInfo instance) =>
-    <String, dynamic>{
+Map<String, dynamic> _$GameInfoToJson(GameInfo instance) => <String, dynamic>{
       'id': instance.id,
       'gameName': instance.gameName,
       'icon': instance.icon,

+ 3 - 3
lib/model/HouseInfo.g.dart

@@ -16,7 +16,7 @@ HouseInfo _$HouseInfoFromJson(Map<String, dynamic> json) {
     json['houseAbstract'] as String,
     json['video'] as String,
     // GameInfo.fromJson(json['gameInfo'] as Map),
-    json['playerNumber']as int,
+    json['playerNumber'] as int,
     json['maxNumber'] as int,
     json['bonus'] as int,
     json['houseType'] as int,
@@ -35,7 +35,7 @@ HouseInfo _$HouseInfoFromJson(Map<String, dynamic> json) {
 //   String houseAbstract; //房间描述
 //   String video; //视频
 //   GameInfo gameInfo; //游戏信息
-  // int playerNumber;//加入人数
+// int playerNumber;//加入人数
 //   int maxNumber; //最大加入人数
 //   int bonus; //奖金
 //   int houseType; //0为个人1为官方
@@ -52,7 +52,7 @@ Map<String, dynamic> _$HouseInfoToJson(HouseInfo instance) => <String, dynamic>{
       'houseAbstract': instance.houseAbstract,
       'video': instance.video,
       // 'gameInfo': instance.gameInfo,
-      'playerNumber':instance.playerNumber,
+      'playerNumber': instance.playerNumber,
       'maxNumber': instance.maxNumber,
       'bonus': instance.bonus,
       'houseType': instance.houseType,

+ 8 - 1
lib/model/SystemNotice.dart

@@ -1,10 +1,12 @@
 import 'package:json_annotation/json_annotation.dart';
+import 'GameInfo.dart';
+import 'HouseInfo.dart';
 
 part 'SystemNotice.g.dart';
 
 @JsonSerializable()
 class SystemNotice {
-  SystemNotice(this.id, this.gameId, this.houseId, this.userId,this.seasonId,this.content,this.icon,this.statusFlag,this.createTime);
+  SystemNotice(this.id, this.gameId, this.houseId, this.userId,this.seasonId,this.content,this.icon,this.typeFlag,this.statusFlag,this.createTime,this.playerId,this.gameInfo,this.houseInfo);
   int id;
   int gameId;//游戏ID
   int houseId;//房间ID
@@ -12,8 +14,13 @@ class SystemNotice {
   int seasonId;//赛季ID
   String content;//内容
   String icon;//图标
+  int typeFlag;//类型
   int statusFlag;//状态
   int createTime;//创建时间
+  int playerId;//玩家id
+  GameInfo gameInfo;//游戏信息
+  HouseInfo houseInfo;//房间信息
+
   factory SystemNotice.fromJson(Map<String, dynamic> json) =>
       _$SystemNoticeFromJson(json);
 

+ 17 - 6
lib/model/SystemNotice.g.dart

@@ -15,8 +15,12 @@ SystemNotice _$SystemNoticeFromJson(Map<String, dynamic> json) {
       json['seasonId'] as int,
       json['content'] as String,
       json['icon'] as String,
+      json['typeFlag'] as int,
       json['statusFlag'] as int,
-      json['createTime'] as int);
+      json['createTime'] as int,
+      json['playerId'] as int,
+      json['gameInfo'] != null ? GameInfo.fromJson(json['gameInfo']) : null,
+      json['houseInfo'] != null ? HouseInfo.fromJson(json['houseInfo']) : null);
 }
 
 // int id;
@@ -26,17 +30,24 @@ SystemNotice _$SystemNoticeFromJson(Map<String, dynamic> json) {
 //   int seasonId;//赛季ID
 //   String content;//内容
 //   String icon;//图标
-//   int statusFlag;//状态
+//   in typeFlag;//0.普通1.比赛结果2.领取奖励
+//   int statusFlag;//状态 0.未读1.已读
 //   int createTime;//创建时间
+// GameInfo gameInfo;//游戏信息
+// HouseInfo houseInfo;//房间信息
 Map<String, dynamic> _$SystemNoticeToJson(SystemNotice instance) =>
     <String, dynamic>{
       'id': instance.id,
-      'gameId': instance.gameId,
-      'houseId': instance.houseId,
+      'gameId': instance.gameId != null ? instance.gameId : 0,
+      'houseId': instance.houseId != null ? instance.houseId : 0,
       'userId': instance.userId,
-      'seasonId': instance.seasonId,
-      'icon': instance.icon,
+      'seasonId': instance.seasonId != null ? instance.seasonId : 0,
+      'icon': instance.icon != null ? instance.icon : '',
+      'typeFlag': instance.typeFlag,
       'content': instance.content,
       'statusFlag': instance.statusFlag,
       'createTime': instance.createTime,
+      'playerId': instance.playerId != null ? instance.playerId : 0,
+      'gameInfo': instance.gameInfo != null ? instance.gameInfo : Map(),
+      'HouseInfo': instance.houseInfo != null ? instance.houseInfo : Map(),
     };

+ 9 - 0
lib/net/HttpManager.dart

@@ -1,5 +1,6 @@
 import 'package:dio/dio.dart';
 import 'Result.dart';
+import 'package:intl/intl.dart';
 
 class HttpManager {
   static String baseUrl = "http://49.4.66.233:8201/";
@@ -38,3 +39,11 @@ class HttpManager {
     });
   }
 }
+
+
+
+String readTimestamp(int timestamp,String _timeType) {
+   
+
+    return DateFormat(_timeType).format(DateTime.fromMillisecondsSinceEpoch(timestamp));
+  }

+ 1 - 0
lib/pages/Example.dart

@@ -36,6 +36,7 @@ class RechrageState extends State<Rechrage> {
           Toast.hide();
           print("返回键点击了");
           Navigator.pop(context);
+          return Future.value(false);
         });
  
   }

+ 3 - 1
lib/pages/StartWindow.dart

@@ -81,7 +81,9 @@ class StartWindowState extends State<StartWindow> {
             )),
           ),
         ),
-        onWillPop: () {},
+        onWillPop: () {
+          return Future.value(false);
+        },
       ),
     );
   }

+ 226 - 0
lib/pages/TipInfo.dart

@@ -0,0 +1,226 @@
+import 'package:flutter/material.dart';
+import '../styles/colors.dart';
+import 'package:flutter/cupertino.dart';
+import 'dart:ui';
+import '../styles/totast.dart';
+import '../model/SystemNotice.dart';
+import '../net/HttpManager.dart';
+import '../net/Result.dart';
+import '../model/HouseInfo.dart';
+import '../model/GameInfo.dart';
+import '../pages/RoomInfo.dart';
+
+class TipInfo extends StatefulWidget {
+  TipInfo({Key key, this.tipId}) : super(key: key);
+  final int tipId;
+  @override
+  TipInfoState createState() => TipInfoState();
+}
+
+class TipInfoState extends State<TipInfo> {
+  SystemNotice tipInfo = SystemNotice.fromJson(
+      {'content': '', "createTime": DateTime.now().microsecondsSinceEpoch});
+  HouseInfo houseInfo;
+  getInfo() async {
+    Toast.show(context, '加载中', -1, 'loading');
+    Result res = await HttpManager.get("systemNotice/getOne",
+        data: {'id': widget.tipId});
+    Toast.hide();
+    if (res.success) {
+      setState(() {
+        tipInfo = SystemNotice.fromJson(res.data);
+      });
+      print(tipInfo);
+    }
+
+    Result res2 = await HttpManager.get("houseInfo/getOne",
+        data: {'id': tipInfo.houseId});
+    if (res2.success) {
+      setState(() {
+        houseInfo = HouseInfo.fromJson(res2.data);
+      });
+    }
+    print(houseInfo);
+  }
+
+  @override
+  void initState() {
+    // TODO: implement initState
+    super.initState();
+    Future.delayed(Duration(milliseconds: 100), () => getInfo());
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    int type = tipInfo.typeFlag != null ? tipInfo.typeFlag : 0;
+    GameInfo gameInfo;
+    if (tipInfo.gameInfo != null) {
+      gameInfo = tipInfo.gameInfo;
+    }
+    return new Scaffold(
+        appBar: AppBar(
+          backgroundColor: PRIMARY_COLOR,
+          title: Text('通知详情'),
+          centerTitle: true,
+          elevation: 0,
+        ),
+        body: Container(
+          color: Color(0xFF2B2B42),
+          width: double.infinity,
+          height: double.infinity,
+          child: Column(
+            children: <Widget>[
+              Padding(
+                padding: EdgeInsets.only(left: 15, right: 45),
+                child: Column(
+                  crossAxisAlignment: CrossAxisAlignment.start,
+                  children: <Widget>[
+                    Padding(
+                      padding: EdgeInsets.symmetric(vertical: 12),
+                      child: Text(
+                          readTimestamp(
+                              tipInfo.createTime, 'yyyy.MM.dd HH:mm:ss'),
+                          style:
+                              TextStyle(color: Colors.white24, fontSize: 13)),
+                    ),
+                    Container(
+                      height: 1,
+                      color: Colors.black26,
+                    ),
+                    Padding(
+                      padding: EdgeInsets.only(top: 10, bottom: 17),
+                      child: Text(
+                        tipInfo.content,
+                        style: TextStyle(color: Colors.white, fontSize: 14),
+                      ),
+                    )
+                  ],
+                ),
+              ),
+              houseInfo != null
+                  ? houseItem(roomInfo: houseInfo, gameInfo: gameInfo)
+                  : Container(),
+              type == 2
+                  ? Container(
+                      width: double.infinity,
+                      height: 48,
+                      padding: EdgeInsets.symmetric(horizontal: 15),
+                      child: RaisedButton(
+                        textColor: Colors.white,
+                        child: Text('立即领取'),
+                        onPressed: () {},
+                      ),
+                    )
+                  : Container()
+            ],
+          ),
+        ));
+  }
+}
+
+class houseItem extends StatelessWidget {
+  houseItem({Key key, this.roomInfo, this.gameInfo}) : super(key: key);
+  final HouseInfo roomInfo;
+  final GameInfo gameInfo;
+  @override
+  Widget build(BuildContext context) {
+    return Container(
+      margin: EdgeInsets.only(bottom: 50),
+      decoration: BoxDecoration(
+          gradient: LinearGradient(
+            colors: [Color(0xFF3F4261), Color(0xFF323456)],
+            begin: Alignment.topCenter,
+            end: Alignment.bottomCenter,
+          ),
+          border: Border(bottom: BorderSide(color: Colors.black, width: 1))),
+      child: 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(
+                            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,
+                      )
+                    ],
+                  ),
+                ),
+                Row(
+                  mainAxisAlignment: MainAxisAlignment.center,
+                  children: <Widget>[
+                    Image.asset('images/icon_renshu.png', width: 20),
+                    Text(
+                      (roomInfo.playerNumber != null
+                              ? roomInfo.playerNumber.toString()
+                              : '0') +
+                          '/' +
+                          roomInfo.maxNumber.toString(),
+                      style: TextStyle(
+                          fontSize: 14,
+                          fontWeight: FontWeight.w500,
+                          color: Color(0xFFB1B2C0)),
+                    )
+                  ],
+                )
+              ],
+            ),
+          ),
+          onTap: () {
+             Navigator.push(context,
+                  new CupertinoPageRoute(builder: (context) => new RoomInfo(
+                    roomId:roomInfo.id.toString()
+                  )));
+          },
+        ),
+      ),
+    );
+  }
+}

+ 145 - 7
lib/pages/TipList.dart

@@ -1,7 +1,14 @@
 import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
 import '../styles/colors.dart';
 import 'dart:ui';
 import '../styles/totast.dart';
+import 'package:flutter_redux/flutter_redux.dart';
+import '../redux/AppState.dart';
+import '../model/SystemNotice.dart';
+import '../net/HttpManager.dart';
+import '../net/Result.dart';
+import 'TipInfo.dart';
 
 class TipList extends StatefulWidget {
   @override
@@ -9,7 +16,62 @@ class TipList extends StatefulWidget {
 }
 
 class TipListState extends State<TipList> {
-  
+  int currentPage = 1;
+  List<SystemNotice> tipList = [];
+  bool isMore = false;
+  ScrollController _mControll;
+
+  void getListPage() async {
+    isMore = false;
+    Toast.show(context, '加载中', -1, 'loading');
+    Result res = await HttpManager.get("systemNotice/page", data: {
+      "userId": StoreProvider.of<AppState>(context).state.userInfo.id,
+      "currentPage": currentPage,
+      "pageNumber": 20
+    });
+    Toast.hide();
+    List<SystemNotice> list = tipList;
+    if (currentPage == 1) {
+      list = [];
+    }
+    if (res.success) {
+      for (var item in res.data['pp']) {
+        SystemNotice tip = SystemNotice.fromJson(item);
+        list.add(tip);
+      }
+      if (res.data['page']['currentPage'] < res.data['page']['totalPage']) {
+        isMore = true;
+      }
+    } else {}
+    setState(() {
+      tipList = list;
+    });
+  }
+
+  @override
+  void initState() {
+    // TODO: implement initState
+    super.initState();
+    _mControll = new ScrollController();
+
+    Future.delayed(Duration(milliseconds: 100), () => getListPage());
+
+    _mControll.addListener(() {
+      if (_mControll.position.pixels == _mControll.position.maxScrollExtent) {
+        if (isMore) {
+          getListPage();
+        }
+      }
+    });
+  }
+
+  @override
+  void dispose() {
+    // TODO: implement dispose
+    super.dispose();
+    _mControll.dispose();
+  }
+
   @override
   Widget build(BuildContext context) {
     return new WillPopScope(
@@ -25,13 +87,25 @@ class TipListState extends State<TipList> {
               backgroundColor: BG_COLOR,
               onRefresh: () async {
                 await new Future.delayed(const Duration(seconds: 1));
+                int currentPage = 1;
+                getListPage();
               },
               child: Container(
                 color: BG_COLOR,
                 child: ListView.builder(
-                    itemCount: 3,
+                    physics: AlwaysScrollableScrollPhysics(),
+                    controller: _mControll,
+                    itemCount: tipList.length != 0 ? tipList.length : 1,
                     itemBuilder: (BuildContext context, int index) {
-                      return TipItem();
+                      if (tipList.length == 0) {
+                        return Text(
+                          '数据正在火速加载中...',
+                          style: TextStyle(
+                              color: Colors.white30, fontSize: 13, height: 2),
+                          textAlign: TextAlign.center,
+                        );
+                      }
+                      return TipItem(tipInfo: tipList[index]);
                     }),
               ),
             )),
@@ -39,14 +113,78 @@ class TipListState extends State<TipList> {
           Toast.hide();
           print("返回键点击了");
           Navigator.pop(context);
+          return Future.value(false);
         });
   }
 }
 
-class TipItem extends StatelessWidget{
-   @override
-  Widget build(BuildContext context) {
+class TipItem extends StatelessWidget {
+  TipItem({Key key, this.tipInfo}) : super(key: key);
+  final SystemNotice tipInfo; // 用来储存传递过来的值
 
+  @override
+  Widget build(BuildContext context) {
+    return Container(
+      // height: 108,
+      margin: EdgeInsets.only(top: 10),
+      decoration: BoxDecoration(
+        gradient: LinearGradient(
+          colors: [Color(0xFF464B6A), Color(0xFF35395E)],
+          begin: Alignment.topCenter,
+          end: Alignment.bottomCenter,
+        ),
+      ),
+      child: Material(
+        color: Colors.transparent,
+        child: InkWell(
+          child: Padding(
+            padding: EdgeInsets.symmetric(horizontal: 15),
+            child: Column(
+              children: <Widget>[
+                Padding(
+                  padding: EdgeInsets.symmetric(vertical: 12),
+                  child: Row(
+                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                    children: <Widget>[
+                      Text(
+                          readTimestamp(
+                              tipInfo.createTime, 'yyyy.MM.dd HH:mm:ss'),
+                          style: TextStyle(
+                              color: Color(0xFF9BA0AE), fontSize: 13)),
+                      tipInfo.statusFlag == 0
+                          ? Text('未读',
+                              style: TextStyle(
+                                  color: Color(0xFFC2524D),
+                                  fontSize: 13,
+                                  fontWeight: FontWeight.w600))
+                          : Text('已读',
+                              style: TextStyle(
+                                  color: Color(0xFF000000),
+                                  fontSize: 13,
+                                  fontWeight: FontWeight.w600))
+                    ],
+                  ),
+                ),
+                Container(
+                  height: 1,
+                  color: Colors.black26,
+                ),
+                Padding(
+                  padding: EdgeInsets.only(top: 10, bottom: 15),
+                  child: Text(tipInfo.content,
+                      style: TextStyle(color: Colors.white, fontSize: 14)),
+                )
+              ],
+            ),
+          ),
+          onTap: () {
+            Navigator.push(
+                context,
+                new CupertinoPageRoute(
+                    builder: (context) => new TipInfo(tipId: tipInfo.id)));
+          },
+        ),
+      ),
+    );
   }
 }
-

+ 2 - 1
lib/pages/loginFirst.dart

@@ -124,9 +124,10 @@ class LoginFirstState extends State<LoginFirst> {
             ],
           ),
         )),
-        onWillPop: () async {
+        onWillPop: ()  {
           Toast.hide();
           // Navigator.pop(context);
+          return Future.value(false);
         });
   }
 }

+ 0 - 1
lib/pages/myWallet.dart

@@ -8,7 +8,6 @@ import '../redux/AppState.dart';
 import '../model/UserInfo.dart';
 import '../net/HttpManager.dart';
 import '../net/Result.dart';
-import '../styles/api.dart';
 import 'dart:ui';
 import '../styles/totast.dart';
 import 'recharge.dart';

+ 1 - 0
lib/pages/openRoom.dart

@@ -454,6 +454,7 @@ class OpenRoomState extends State<OpenRoom> {
       onWillPop: () {
         Toast.hide();
         Navigator.pop(context);
+        return Future.value(false);
       },
     );
   }

+ 1 - 0
lib/pages/rankList.dart

@@ -196,6 +196,7 @@ class RankListState extends State<RankList> {
           Toast.hide();
           print("返回键点击了");
           Navigator.pop(context);
+          return Future.value(false);
         });
   }
 

+ 34 - 7
lib/pages/roomInfo.dart

@@ -1,17 +1,13 @@
 import 'package:flutter/material.dart';
 import 'package:flutter_screenutil/flutter_screenutil.dart';
 import '../styles/colors.dart';
-import 'package:dio/dio.dart';
-import '../styles/api.dart';
 import 'dart:ui';
-import 'dart:convert';
+import '../plugins/ScreenStramPlugin.dart';
 import '../net/HttpManager.dart';
 import '../net/Result.dart';
 import 'package:flutter_redux/flutter_redux.dart';
 import '../redux/AppState.dart';
 import '../model/HouseInfo.dart';
-import '../net/HttpManager.dart';
-import '../net/Result.dart';
 import '../styles/totast.dart';
 import 'StartWindow.dart';
 import '../model/PlayerInfo.dart';
@@ -99,6 +95,12 @@ class RoomInfoState extends State<RoomInfo>
     if (res.success) {
       if (data['statusFlag'] == 2) {
         //加入比赛成功,开始录屏
+        bool success = await ScreenStreamPlugin.start(
+            'rtmp://49.4.66.233:1935/myapp/' +
+                playerInfo.userId.toString() +
+                '?playerInfoId=' +
+                playerInfo.id.toString());
+        print('stream screen:' + success.toString());
         Future.delayed(Duration(milliseconds: 100), () => showSucessInfo());
       } else {
         // showBackDialog();
@@ -124,9 +126,13 @@ class RoomInfoState extends State<RoomInfo>
           actions: <Widget>[
             new FlatButton(
               child: new Text('完成比赛'),
-              onPressed: () {
+              onPressed: () async {
+                Toast.show(context, '加载中', -1, 'loading');
                 HttpManager.post("playerInfo/update",
                     data: {'id': playerInfo.id, 'statusFlag': 3});
+                bool success = await ScreenStreamPlugin.stop();
+                print('stop stream screen:' + success.toString());
+                Toast.hide();
                 Navigator.of(context).pop();
               },
             ),
@@ -300,6 +306,7 @@ class RoomInfoState extends State<RoomInfo>
       onWillPop: () {
         Toast.hide();
         Navigator.of(context).pop();
+        return Future.value(false);
       },
     );
   }
@@ -485,6 +492,7 @@ class RoomInfoState extends State<RoomInfo>
   Widget _joinBtn() {
     int joinMoney = houseInfo != null ? houseInfo.houseLevel.entryCoin : 0;
     int statusFlag = houseInfo != null ? houseInfo.statusFlag : 1;
+     int playerStatus=playerInfo!=null?playerInfo.statusFlag:0;
     if (!isJoin && statusFlag == 0) {
       return Container(
         width: ScreenUtil().setWidth(375),
@@ -541,6 +549,21 @@ class RoomInfoState extends State<RoomInfo>
           onPressed: null,
         ),
       );
+    } else if (isJoin && statusFlag == 2 &&playerStatus==3) {
+      return Container(
+        width: double.infinity,
+        padding: EdgeInsets.symmetric(horizontal: 15, vertical: 20),
+        height: 88,
+        child: RaisedButton(
+          disabledColor: Color(0xFF914244),
+          disabledTextColor: Color(0xFF252532),
+          child: Text(
+            '正在结算中',
+            style: TextStyle(fontSize: 16),
+          ),
+          onPressed: null,
+        ),
+      );
     } else if (isJoin && statusFlag == 3) {
       return Container(
         width: double.infinity,
@@ -700,7 +723,11 @@ class RankContentState extends State<RankContent> {
             mainAxisAlignment: MainAxisAlignment.center,
             children: <Widget>[
               Image.asset('images/icon_jinbi_xiao_hong.png', width: 20),
-              Text('x' + (topList[_num - 1].bonus!=null?topList[_num - 1].bonus.toString():'0'),
+              Text(
+                  'x' +
+                      (topList[_num - 1].bonus != null
+                          ? topList[_num - 1].bonus.toString()
+                          : '0'),
                   style: TextStyle(color: PRIMARY_COLOR, fontSize: 12))
             ],
           )