panhui 6 tahun lalu
induk
melakukan
48edf3d160
4 mengubah file dengan 31 tambahan dan 11 penghapusan
  1. 1 1
      lib/pages/HomePage.dart
  2. 28 8
      lib/pages/RecordList.dart
  3. 1 1
      lib/pages/RoomInfo.dart
  4. 1 1
      lib/pages/TipInfo.dart

+ 1 - 1
lib/pages/HomePage.dart

@@ -235,7 +235,7 @@ 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(),
+                                      Text(seasonList[index].competitionSeason.playerInfo.rank!=null?seasonList[index].competitionSeason.playerInfo.rank.toString():'无排名',
                                           style: TextStyle(color: Color(0xFFFFFFFF), fontSize: 13))
                                     ],
                                   )

+ 28 - 8
lib/pages/RecordList.dart

@@ -206,27 +206,47 @@ 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',
+      'images/jiangpai_bojin.png'
+    ];
     String imageSrc = '';
     String tishiStr = '';
     Color tishiColor;
     bool isImport = false;
     if (playerInfo != null) {
-      if (playerInfo.houseRank != null) {
-        if (playerInfo.houseRank < 4) {
-          imageSrc = imageList[playerInfo.houseRank - 1];
-        } else {
-          imageSrc = imageList[3];
+      if (playerInfo.medal != null) {
+        if (playerInfo.medal == 'platinum') {
+          imageSrc = imageList[4];
+        } else if (playerInfo.medal == 'gold') {
+          imageSrc = imageList[0];
+        } else if (playerInfo.medal == 'silver') {
+          imageSrc = imageList[1];
+        } else if (playerInfo.medal == 'bronze') {
+          imageSrc = imageList[2];
+        }
+        else if(playerInfo.rank!=null){
+          tishiStr='第${playerInfo.rank}名';
         }
+        // if (playerInfo.houseRank < 4) {
+        //   imageSrc = imageList[playerInfo.houseRank - 1];
+        // } else {
+        //   imageSrc = imageList[3];
+        // }
       }
 
       if (playerInfo.statusFlag != null) {
         if (playerInfo.statusFlag == 6) {
           imageSrc = imageList[3];
+        } else if (playerInfo.statusFlag == 0) {
+          tishiStr = '未开始';
+        } else if (playerInfo.statusFlag == 2) {
+          tishiStr = '进行中';
         } else if (playerInfo.statusFlag < 4 || (roomInfo.statusFlag >= 2 && roomInfo.statusFlag < 4)) {
           tishiStr = '结算中';
-        } else if (playerInfo.statusFlag < 2) {
-          tishiStr = '准备中';
         }
       }
     } else {

+ 1 - 1
lib/pages/RoomInfo.dart

@@ -211,7 +211,7 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
       } else {
         playerInfo = PlayerInfo.fromJson(res.data);
 
-        if (res.data.hashCode('medal')) {
+        if (res.data.containsKey('medal')) {
           mymedal = res.data['medal'];
         }
 

+ 1 - 1
lib/pages/TipInfo.dart

@@ -158,7 +158,7 @@ class TipInfoState extends State<TipInfo> {
                           ),
                         )
                       : Container(),
-                  houseInfo != null && tipInfo.typeFlag != 4 && tipInfo.typeFlag != 5 ? RankContent(roomId: houseInfo.id.toString()) : Container(),
+                  // houseInfo != null && tipInfo.typeFlag != 4 && tipInfo.typeFlag != 5 ? RankContent(roomId: houseInfo.id.toString()) : Container(),
                   houseInfo != null && type != 3 ? houseItem(roomInfo: houseInfo, gameInfo: gameInfo) : Container(),
                   (type == 2 || type == 3)
                       ? Container(