panhui 6 anos atrás
pai
commit
bba5cd8d79

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

@@ -7,19 +7,15 @@ part of 'GameInfo.dart';
 // **************************************************************************
 // **************************************************************************
 
 
 GameInfo _$GameInfoFromJson(Map<String, dynamic> json) {
 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;
 //  int id;
 //   String gameName;//名称
 //   String gameName;//名称
 //   String icon;//图标
 //   String icon;//图标
 //   int typeFlag;//类型
 //   int typeFlag;//类型
-Map<String, dynamic> _$GameInfoToJson(GameInfo instance) =>
-    <String, dynamic>{
+Map<String, dynamic> _$GameInfoToJson(GameInfo instance) => <String, dynamic>{
       'id': instance.id,
       'id': instance.id,
       'gameName': instance.gameName,
       'gameName': instance.gameName,
       'icon': instance.icon,
       '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['houseAbstract'] as String,
     json['video'] as String,
     json['video'] as String,
     // GameInfo.fromJson(json['gameInfo'] as Map),
     // GameInfo.fromJson(json['gameInfo'] as Map),
-    json['playerNumber']as int,
+    json['playerNumber'] as int,
     json['maxNumber'] as int,
     json['maxNumber'] as int,
     json['bonus'] as int,
     json['bonus'] as int,
     json['houseType'] as int,
     json['houseType'] as int,
@@ -35,7 +35,7 @@ HouseInfo _$HouseInfoFromJson(Map<String, dynamic> json) {
 //   String houseAbstract; //房间描述
 //   String houseAbstract; //房间描述
 //   String video; //视频
 //   String video; //视频
 //   GameInfo gameInfo; //游戏信息
 //   GameInfo gameInfo; //游戏信息
-  // int playerNumber;//加入人数
+// int playerNumber;//加入人数
 //   int maxNumber; //最大加入人数
 //   int maxNumber; //最大加入人数
 //   int bonus; //奖金
 //   int bonus; //奖金
 //   int houseType; //0为个人1为官方
 //   int houseType; //0为个人1为官方
@@ -52,7 +52,7 @@ Map<String, dynamic> _$HouseInfoToJson(HouseInfo instance) => <String, dynamic>{
       'houseAbstract': instance.houseAbstract,
       'houseAbstract': instance.houseAbstract,
       'video': instance.video,
       'video': instance.video,
       // 'gameInfo': instance.gameInfo,
       // 'gameInfo': instance.gameInfo,
-      'playerNumber':instance.playerNumber,
+      'playerNumber': instance.playerNumber,
       'maxNumber': instance.maxNumber,
       'maxNumber': instance.maxNumber,
       'bonus': instance.bonus,
       'bonus': instance.bonus,
       'houseType': instance.houseType,
       'houseType': instance.houseType,

+ 2 - 2
lib/model/SystemNotice.g.dart

@@ -19,8 +19,8 @@ SystemNotice _$SystemNoticeFromJson(Map<String, dynamic> json) {
       json['statusFlag'] as int,
       json['statusFlag'] as int,
       json['createTime'] as int,
       json['createTime'] as int,
       json['playerId'] as int,
       json['playerId'] as int,
-      GameInfo.fromJson((json['gameInfo']!=null?json['gameInfo']:"") as Map),
-      HouseInfo.fromJson(json['houseInfo'] as Map));
+      json['gameInfo'] != null ? GameInfo.fromJson(json['gameInfo']) : null,
+      json['houseInfo'] != null ? HouseInfo.fromJson(json['houseInfo']) : null);
 }
 }
 
 
 // int id;
 // int id;

+ 9 - 0
lib/net/HttpManager.dart

@@ -1,5 +1,6 @@
 import 'package:dio/dio.dart';
 import 'package:dio/dio.dart';
 import 'Result.dart';
 import 'Result.dart';
+import 'package:intl/intl.dart';
 
 
 class HttpManager {
 class HttpManager {
   static String baseUrl = "http://49.4.66.233:8201/";
   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();
           Toast.hide();
           print("返回键点击了");
           print("返回键点击了");
           Navigator.pop(context);
           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()
+                  )));
+          },
+        ),
+      ),
+    );
+  }
+}

