panhui há 6 anos atrás
pai
commit
447524de1f

+ 1 - 1
android/app/build.gradle

@@ -45,7 +45,7 @@ android {
         multiDexEnabled true
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
         ndk {
-            // abiFilters 'armeabi-v7a'
+            abiFilters 'armeabi-v7a'
         }
         manifestPlaceholders = [
                 JPUSH_PKGNAME: applicationId,

+ 2 - 2
lib/net/HttpManager.dart

@@ -3,8 +3,8 @@ import 'Result.dart';
 import 'package:intl/intl.dart';
 
 class HttpManager {
-  // static String baseUrl = 'http://47.96.141.102:8202/';
-  static String baseUrl='http://192.168.50.226:8080/';
+  static String baseUrl = 'http://47.96.141.102:8202/';
+  // static String baseUrl='http://192.168.50.226:8080/';
   static String token;
   static bool debug;
 

+ 20 - 28
lib/pages/HomePage.dart

@@ -36,7 +36,7 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
     });
     Toast.hide();
     if (res.success) {
-     List<GameInfoSeasons> list = [];
+      List<GameInfoSeasons> list = [];
       for (var item in res.data) {
         list.add(GameInfoSeasons.fromJson(item));
       }
@@ -234,18 +234,9 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
                                   ),
                                   Column(
                                     children: <Widget>[
-                                      Text('当前排名',
-                                          style: TextStyle(
-                                              color: Color(0xFFFFFFFF),
-                                              fontSize: 13)),
-                                      Text( seasonList[index]
-                                                  .competitionSeason
-                                                  .playerInfo
-                                                  .rank
-                                                  .toString(),
-                                          style: TextStyle(
-                                              color: Color(0xFFFFFFFF),
-                                              fontSize: 13))
+                                      Text('当前排名', style: TextStyle(color: Color(0xFFFFFFFF), fontSize: 13)),
+                                      Text(seasonList[index].competitionSeason.playerInfo.rank.toString(),
+                                          style: TextStyle(color: Color(0xFFFFFFFF), fontSize: 13))
                                     ],
                                   )
                                 ],
@@ -361,15 +352,14 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
                       //     pageBuilder: (BuildContext context, _, __) {
                       //       return CreateRoom();
                       //     }));
-
-                      Navigator.push(context, CupertinoPageRoute(builder: (context) => OpenRoom(roomFlag: '0')));
+                      Navigator.push(context, CupertinoPageRoute(builder: (context) => RoomList()));
                     },
                   ),
                   HomeMenu(
                     'images/home_icon_02.png',
                     '发起赛事',
                     onTapHomeMenu: () {
-                      Navigator.push(context, CupertinoPageRoute(builder: (context) => RoomList()));
+                      Navigator.push(context, CupertinoPageRoute(builder: (context) => OpenRoom(roomFlag: '0')));
                     },
                   ),
                   HomeMenu(
@@ -512,18 +502,20 @@ class HomeMenu extends StatelessWidget {
               child: Column(
                 mainAxisAlignment: MainAxisAlignment.center,
                 crossAxisAlignment: CrossAxisAlignment.center,
-                  children: <Widget>[
-                    Image.asset(
-                      icon,
-                      fit: BoxFit.contain,
-                    ),
-                    Container(height: 5,),
-                    Text(
-                      name,
-                      style: TextStyle(color: Colors.white, fontSize: 13),
-                    )
-                  ],
-                ),
+                children: <Widget>[
+                  Image.asset(
+                    icon,
+                    fit: BoxFit.contain,
+                  ),
+                  Container(
+                    height: 5,
+                  ),
+                  Text(
+                    name,
+                    style: TextStyle(color: Colors.white, fontSize: 13),
+                  )
+                ],
+              ),
             ),
           ),
         ),

+ 43 - 73
lib/pages/RecordList.dart

@@ -11,14 +11,14 @@ import '../model/GameInfo.dart';
 import '../pages/RoomInfo.dart';
 import 'package:flutter_redux/flutter_redux.dart';
 import '../redux/AppState.dart';
+import '../widget/ScoreType.dart';
 
 class RecordList extends StatefulWidget {
   @override
   RecordListState createState() => RecordListState();
 }
 
