future 1 年之前
父節點
當前提交
7a344d9570

+ 4 - 4
assets/scene/main.scene

@@ -192,7 +192,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920
+      "height": 1919.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -290,7 +290,7 @@
     "_priority": 0,
     "_fov": 45,
     "_fovAxis": 0,
-    "_orthoHeight": 960,
+    "_orthoHeight": 959.9999999999999,
     "_near": 0,
     "_far": 1000,
     "_color": {
@@ -561,7 +561,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920
+      "height": 1919.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -867,7 +867,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920
+      "height": 1919.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",

+ 2 - 1
assets/script/ui/loading_view.ts

@@ -136,7 +136,8 @@ export class loading_view extends Component {
                     }
                 })
             }else{
-                cb("456")
+                cb("_000X63WYAUFPNibogS0zqhdA64n4_5TBhXM")
+                // cb("456")
             }
         })
     }

+ 5 - 1
assets/script/ui/rank/rank.ts

@@ -66,12 +66,15 @@ export class rank extends Component {
 
     loadView(type:number) {
         let id = 0
-        if(type==2) {
+        if(type==1) {
+            id = 0
+        } else if(type==2) {
             id = userDataManager.user_data.region_pid
         } else if(type==3) {
             id = userDataManager.user_data.region_id
         }
         GameManager.requestRankList(id,(d_content)=>{
+            console.log('排行列表 id=',id, '数据=',d_content)
             this.reloadListTop(d_content)
             this.reloadListContent(d_content)
             this.reloadMyInfo(type)
@@ -106,6 +109,7 @@ export class rank extends Component {
             stype = 2
         }
         GameManager.requestMineRank(stype, (d_content)=>{
+            console.log('个人排行 stype=',stype,'数据=',d_content)
             this.my_info_node.getComponent(rank_my_info).initView(d_content)
         })
     }

+ 18 - 0
assets/script/ui/rank/rank_list_top.ts

@@ -45,6 +45,7 @@ export class rank_list_top extends base_ui {
     }
 
     initView(data_list:rankData[]) {
+        this.clearAll()
         if(data_list.length>0) {
             this.m_one_data = data_list[0]
             this.setLabName(this.one_lab_name, this.m_one_data)
@@ -68,6 +69,23 @@ export class rank_list_top extends base_ui {
         }
     }
 
+    private clearAll() {
+        this.one_lab_name.getComponent(Label).string = ''
+        this.one_img_avatar.getComponent(Sprite).spriteFrame = null
+        this.one_lab_score.getComponent(Label).string = ''
+        this.one_img_car.getComponent(Sprite).spriteFrame = null
+
+        this.two_lab_name.getComponent(Label).string = ''
+        this.two_img_avatar.getComponent(Sprite).spriteFrame = null
+        this.two_lab_score.getComponent(Label).string = ''
+        this.two_img_car.getComponent(Sprite).spriteFrame = null
+
+        this.three_lab_name.getComponent(Label).string = ''
+        this.three_img_avatar.getComponent(Sprite).spriteFrame = null
+        this.three_lab_score.getComponent(Label).string = ''
+        this.three_img_car.getComponent(Sprite).spriteFrame = null
+    }
+
     private setLabName(node:Node, data:rankData) {
         let lab_component = node.getComponent(Label)
         if(data.nickName.length>5) {

+ 4 - 5
assets/script/ui/rank/rank_my_info.ts

@@ -21,11 +21,7 @@ export class rank_my_info extends Component {
     @property(Node) img_car:Node = null
 
     initView(data:rankData) {
-        if(data.number==0) {
-            this.img_weishangbang.active = true
-            this.icon_number_bg.active = false
-        } else {
-            console.log('2222222')
+        if(data.number<=3) {
             this.img_weishangbang.active = false
             this.icon_number_bg.active = true
             switch (data.number) {
@@ -41,6 +37,9 @@ export class rank_my_info extends Component {
                 default:
                     break;
             }
+        } else {
+            this.img_weishangbang.active = true
+            this.icon_number_bg.active = false
         }
 
         tools.loadRemoteImg(data.avatarUrl, (r)=>{