+ 86 - 5
lib/pages/TipList.dart

@@ -1,4 +1,5 @@
 import 'package:flutter/material.dart';
 import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
 import '../styles/colors.dart';
 import '../styles/colors.dart';
 import 'dart:ui';
 import 'dart:ui';
 import '../styles/totast.dart';
 import '../styles/totast.dart';
@@ -7,6 +8,7 @@ import '../redux/AppState.dart';
 import '../model/SystemNotice.dart';
 import '../model/SystemNotice.dart';
 import '../net/HttpManager.dart';
 import '../net/HttpManager.dart';
 import '../net/Result.dart';
 import '../net/Result.dart';
+import 'TipInfo.dart';
 
 
 class TipList extends StatefulWidget {
 class TipList extends StatefulWidget {
   @override
   @override
@@ -34,7 +36,6 @@ class TipListState extends State<TipList> {
     }
     }
     if (res.success) {
     if (res.success) {
       for (var item in res.data['pp']) {
       for (var item in res.data['pp']) {
-        print(item);
         SystemNotice tip = SystemNotice.fromJson(item);
         SystemNotice tip = SystemNotice.fromJson(item);
         list.add(tip);
         list.add(tip);
       }
       }
@@ -45,7 +46,6 @@ class TipListState extends State<TipList> {
     setState(() {
     setState(() {
       tipList = list;
       tipList = list;
     });
     });
-    print(tipList);
   }
   }
 
 
   @override
   @override
@@ -55,6 +55,14 @@ class TipListState extends State<TipList> {
     _mControll = new ScrollController();
     _mControll = new ScrollController();
 
 
     Future.delayed(Duration(milliseconds: 100), () => getListPage());
     Future.delayed(Duration(milliseconds: 100), () => getListPage());
+
+    _mControll.addListener(() {
+      if (_mControll.position.pixels == _mControll.position.maxScrollExtent) {
+        if (isMore) {
+          getListPage();
+        }
+      }
+    });
   }
   }
 
 
   @override
   @override
@@ -87,9 +95,17 @@ class TipListState extends State<TipList> {
                 child: ListView.builder(
                 child: ListView.builder(
                     physics: AlwaysScrollableScrollPhysics(),
                     physics: AlwaysScrollableScrollPhysics(),
                     controller: _mControll,
                     controller: _mControll,
-                    itemCount: 3,
+                    itemCount: tipList.length != 0 ? tipList.length : 1,
                     itemBuilder: (BuildContext context, int index) {
                     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]);
                     }),
                     }),
               ),
               ),
             )),
             )),
@@ -97,13 +113,78 @@ class TipListState extends State<TipList> {
           Toast.hide();
           Toast.hide();
           print("返回键点击了");
           print("返回键点击了");
           Navigator.pop(context);
           Navigator.pop(context);
+          return Future.value(false);
         });
         });
   }
   }
 }
 }
 
 
 class TipItem extends StatelessWidget {
 class TipItem extends StatelessWidget {
+  TipItem({Key key, this.tipInfo}) : super(key: key);
+  final SystemNotice tipInfo; // 用来储存传递过来的值
+
   @override
   @override
   Widget build(BuildContext context) {
   Widget build(BuildContext context) {
-    return Container();
+    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();
           Toast.hide();
           // Navigator.pop(context);
           // Navigator.pop(context);
+          return Future.value(false);
         });
         });
   }
   }
 }
 }

+ 16 - 43
lib/pages/loginSecond.dart