-class RecordListState extends State<RecordList>
-    with SingleTickerProviderStateMixin {
+class RecordListState extends State<RecordList> with SingleTickerProviderStateMixin {
   final List<Tab> myTabs = <Tab>[Tab(text: '我创建的'), Tab(text: '我加入的')];
   TabController _tabController;
   @override
@@ -53,9 +53,7 @@ class RecordListState extends State<RecordList>
         ),
         body: Container(
           padding: EdgeInsets.only(top: 10),
-          child: TabBarView(
-              controller: _tabController,
-              children: <Widget>[RecordInfo(0), RecordInfo(1)]),
+          child: TabBarView(controller: _tabController, children: <Widget>[RecordInfo(0), RecordInfo(1)]),
           color: Color(0xFF2B2B42),
         ));
   }
@@ -109,11 +107,8 @@ class RecordInfoState extends State<RecordInfo> {
       getHousePage();
       return;
     }
-    Result res = await HttpManager.get('playerInfo/page', data: {
-      'userId': StoreProvider.of<AppState>(context).state.userInfo.id,
-      'currentPage': currentPage,
-      'pageNumber': 20
-    });
+    Result res = await HttpManager.get('playerInfo/page',
+        data: {'userId': StoreProvider.of<AppState>(context).state.userInfo.id, 'currentPage': currentPage, 'pageNumber': 20});
     Toast.hide();
     List<PlayerInfo> list = playerList;
     if (currentPage == 1) {
@@ -177,15 +172,11 @@ class RecordInfoState extends State<RecordInfo> {
                       if (houseList.isEmpty) {
                         return Text(
                           '还没有战绩快去比赛吧...',
-                          style: TextStyle(
-                              color: Colors.white30, fontSize: 13, height: 2),
+                          style: TextStyle(color: Colors.white30, fontSize: 13, height: 2),
                           textAlign: TextAlign.center,
                         );
                       }
-                      return houseItem(
-                          roomInfo: houseList[index],
-                          gameInfo: houseList[index].gameInfo,
-                          type:1);
+                      return houseItem(roomInfo: houseList[index], gameInfo: houseList[index].gameInfo, type: 1);
                     })
                 : ListView.builder(
                     physics: AlwaysScrollableScrollPhysics(),
@@ -195,15 +186,11 @@ class RecordInfoState extends State<RecordInfo> {
                       if (playerList.isEmpty) {
                         return Text(
                           '还没有战绩快去比赛吧...',
-                          style: TextStyle(
-                              color: Colors.white30, fontSize: 13, height: 2),
+                          style: TextStyle(color: Colors.white30, fontSize: 13, height: 2),
                           textAlign: TextAlign.center,
                         );
                       }
-                      return houseItem(
-                          roomInfo: playerList[index].houseInfo,
-                          gameInfo: playerList[index].gameInfo,
-                          playerInfo: playerList[index],type:2);
+                      return houseItem(roomInfo: playerList[index].houseInfo, gameInfo: playerList[index].gameInfo, playerInfo: playerList[index], type: 2);
                     }),
           )),
     );
@@ -211,8 +198,7 @@ class RecordInfoState extends State<RecordInfo> {
 }
 
 class houseItem extends StatelessWidget {
-  houseItem({Key key, this.roomInfo, this.gameInfo, this.playerInfo,this.type=0})
-      : super(key: key);
+  houseItem({Key key, this.roomInfo, this.gameInfo, this.playerInfo, this.type = 0}) : super(key: key);
   final HouseInfo roomInfo;
   final GameInfo gameInfo;
   final PlayerInfo playerInfo;
@@ -220,12 +206,7 @@ class houseItem extends StatelessWidget {
 
   @override
   Widget build(BuildContext context) {
-    List imageList = [
-      'images/jiangpai_huangjin.png',
-      'images/jiangpai_baiyin.png',
-      'images/jiangpai_qingtong.png',
-      'images/zhanji_icon_04.png'
-    ];
+    List imageList = ['images/jiangpai_huangjin.png', 'images/jiangpai_baiyin.png', 'images/jiangpai_qingtong.png', 'images/zhanji_icon_04.png'];
     String imageSrc = '';
     String tishiStr = '';
     Color tishiColor;
@@ -242,8 +223,7 @@ class houseItem extends StatelessWidget {
       if (playerInfo.statusFlag != null) {
         if (playerInfo.statusFlag == 6) {
           imageSrc = imageList[3];
-        } else if (playerInfo.statusFlag < 4 ||
-            (roomInfo.statusFlag >= 2 && roomInfo.statusFlag < 4)) {
+        } else if (playerInfo.statusFlag < 4 || (roomInfo.statusFlag >= 2 && roomInfo.statusFlag < 4)) {
           tishiStr = '结算中';
         } else if (playerInfo.statusFlag < 2) {
           tishiStr = '准备中';
@@ -252,16 +232,16 @@ class houseItem extends StatelessWidget {
     } else {
       if (roomInfo.statusFlag == 0) {
         tishiStr = '未开始';
-        tishiColor=Theme.of(context).primaryColor;
+        tishiColor = Theme.of(context).primaryColor;
       } else if (roomInfo.statusFlag == 2) {
         tishiStr = '进行中';
-         tishiColor=Color(0xFFA9AABA);
+        tishiColor = Color(0xFFA9AABA);
       } else if (roomInfo.statusFlag == 4) {
         tishiStr = '已结束';
-        tishiColor=Color(0xFF595B77);
+        tishiColor = Color(0xFF595B77);
       } else {
         tishiStr = '结算中';
-        tishiColor=Color(0xFF595B77);
+        tishiColor = Color(0xFF595B77);
       }
     }
 
@@ -305,34 +285,32 @@ class houseItem extends StatelessWidget {
                                 maxWidth: 170,
                                 child: Text(
                                   roomInfo.houseName,
-                                  style: TextStyle(
-                                      color: Colors.white,
-                                      fontSize: 14,
-                                      fontWeight: FontWeight.w500),
+                                  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),
+                                width: 5,
                               ),
-                              Container(
-                                  margin: EdgeInsets.only(left: 1),
-                                  child: Text(
-                                    roomInfo.houseLevel.levelName,
-                                    style: TextStyle(
-                                        color: Color(0xFFF9D881), fontSize: 9),
-                                  )),
+                              ScoreType(roomInfo.scoreType)
+                              // Container(
+                              //   margin: EdgeInsets.only(left: 6),
+                              //   child: Image.network(roomInfo.houseLevel.icon,
+                              //       width: 14),
+                              // ),
+                              // Container(
+                              //     margin: EdgeInsets.only(left: 1),
+                              //     child: Text(
+                              //       roomInfo.houseLevel.levelName,
+                              //       style: TextStyle(
+                              //           color: Color(0xFFF9D881), fontSize: 9),
+                              //     )),
                             ],
                           ),
                           Text(
                             roomInfo.houseAbstract ?? '',
-                            style: TextStyle(
-                                fontSize: 12,
-                                fontWeight: FontWeight.w400,
-                                color: Color(0xFF9BA0AE)),
+                            style: TextStyle(fontSize: 12, fontWeight: FontWeight.w400, color: Color(0xFF9BA0AE)),
                             maxLines: 2,
                             overflow: TextOverflow.ellipsis,
                           )
@@ -341,29 +319,21 @@ class houseItem extends StatelessWidget {
                     ),
                     imageSrc != ''
                         ? Image.asset(imageSrc)
-                        : (
-                          type==2?Text(tishiStr,
-                            style: TextStyle(
-                                color:
-                                    isImport ? PRIMARY_COLOR : Colors.white54,
-                                fontSize: 14)):Container(
-                                  color: tishiColor,
-                                  padding: EdgeInsets.symmetric(vertical: 4,horizontal: 9),
-                                  child: Text(tishiStr,style: TextStyle(
-                                    color: Color(0xFF252532),
-                                    fontSize: 12
-                                  ),),
-                                )
-                        )
+                        : (type == 2
+                            ? Text(tishiStr, style: TextStyle(color: isImport ? PRIMARY_COLOR : Colors.white54, fontSize: 14))
+                            : Container(
+                                color: tishiColor,
+                                padding: EdgeInsets.symmetric(vertical: 4, horizontal: 9),
+                                child: Text(
+                                  tishiStr,
+                                  style: TextStyle(color: Color(0xFF252532), fontSize: 12),
+                                ),
+                              ))
                   ],
                 ),
               ),
               onTap: () {
-                Navigator.push(
-                    context,
-                    CupertinoPageRoute(
-                        builder: (context) =>
-                            RoomInfo(roomId: roomInfo.id.toString())));
+                Navigator.push(context, CupertinoPageRoute(builder: (context) => RoomInfo(roomId: roomInfo.id.toString())));
               },
             ),
           ),

+ 2 - 3
lib/pages/SecondRoomInfo.dart