@@ -52,35 +52,24 @@ class LoginSecondState extends State<LoginSecond> {
                     SliverToBoxAdapter(
                     SliverToBoxAdapter(
                       child: Container(
                       child: Container(
                         color: BG_SUB_COLOR,
                         color: BG_SUB_COLOR,
-                        padding:
-                            EdgeInsets.symmetric(vertical: 30, horizontal: 15),
+                        padding: EdgeInsets.symmetric(vertical: 30, horizontal: 15),
                         child: Column(
                         child: Column(
                           crossAxisAlignment: CrossAxisAlignment.start,
                           crossAxisAlignment: CrossAxisAlignment.start,
                           children: <Widget>[
                           children: <Widget>[
                             Text(
                             Text(
                               '验证码已发送至',
                               '验证码已发送至',
-                              style: TextStyle(
-                                  color: Colors.white,
-                                  fontSize: 28,
-                                  fontWeight: FontWeight.w600),
+                              style: TextStyle(color: Colors.white, fontSize: 28, fontWeight: FontWeight.w600),
                             ),
                             ),
                             Container(
                             Container(
                               margin: EdgeInsets.only(top: 45),
                               margin: EdgeInsets.only(top: 45),
                               child: Row(
                               child: Row(
-                                mainAxisAlignment:
-                                    MainAxisAlignment.spaceBetween,
+                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                                 children: <Widget>[
                                 children: <Widget>[
-                                  Text(widget.phone,
-                                      style: TextStyle(
-                                          color: Color(0xFFF15436),
-                                          fontSize: 20,
-                                          fontWeight: FontWeight.w500)),
+                                  Text(widget.phone, style: TextStyle(color: Color(0xFFF15436), fontSize: 20, fontWeight: FontWeight.w500)),
                                   FlatButton(
                                   FlatButton(
                                     highlightColor: BG_SUB_COLOR,
                                     highlightColor: BG_SUB_COLOR,
                                     textColor: PRIMARY_COLOR,
                                     textColor: PRIMARY_COLOR,
-                                    child: Text(isSend
-                                        ? '(' + '$sendTime' + '秒)'
-                                        : '重新发送'),
+                                    child: Text(isSend ? '(' + '$sendTime' + '秒)' : '重新发送'),
                                     disabledTextColor: Color(0xFF8D8E9C),
                                     disabledTextColor: Color(0xFF8D8E9C),
                                     onPressed: isSend
                                     onPressed: isSend
                                         ? null
                                         ? null
@@ -115,8 +104,7 @@ class LoginSecondState extends State<LoginSecond> {
                                     inputCode = content;
                                     inputCode = content;
                                   });
                                   });
                                 },
                                 },
-                                counterStyle:
-                                    TextStyle(color: BG_SUB_COLOR, fontSize: 0),
+                                counterStyle: TextStyle(color: BG_SUB_COLOR, fontSize: 0),
                               ),
                               ),
                             ),
                             ),
                             Container(
                             Container(
@@ -130,24 +118,16 @@ class LoginSecondState extends State<LoginSecond> {
                                   child: Text("注册/登录"),
                                   child: Text("注册/登录"),
                                   onPressed: () async {
                                   onPressed: () async {
                                     if (_sessionID == null) {
                                     if (_sessionID == null) {
-                                      Toast.show(
-                                          context, '请发送验证码', 1500, 'info');
+                                      Toast.show(context, '请发送验证码', 1500, 'info');
                                     } else if (inputCode.length != 6) {
                                     } else if (inputCode.length != 6) {
-                                      Toast.show(
-                                          context, '请输入验证码', 1500, 'info');
+                                      Toast.show(context, '请输入验证码', 1500, 'info');
                                     } else {
                                     } else {
                                       print(_sessionID);
                                       print(_sessionID);
                                       print(inputCode);
                                       print(inputCode);
                                       Toast.show(context, '加载中', -1, 'loading');
                                       Toast.show(context, '加载中', -1, 'loading');
                                       Toast.hide();
                                       Toast.hide();
-                                      final Result res = await HttpManager.post(
-                                          'auth/loginSms',
-                                          data: {
-                                            "phone": widget.phone,
-                                            "code": inputCode,
-                                            "sessionId": _sessionID,
-                                            "requireToken": true
-                                          });
+                                      final Result res = await HttpManager.post('auth/loginSms',
+                                          data: {"phone": widget.phone, "code": inputCode, "sessionId": _sessionID, "requireToken": true});
                                       Toast.hide();
                                       Toast.hide();
                                       if (res.success) {
                                       if (res.success) {
                                         print(res);
                                         print(res);
@@ -155,23 +135,16 @@ class LoginSecondState extends State<LoginSecond> {
                                         prefs.setString('token', res.token);
                                         prefs.setString('token', res.token);
                                         print(prefs.getString('token'));
                                         print(prefs.getString('token'));
                                         HttpManager.token = res.token;
                                         HttpManager.token = res.token;
-                                        StoreProvider.of<AppState>(context)
-                                            .dispatch({
-                                          "action": Actions.updateAll,
-                                          "user": res.data
-                                        });
-                                        Toast.show(
-                                            context, '登录成功', 1500, 'success');
+                                        StoreProvider.of<AppState>(context).dispatch({"action": Actions.updateAll, "user": res.data});
+                                        Toast.show(context, '登录成功', 1500, 'success');
                                         Navigator.pushAndRemoveUntil(
                                         Navigator.pushAndRemoveUntil(
                                             context,
                                             context,
                                             new CupertinoPageRoute(
                                             new CupertinoPageRoute(
-                                              builder: (context) =>
-                                                  new HomePage(),
+                                              builder: (context) => new HomePage(),
                                             ),
                                             ),
                                             ModalRoute.withName('/'));
                                             ModalRoute.withName('/'));
                                       } else {
                                       } else {
-                                        Toast.show(
-                                            context, res.error, 1500, 'info');
+                                        Toast.show(context, res.error, 1500, 'info');
                                       }
                                       }
                                     }
                                     }
                                   },
                                   },
@@ -188,6 +161,7 @@ class LoginSecondState extends State<LoginSecond> {
           Toast.hide();
           Toast.hide();
           print("返回键点击了");
           print("返回键点击了");
           Navigator.pop(context);
           Navigator.pop(context);
+          return Future.value(false);
         });
         });
   }
   }
 
 
@@ -196,8 +170,7 @@ class LoginSecondState extends State<LoginSecond> {
 
 
     Toast.show(context, '加载中', -1, 'loading');
     Toast.show(context, '加载中', -1, 'loading');
 
 
-    final Result res =
-        await HttpManager.get('rong/sendCode', data: {"phone": widget.phone});
+    final Result res = await HttpManager.get('rong/sendCode', data: {"phone": widget.phone});
     Toast.hide();
     Toast.hide();
     if (res.success) {
     if (res.success) {
       Toast.show(context, '发送成功', 1500, 'success');
       Toast.show(context, '发送成功', 1500, 'success');

+ 0 - 1
lib/pages/myWallet.dart

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

+ 1 - 0
lib/pages/openRoom.dart

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

+ 1 - 0
lib/pages/rankList.dart

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

+ 17 - 0
lib/pages/roomInfo.dart

@@ -306,6 +306,7 @@ class RoomInfoState extends State<RoomInfo>
       onWillPop: () {
       onWillPop: () {
         Toast.hide();
         Toast.hide();
         Navigator.of(context).pop();
         Navigator.of(context).pop();
+        return Future.value(false);
       },
       },
     );
     );
   }
   }
@@ -491,6 +492,7 @@ class RoomInfoState extends State<RoomInfo>
   Widget _joinBtn() {
   Widget _joinBtn() {
     int joinMoney = houseInfo != null ? houseInfo.houseLevel.entryCoin : 0;
     int joinMoney = houseInfo != null ? houseInfo.houseLevel.entryCoin : 0;
     int statusFlag = houseInfo != null ? houseInfo.statusFlag : 1;
     int statusFlag = houseInfo != null ? houseInfo.statusFlag : 1;
+     int playerStatus=playerInfo!=null?playerInfo.statusFlag:0;
     if (!isJoin && statusFlag == 0) {
     if (!isJoin && statusFlag == 0) {
       return Container(
       return Container(
         width: ScreenUtil().setWidth(375),
         width: ScreenUtil().setWidth(375),
@@ -547,6 +549,21 @@ class RoomInfoState extends State<RoomInfo>
           onPressed: null,
           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) {
     } else if (isJoin && statusFlag == 3) {
       return Container(
       return Container(
         width: double.infinity,
         width: double.infinity,