@@ -21,6 +21,7 @@ class SecondPageState extends State<SecondPage> {
   int currentPage = 1;
   bool ismore = true;
   ScrollController _perController;
+  List jiangpaiImg=['images/jiangpai_huangjin.png','images/jiangpai_baiyin.png','images/jiangpai_qingtong.png'];
 
   //获取房间用户
   Future<void> getPlayerPage() async {
@@ -175,9 +176,7 @@ class SecondPageState extends State<SecondPage> {
                 : Container(),
             widget.status == 4 && index < 3
                 ? Image.asset(
-                    'images/icon_paihangbang_0' +
-                        (index + 1).toString() +
-                        '.png',
+                    jiangpaiImg[index],
                     width: 32,
                   )
                 : Container()

+ 14 - 1
lib/pages/ShoppingMall.dart

@@ -7,6 +7,8 @@ import 'package:flutter_redux/flutter_redux.dart';
 import '../redux/AppState.dart';
 import '../model/ProductInfo.dart';
 import '../widget/Dialog.dart';
+import '../redux/UserRedux.dart';
+import '../model/UserInfo.dart';
 
 class ShoppingMall extends StatefulWidget {
   @override
@@ -14,7 +16,7 @@ class ShoppingMall extends StatefulWidget {
 }
 
 class ShoppingMallState extends State<ShoppingMall> {
-  final List<Tab> myTabs = <Tab>[Tab(text: '金币充值'), Tab(text: '会员充值')];
+  final List<Tab> myTabs = <Tab>[Tab(text: '门票购买'), Tab(text: '会员充值')];
 
   @override
   Widget build(BuildContext context) {
@@ -54,6 +56,16 @@ class Recharge extends StatefulWidget {
 }
 
 class RechargeState extends State<Recharge> {
+  Future<void> getUserInfo() async {
+    Result res = await HttpManager.get('userInfo/getUserInfo');
+    if (res.success) {
+      print(res.data);
+      StoreProvider.of<AppState>(context)
+          .dispatch(UpdateUserAction(UserInfo.fromJson(res.data)));
+    } else {}
+  }
+
+
   List moneyList = [100, 300, 500, 1000, 2000, 5000];
   List vipList = [
     {'name': 'VIP1', 'value': 100},
@@ -220,6 +232,7 @@ class RechargeState extends State<Recharge> {
             Toast.hide();
             if (res.success) {
               Toast.show(context, '购买成功', 1500, 'success');
+              getUserInfo();
             } else {
               Toast.show(context, res.error, 1500, 'info');
             }

+ 23 - 20
lib/pages/TipInfo.dart

@@ -12,6 +12,7 @@ import '../pages/RoomInfo.dart';
 import '../widget/SuccessfulReception.dart';
 import '../widget/LinearButton.dart';
 import '../model/PlayerInfo.dart';
+import '../widget/ScoreType.dart';
 
 class TipInfo extends StatefulWidget {
   TipInfo({Key key, this.tipId}) : super(key: key);
@@ -242,16 +243,18 @@ class houseItem extends StatelessWidget {
                               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),
-                              )),
+                            Container(width: 5,),
+                          ScoreType(roomInfo.scoreType)
+                          // Container(
+                          //   margin: EdgeInsets.only(left: 6),
+                          //   child: Image.network(roomInfo.houseLevel.icon, width: 14),
+                          // ),
+                          // Container(
+                          //     margin: EdgeInsets.only(left: 1),
+                          //     child: Text(
+                          //       roomInfo.houseLevel.levelName,
+                          //       style: TextStyle(color: Color(0xFFF9D881), fontSize: 9),
+                          //     )),
                         ],
                       ),
                       Text(
@@ -400,16 +403,16 @@ class RankContentState extends State<RankContent> {
             overflow: TextOverflow.ellipsis,
             textAlign: TextAlign.center,
           ),
-          SizedBox(
-            height: 5,
-          ),
-          Row(
-            mainAxisAlignment: MainAxisAlignment.center,
-            children: <Widget>[
-              Image.asset('images/icon_jinbi_xiao_hong.png', width: 20),
-              Text('×' + (topList[_num - 1].bonus != null ? topList[_num - 1].bonus.toString() : '0'), style: TextStyle(color: PRIMARY_COLOR, fontSize: 12))
-            ],
-          )
+          // SizedBox(
+          //   height: 5,
+          // ),
+          // Row(
+          //   mainAxisAlignment: MainAxisAlignment.center,
+          //   children: <Widget>[
+          //     Image.asset('images/icon_jinbi_xiao_hong.png', width: 20),
+          //     Text('×' + (topList[_num - 1].bonus != null ? topList[_num - 1].bonus.toString() : '0'), style: TextStyle(color: PRIMARY_COLOR, fontSize: 12))
+          //   ],
+          // )
         ],
       ),
     );

+ 9 - 8
lib/pages/myWallet.dart

@@ -28,7 +28,7 @@ class MyWalletState extends State<MyWallet> {
   Future<void> getWalletPage() async {
     Toast.show(context, '加载中', -1, 'loading');
     canNext = false;
-    Result res = await HttpManager.get('memberCoin/page',
+    Result res = await HttpManager.get('memberTicket/page',
         data: {'userId': StoreProvider.of<AppState>(context).state.userInfo.id, 'currentPage': currentPage, 'pageNumber': 20});
     Toast.hide();
     if (res.success) {
@@ -107,7 +107,7 @@ class MyWalletState extends State<MyWallet> {
                     slivers: <Widget>[
                       SliverAppBar(
                         backgroundColor: PRIMARY_COLOR,
-                        title: Text(isShow ? '余额明细' : ''),
+                        title: Text(isShow ? '门票明细' : ''),
                         centerTitle: true,
                         pinned: true,
                       ),
@@ -149,7 +149,7 @@ class MyWalletState extends State<MyWallet> {
               //背景装饰
               gradient: LinearGradient(
             begin: Alignment.bottomRight,
-            colors: [Color(0xFFFFE6B5),Theme.of(context).primaryColor, PRIMARY_COLOR],
+            colors: [Color(0xFFFFA6A2),Color(0xFFCE5C57), Theme.of(context).primaryColor],
           )),
           child: Stack(
             overflow: Overflow.visible,
@@ -166,9 +166,9 @@ class MyWalletState extends State<MyWallet> {
                   mainAxisAlignment: MainAxisAlignment.center,
                   children: <Widget>[
                     Container(
-                      child: Text(userInfo.moneyCoin.toString(),
+                      child: Text(userInfo.moneyTicket.toString(),
                           style: TextStyle(
-                            color: Color(0xFFDD7600),
+                            color: Theme.of(context).primaryColor,
                             fontSize: 51,
                             fontWeight: FontWeight.w900,
                           )),
@@ -178,12 +178,13 @@ class MyWalletState extends State<MyWallet> {
                       mainAxisAlignment: MainAxisAlignment.center,
                       children: <Widget>[
                         Image(
-                          image: AssetImage('images/icon_jinbi_xiao_huang.png'),
+                          image: AssetImage('images/icon_menpiao.png'),
                           width: 20,
                         ),
-                        Text('我的金币',
+                        Container(width: 5,),
+                        Text('我的门票',
                             style: TextStyle(
-                              color: Color(0xFFF0A000),
+                              color: Colors.white,
                               fontSize: 14,
                             ))
                       ],

+ 4 - 4
lib/pages/openRoom.dart

@@ -409,7 +409,7 @@ class OpenRoomState extends State<OpenRoom> {
                     //房间人数
                     ChooseContent(
                       title: '胜利条件',
-                      val: editRoomInfo['scoreType'] == 0 ? '吃鸡竞赛' : '吃鸡评分',
+                      val: editRoomInfo['scoreType'] == 0 ? '评分' : '吃鸡',
                       onTapHomeMenu: () {
                         showScoreType(context);
                       },
@@ -435,7 +435,7 @@ class OpenRoomState extends State<OpenRoom> {
                               child: Image.asset('images/icon_renci.png'),
                             ),
                             Text(
-                              '×' + (chooseLevelInfo.entryCoin ?? 0).toString(),
+                              '×${editRoomInfo["maxNumber"]}' ,
                               style: TextStyle(
                                   color: Colors.white,
                                   fontSize: 16,
@@ -582,7 +582,7 @@ class OpenRoomState extends State<OpenRoom> {
   }
 
   void showScoreType(BuildContext context) {
-    List _list = ['吃鸡竞赛', '吃鸡评分'];
+    List _list = ['评分', '吃鸡'];
     String PickerData = json.encode(_list);
     Picker(
         confirmText: '确定',
@@ -594,7 +594,7 @@ class OpenRoomState extends State<OpenRoom> {
         columnPadding: const EdgeInsets.all(8.0),
         onConfirm: (Picker picker, List value) {
           setState(() {
-            editRoomInfo['scoreType'] = _list[value[0]] == '吃鸡竞赛' ? 0 : 1;
+            editRoomInfo['scoreType'] = _list[value[0]] == '评分' ? 0 : 1;
           });
         }).showModal(this.context);
   }

+ 36 - 28
lib/pages/roomInfo.dart

@@ -21,6 +21,7 @@ import 'package:flutter/cupertino.dart';
 import 'VideoPlayer.dart';
 import '../model/UserInfo.dart';
 import '../widget/LinearButton.dart';
+import '../widget/ScoreType.dart';
 
 class RoomInfo extends StatefulWidget {
   RoomInfo({Key key, this.roomId}) : super(key: key);
@@ -200,13 +201,10 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
           if (houseInfo.createUser == StoreProvider.of<AppState>(context).state.userInfo.id.toString()) {
             roomTipsList.add(['房间创建成功,待人数满员时会自动开启比赛,房主也可以手动开启比赛,请在此页面耐心等待其他人的加入,加入房间后再次退出则视为自动放弃比赛,已支付金币概不退换,快快点击右上角分享给好友加入战局吧']);
             changeScroll();
+          } else {
+            roomTipsList.add(['待人数满员时会自动开启比赛,房主也可以手动开启比赛,请在此页面耐心等待其他人的加入,加入房间后再次退出则视为自动放弃比赛,已支付门票概不退换,快快点击右上角分享给好友加入战局吧']);
           }
-          else{
-  roomTipsList.add(['待人数满员时会自动开启比赛,房主也可以手动开启比赛,请在此页面耐心等待其他人的加入,加入房间后再次退出则视为自动放弃比赛,已支付门票概不退换,快快点击右上角分享给好友加入战局吧']);
-         
 
-          }
-        
           changeScroll();
         }
       } else {
@@ -231,10 +229,10 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
           //   roomTipsList.add(['房间创建成功,待人数满员时会自动开启比赛,房主也可以手动开启比赛,请在此页面耐心等待其他人的加入,加入房间后再次退出则视为自动放弃比赛,已支付金币概不退换,快快点击右上角分享给好友加入战局吧']);
           //   changeScroll();
           // } else {
-            // roomTipsList.add([
-            //   '请在此页面耐心等待,竞赛即将开始,届时玩家有10秒的时间进行确认,点击确认方可正式进入竞赛,若没有点击,则视为自动放弃此次竞赛,已支付金币概不退换'
-            // ]);
-            // changeScroll();
+          // roomTipsList.add([
+          //   '请在此页面耐心等待,竞赛即将开始,届时玩家有10秒的时间进行确认,点击确认方可正式进入竞赛,若没有点击,则视为自动放弃此次竞赛,已支付金币概不退换'
+          // ]);
+          // changeScroll();
           // }
           // Timer(Duration(seconds: 1), () {
           //   roomTipsList.add([
@@ -489,6 +487,10 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
                                       style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.w500),
                                     ),
                                   ),
+                                  Container(
+                                    width: 5,
+                                  ),
+                                  houseInfo != null ? ScoreType(houseInfo.scoreType) : Container(),
                                   // Image.network(
                                   //   houseLevelInfo.containsKey('icon')
                                   //       ? houseLevelInfo['icon']
@@ -609,6 +611,8 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
     int joinMoney = houseInfo != null ? houseInfo.houseLevel.entryCoin : 0;
     int statusFlag = houseInfo != null ? houseInfo.statusFlag : 1;
     int playerStatus = playerInfo != null ? playerInfo.statusFlag : 0;
+
+    List jiangpaiImg = ['金牌', '银牌', '铜牌'];
     if (!isJoin && statusFlag == 0 && houseInfo.userId == StoreProvider.of<AppState>(context).state.userInfo.id) {
       return Container(
         padding: EdgeInsets.symmetric(vertical: 15, horizontal: 10),
@@ -788,7 +792,7 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
         width: double.infinity,
         padding: EdgeInsets.symmetric(horizontal: 15, vertical: 20),
         height: 88,
-        child: LinearButton(btntext: '最迟在' + getSecondsMIn(_time) + '后结算', colorList: [Color(0xFFAF4946), Color(0xFFAF4946)], textColor: Color(0xFF252532) ),
+        child: LinearButton(btntext: '最迟在' + getSecondsMIn(_time) + '后结算', colorList: [Color(0xFFAF4946), Color(0xFFAF4946)], textColor: Color(0xFF252532)),
       );
     } else if (statusFlag == 4 && tabIndex == 0) {
       return Container(
@@ -851,10 +855,15 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
                         ),
                       )
                     : Container(),
-                Text(
-                  myRank != 0 ? '第${myRank}名' : '未上榜',
-                  style: TextStyle(fontSize: 14, color: Color(0xFF252532), fontWeight: FontWeight.w500),
-                )
+                myRank != 0 && myRank < 4
+                    ? Text(
+                        jiangpaiImg[myRank - 1],
+                        style: TextStyle(fontSize: 14, color: Color(0xFF252532), fontWeight: FontWeight.w500),
+                      )
+                    : Text(
+                        '未上榜',
+                        style: TextStyle(fontSize: 14, color: Color(0xFF252532), fontWeight: FontWeight.w500),
+                      )
               ],
             ),
           ),
@@ -1032,7 +1041,7 @@ class RankContentState extends State<RankContent> {
       [Color(0xFFC5C5C5), Color(0xFFE3E3E3)],
       [Color(0xFFE77023), Color(0xFFF89E58)]
     ];
-    List imgList=['images/jiangpai_huangjin.png','images/jiangpai_baiyin.png','images/jiangpai_qingtong.png'];
+    List imgList = ['images/jiangpai_huangjin.png', 'images/jiangpai_baiyin.png', 'images/jiangpai_qingtong.png'];
     return Container(
       padding: EdgeInsets.only(left: 15, right: 15, top: _num == 1 ? 0 : 15),
       width: 107,
@@ -1042,7 +1051,6 @@ class RankContentState extends State<RankContent> {
           Container(
             child: Stack(
               children: <Widget>[
-               
                 Container(
                   margin: EdgeInsets.only(top: 17, bottom: 20),
                   width: _num == 1 ? 70 : 60,
@@ -1067,12 +1075,12 @@ class RankContentState extends State<RankContent> {
                     ),
                   ),
                 ),
-                 Positioned(
+                Positioned(
                   top: 0,
                   left: _num == 1 ? 19 : 14,
                   child: Center(
                     child: Image.asset(
-                      imgList[_num-1],
+                      imgList[_num - 1],
                     ),
                   ),
                 ),
@@ -1088,16 +1096,16 @@ class RankContentState extends State<RankContent> {
             overflow: TextOverflow.ellipsis,
             textAlign: TextAlign.center,
           ),
-          SizedBox(
-            height: 5,
-          ),
-          Row(
-            mainAxisAlignment: MainAxisAlignment.center,
-            children: <Widget>[
-              Image.asset('images/icon_jinbi_xiao_hong.png', width: 20),
-              Text('×' + (topList[_num - 1].bonus != null ? topList[_num - 1].bonus.toString() : '0'), style: TextStyle(color: PRIMARY_COLOR, fontSize: 12))
-            ],
-          )
+          // SizedBox(
+          //   height: 5,
+          // ),
+          // Row(
+          //   mainAxisAlignment: MainAxisAlignment.center,
+          //   children: <Widget>[
+          //     Image.asset('images/icon_jinbi_xiao_hong.png', width: 20),
+          //     Text('×' + (topList[_num - 1].bonus != null ? topList[_num - 1].bonus.toString() : '0'), style: TextStyle(color: PRIMARY_COLOR, fontSize: 12))
+          //   ],
+          // )
         ],
       ),
     );

+ 16 - 12
lib/pages/roomList.dart

@@ -69,7 +69,9 @@ class RoomListState extends State<RoomList> {
 
     _controller = ScrollController();
     _controller.addListener(() {
+      // print('1111111');
       if (_controller.position.pixels == _controller.position.maxScrollExtent) {
+      
         if (scrollFlag) {
           setState(() {
             currentPage++;
@@ -485,19 +487,19 @@ class RoomListState extends State<RoomList> {
     Map<String, dynamic> data = {'currentPage': currentPage, 'pageNumber': 20, 'myUserId': StoreProvider.of<AppState>(context).state.userInfo.id};
     data['advancedQuery'] = '';
     if (gameId != '') {
-      data['advancedQuery'] += 'AND_,gameId_,=_,' + gameId + '_;';
-    }
-    if (houseLevel != '') {
-      data['advancedQuery'] += 'AND_,houseLevel_,=_,' + houseLevel + '_;';
-    }
-    if (houseType != '') {
-      data['advancedQuery'] += 'AND_,houseType_,=_,' + houseType + '_;';
-    }
-    if (statusFlag != '') {
-      data['advancedQuery'] += 'AND_,statusFlag_,=_,' + statusFlag + '_;';
-    } else {
-      data['statusStr'] = '0,4';
+      data['gameId'] += gameId;
     }
+    // if (houseLevel != '') {
+    //   data['advancedQuery'] += 'AND_,houseLevel_,=_,' + houseLevel + '_;';
+    // }
+    // if (houseType != '') {
+    //   data['advancedQuery'] += 'AND_,houseType_,=_,' + houseType + '_;';
+    // }
+    // if (statusFlag != '') {
+    //   data['advancedQuery'] += 'AND_,statusFlag_,=_,' + statusFlag + '_;';
+    // } else {
+    //   data['statusStr'] = '0,4';
+    // }
     data['searchKey'] = searchKey;
     List<HouseInfo> _allList = roomList;
     if (currentPage == 1) {
@@ -508,6 +510,8 @@ class RoomListState extends State<RoomList> {
       data['recommender'] = StoreProvider.of<AppState>(context).state.userInfo.recommender;
     }
 
+    print(data);
+
     // myUserId=84705&recommender=84702
     Result res = await HttpManager.get('houseInfo/page', data: data);
     if (res.success && res.data['pp'] != null) {

+ 5 - 4
lib/widget/HomeDrawer.dart

@@ -53,10 +53,11 @@ class HomeDrawerState extends State<HomeDrawer> {
             children: <Widget>[
               Container(
                 height: 210,
+                padding: EdgeInsets.only(left: 35),
                 decoration: BoxDecoration(color: Color(0x4D000000)),
                 child: SafeArea(
                   child: Row(
-                    mainAxisAlignment: MainAxisAlignment.center,
+                    // mainAxisAlignment: MainAxisAlignment.center,
                     children: <Widget>[
                       ClipOval(
                         child: InkWell(
@@ -96,11 +97,11 @@ class HomeDrawerState extends State<HomeDrawer> {
                                     width: 20,
                                     height: 20,
                                     child: Image.asset(
-                                        'images/icon_jinbi_da_bai.png'),
+                                        'images/icon_menpiao.png'),
                                   ),
                                 ),
                                 Text(
-                                  userInfo.moneyCoin.toString(),
+                                  userInfo.moneyTicket.toString(),
                                   style: TextStyle(
                                       fontSize: 16,
                                       color: Colors.white,
@@ -123,7 +124,7 @@ class HomeDrawerState extends State<HomeDrawer> {
                     children: <Widget>[
                       DrawerMenu(
                         'images/icon_qianbao.png',
-                        '我的钱包',
+                        '我的门票',
                         onTap: () {
                           Navigator.push(
                               context,

+ 15 - 12
lib/widget/RoomItem.dart

@@ -4,6 +4,7 @@ import 'dart:ui';
 import '../model/HouseInfo.dart';
 import '../model/GameInfo.dart';
 import '../pages/RoomInfo.dart';
+import 'ScoreType.dart';
 
 class HouseItem extends StatelessWidget {
   HouseItem({Key key, this.roomInfo, this.gameInfo}) : super(key: key);
@@ -56,18 +57,20 @@ class HouseItem extends StatelessWidget {
                               overflow: TextOverflow.ellipsis,
                             ),
                           ),
-                          roomInfo.houseLevel.icon != null
-                              ? Container(
-                                  margin: EdgeInsets.only(left: 6),
-                                  child: Image.network(roomInfo.houseLevel.icon, width: 14),
-                                )
-                              : null,
-                          Container(
-                              margin: EdgeInsets.only(left: 1),
-                              child: Text(
-                                roomInfo.houseLevel.levelName,
-                                style: TextStyle(color: Color(0xFFF9D881), fontSize: 9),
-                              )),
+                          Container(width: 5,),
+                          ScoreType(roomInfo.scoreType)
+                          // roomInfo.houseLevel.icon != null
+                          //     ? Container(
+                          //         margin: EdgeInsets.only(left: 6),
+                          //         child: Image.network(roomInfo.houseLevel.icon, width: 14),
+                          //       )
+                          //     : null,
+                          // Container(
+                          //     margin: EdgeInsets.only(left: 1),
+                          //     child: Text(
+                          //       roomInfo.houseLevel.levelName,
+                          //       style: TextStyle(color: Color(0xFFF9D881), fontSize: 9),
+                          //     )),
                         ],
                       ),
                       Text(

+ 34 - 0
lib/widget/ScoreType.dart

@@ -0,0 +1,34 @@
+import 'package:flutter/material.dart';
+
+class ScoreType extends StatelessWidget {
+  final int type;
+  ScoreType(this.type);
+  @override
+  Widget build(BuildContext context) {
+    if (type == 1) {
+      return Container(
+        width: 34,
+        height: 18,
+        color: Theme.of(context).primaryColor,
+        child: Center(
+          child: Text(
+            '吃鸡',
+            style: TextStyle(fontSize: 12, color: Color(0xFF293354)),
+          ),
+        ),
+      );
+    } else {
+      return Container(
+        width: 34,
+        height: 18,
+        color: Color(0xFFFDC372),
+        child: Center(
+          child: Text(
+            '评分',
+            style: TextStyle(fontSize: 12, color: Color(0xFF293354)),
+          ),
+        ),
+      );
+    }
+  }
+}