Browse Source

修改排行榜UI

hwt 6 years ago
parent
commit
72055083db
35 changed files with 200 additions and 413 deletions
  1. 3 3
      assets/resources/prefabs/rank_artist_item.prefab
  2. 3 3
      assets/resources/prefabs/rank_company_item.prefab
  3. 106 330
      assets/resources/prefabs/rank_page.prefab
  4. BIN
      assets/resources/rank/atlas/artist_tab_selected.png
  5. 30 0
      assets/resources/rank/atlas/artist_tab_selected.png.meta
  6. BIN
      assets/resources/rank/atlas/company_tab_selected.png
  7. 30 0
      assets/resources/rank/atlas/company_tab_selected.png.meta
  8. BIN
      assets/resources/rank/atlas/tab_bg.png
  9. 7 7
      assets/resources/rank/atlas/tab_bg.png.meta
  10. BIN
      assets/resources/rank/atlas/tab_selected.png
  11. 0 30
      assets/resources/rank/atlas/tab_selected.png.meta
  12. 13 9
      assets/scripts/rank/RankPage.js
  13. 7 0
      assets/textures/friendList/aa.meta
  14. 0 0
      assets/textures/friendList/aa/AutoAtlas.pac
  15. 1 1
      assets/textures/friendList/aa/AutoAtlas.pac.meta
  16. 0 0
      assets/textures/friendList/aa/accept_button.png
  17. 0 0
      assets/textures/friendList/aa/accept_button.png.meta
  18. 0 0
      assets/textures/friendList/aa/close.png
  19. 0 0
      assets/textures/friendList/aa/close.png.meta
  20. 0 0
      assets/textures/friendList/aa/friend_list_bg1.png
  21. 0 0
      assets/textures/friendList/aa/friend_list_bg1.png.meta
  22. 0 0
      assets/textures/friendList/aa/friend_list_bg2.png
  23. 0 0
      assets/textures/friendList/aa/friend_list_bg2.png.meta
  24. 0 0
      assets/textures/friendList/aa/home_icon.png
  25. 0 0
      assets/textures/friendList/aa/home_icon.png.meta
  26. 0 0
      assets/textures/friendList/aa/item_bg.png
  27. 0 0
      assets/textures/friendList/aa/item_bg.png.meta
  28. 0 0
      assets/textures/friendList/aa/job_level_star.png
  29. 0 0
      assets/textures/friendList/aa/job_level_star.png.meta
  30. 0 0
      assets/textures/friendList/aa/reject_button.png
  31. 0 0
      assets/textures/friendList/aa/reject_button.png.meta
  32. 0 0
      assets/textures/friendList/aa/sended_button.png
  33. 0 0
      assets/textures/friendList/aa/sended_button.png.meta
  34. BIN
      assets/textures/friendList/avatar_mask.png
  35. 0 30
      assets/textures/friendList/avatar_mask.png.meta

+ 3 - 3
assets/resources/prefabs/rank_artist_item.prefab

@@ -74,7 +74,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 680,
+      "width": 636,
       "height": 130
     },
     "_rotationX": 0,
@@ -317,7 +317,7 @@
     "_scaleY": 1,
     "_position": {
       "__type__": "cc.Vec2",
-      "x": -266.4,
+      "x": -260,
       "y": 0
     },
     "_skewX": 0,
@@ -411,7 +411,7 @@
     "_scaleY": 1,
     "_position": {
       "__type__": "cc.Vec2",
-      "x": -266.3,
+      "x": -260,
       "y": 0
     },
     "_skewX": 0,

+ 3 - 3
assets/resources/prefabs/rank_company_item.prefab

@@ -68,7 +68,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 680,
+      "width": 636,
       "height": 130
     },
     "_rotationX": 0,
@@ -311,7 +311,7 @@
     "_scaleY": 1,
     "_position": {
       "__type__": "cc.Vec2",
-      "x": -266.4,
+      "x": -260,
       "y": 0
     },
     "_skewX": 0,
@@ -405,7 +405,7 @@
     "_scaleY": 1,
     "_position": {
       "__type__": "cc.Vec2",
-      "x": -266.3,
+      "x": -260,
       "y": 0
     },
     "_skewX": 0,

File diff suppressed because it is too large
+ 106 - 330
assets/resources/prefabs/rank_page.prefab


BIN
assets/resources/rank/atlas/artist_tab_selected.png


+ 30 - 0
assets/resources/rank/atlas/artist_tab_selected.png.meta

@@ -0,0 +1,30 @@
+{
+  "ver": "2.0.0",
+  "uuid": "afc41950-0f5d-4cc0-9561-f2d36698dbaf",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "subMetas": {
+    "artist_tab_selected": {
+      "ver": "1.0.3",
+      "uuid": "1fffc9cb-09dd-401a-a3ae-3e657446f7ad",
+      "rawTextureUuid": "afc41950-0f5d-4cc0-9561-f2d36698dbaf",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 318,
+      "height": 70,
+      "rawWidth": 318,
+      "rawHeight": 70,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/rank/atlas/company_tab_selected.png


+ 30 - 0
assets/resources/rank/atlas/company_tab_selected.png.meta

@@ -0,0 +1,30 @@
+{
+  "ver": "2.0.0",
+  "uuid": "4474bf2a-60fa-4d9e-9673-7f9e78df8efc",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "subMetas": {
+    "company_tab_selected": {
+      "ver": "1.0.3",
+      "uuid": "27828cc6-3bd1-43d4-a906-e17182138f13",
+      "rawTextureUuid": "4474bf2a-60fa-4d9e-9673-7f9e78df8efc",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 318,
+      "height": 70,
+      "rawWidth": 318,
+      "rawHeight": 70,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/rank/atlas/tab_bg.png


+ 7 - 7
assets/resources/rank/atlas/tab_bg.png.meta

@@ -1,14 +1,14 @@
 {
   "ver": "2.0.0",
-  "uuid": "e30b0a9c-88b8-4465-812f-290b47b29838",
+  "uuid": "52bee143-82f9-4640-8d2d-504c062ca22e",
   "type": "sprite",
   "wrapMode": "clamp",
   "filterMode": "bilinear",
   "subMetas": {
     "tab_bg": {
       "ver": "1.0.3",
-      "uuid": "f06e5641-abc1-49e5-b4e6-f34fb58d7478",
-      "rawTextureUuid": "e30b0a9c-88b8-4465-812f-290b47b29838",
+      "uuid": "b04e53c5-9ecc-4e58-ae1a-032d4e32089b",
+      "rawTextureUuid": "52bee143-82f9-4640-8d2d-504c062ca22e",
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,
@@ -20,10 +20,10 @@
       "height": 70,
       "rawWidth": 636,
       "rawHeight": 70,
-      "borderTop": 10,
-      "borderBottom": 10,
-      "borderLeft": 10,
-      "borderRight": 10,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
       "subMetas": {}
     }
   }

BIN
assets/resources/rank/atlas/tab_selected.png


+ 0 - 30
assets/resources/rank/atlas/tab_selected.png.meta

@@ -1,30 +0,0 @@
-{
-  "ver": "2.0.0",
-  "uuid": "a70a672b-f8d2-40ae-bfd7-6f3f11a3af48",
-  "type": "sprite",
-  "wrapMode": "clamp",
-  "filterMode": "bilinear",
-  "subMetas": {
-    "tab_selected": {
-      "ver": "1.0.3",
-      "uuid": "36e400ea-3e3c-4307-a4a9-7fdc627d9138",
-      "rawTextureUuid": "a70a672b-f8d2-40ae-bfd7-6f3f11a3af48",
-      "trimType": "auto",
-      "trimThreshold": 1,
-      "rotated": false,
-      "offsetX": 0,
-      "offsetY": 0,
-      "trimX": 0,
-      "trimY": 0,
-      "width": 318,
-      "height": 70,
-      "rawWidth": 318,
-      "rawHeight": 70,
-      "borderTop": 10,
-      "borderBottom": 10,
-      "borderLeft": 10,
-      "borderRight": 10,
-      "subMetas": {}
-    }
-  }
-}

+ 13 - 9
assets/scripts/rank/RankPage.js

@@ -5,7 +5,6 @@ cc.Class({
     properties: {
 
         content: cc.Node,
-        myNode: cc.Node,
 
         allRankSpriteFrame: [cc.SpriteFrame],
         friendRankSpriteFrame: [cc.SpriteFrame],
@@ -39,7 +38,9 @@ cc.Class({
     },
 
     allRankSelected() {
-
+        if (this.loading) {
+            return;
+        }
         // this.allRankTab.node.x = 480;
         // this.friendRankTab.node.x = 496;
         this.allRankTab.node.zIndex = 99;
@@ -53,6 +54,9 @@ cc.Class({
     },
 
     friendRankSelected() {
+        if (this.loading) {
+            return;
+        }
         // this.allRankTab.node.x = 496;
         // this.friendRankTab.node.x = 480;
         this.allRankTab.node.zIndex = 0;
@@ -67,20 +71,16 @@ cc.Class({
 
     companyTabSelected() {
         this.secondTab = 0;
-        this.companyTab.spriteFrame = this.secondTabSpriteFrame[1];
-        this.artistTab.spriteFrame = this.secondTabSpriteFrame[0];
-        this.setSelectedText(this.companyText, '经济公司');
-        this.setDefaultText(this.artistText, '艺人');
+        this.companyTab.spriteFrame = this.secondTabSpriteFrame[0];
+        this.artistTab.spriteFrame = null;
         this.companySrcollView.node.active = true;
         this.artistSrcollView.node.active = false;
     },
 
     artistTabSelected() {
         this.secondTab = 1;
-        this.companyTab.spriteFrame = this.secondTabSpriteFrame[0];
+        this.companyTab.spriteFrame = null;
         this.artistTab.spriteFrame = this.secondTabSpriteFrame[1];
-        this.setDefaultText(this.companyText, '经济公司');
-        this.setSelectedText(this.artistText, '艺人');
         this.companySrcollView.node.active = false;
         this.artistSrcollView.node.active = true;
     },
@@ -100,6 +100,7 @@ cc.Class({
     },
 
     close() {
+        this.loading = false;
         if (this.node && this.node.parent) {
             let self = this;
             let finish = cc.callFunc(() => {
@@ -110,6 +111,7 @@ cc.Class({
     },
 
     getData() {
+        this.loading = true;
         let promise = null;
         this.companySrcollView.getComponent('RankListWithAdapter').setLoading();
         if (this.currentTab === 0) {
@@ -122,8 +124,10 @@ cc.Class({
             this.data = res.data;
             this.companySrcollView.getComponent('RankListWithAdapter').bindData(this.data.companyRank);
             this.artistSrcollView.getComponent('RankListWithAdapter').bindData(this.data.artistRank);
+            this.loading = false;
         }).catch((code, msg) => {
             console.log(code)
+            this.loading = false;
         });
     },
 

+ 7 - 0
assets/textures/friendList/aa.meta

@@ -0,0 +1,7 @@
+{
+  "ver": "1.0.1",
+  "uuid": "864f74f4-30d4-4c4f-9e06-4abc6707e703",
+  "isSubpackage": false,
+  "subpackageName": "",
+  "subMetas": {}
+}

+ 0 - 0
assets/textures/friendList/AutoAtlas.pac → assets/textures/friendList/aa/AutoAtlas.pac


+ 1 - 1
assets/textures/friendList/AutoAtlas.pac.meta → assets/textures/friendList/aa/AutoAtlas.pac.meta

@@ -1,6 +1,6 @@
 {
   "ver": "1.1.0",
-  "uuid": "8996e6b1-e41a-40ed-b552-b5f500ca86e0",
+  "uuid": "006f050d-aca9-468a-9b5f-8b30d38810df",
   "maxWidth": 1024,
   "maxHeight": 1024,
   "padding": 2,

+ 0 - 0
assets/textures/friendList/accept_button.png → assets/textures/friendList/aa/accept_button.png


+ 0 - 0
assets/textures/friendList/accept_button.png.meta → assets/textures/friendList/aa/accept_button.png.meta


+ 0 - 0
assets/textures/friendList/close.png → assets/textures/friendList/aa/close.png


+ 0 - 0
assets/textures/friendList/close.png.meta → assets/textures/friendList/aa/close.png.meta


+ 0 - 0
assets/textures/friendList/friend_list_bg1.png → assets/textures/friendList/aa/friend_list_bg1.png


+ 0 - 0
assets/textures/friendList/friend_list_bg1.png.meta → assets/textures/friendList/aa/friend_list_bg1.png.meta


+ 0 - 0
assets/textures/friendList/friend_list_bg2.png → assets/textures/friendList/aa/friend_list_bg2.png


+ 0 - 0
assets/textures/friendList/friend_list_bg2.png.meta → assets/textures/friendList/aa/friend_list_bg2.png.meta


+ 0 - 0
assets/textures/friendList/home_icon.png → assets/textures/friendList/aa/home_icon.png


+ 0 - 0
assets/textures/friendList/home_icon.png.meta → assets/textures/friendList/aa/home_icon.png.meta


+ 0 - 0
assets/textures/friendList/item_bg.png → assets/textures/friendList/aa/item_bg.png


+ 0 - 0
assets/textures/friendList/item_bg.png.meta → assets/textures/friendList/aa/item_bg.png.meta


+ 0 - 0
assets/textures/friendList/job_level_star.png → assets/textures/friendList/aa/job_level_star.png


+ 0 - 0
assets/textures/friendList/job_level_star.png.meta → assets/textures/friendList/aa/job_level_star.png.meta


+ 0 - 0
assets/textures/friendList/reject_button.png → assets/textures/friendList/aa/reject_button.png


+ 0 - 0
assets/textures/friendList/reject_button.png.meta → assets/textures/friendList/aa/reject_button.png.meta


+ 0 - 0
assets/textures/friendList/sended_button.png → assets/textures/friendList/aa/sended_button.png


+ 0 - 0
assets/textures/friendList/sended_button.png.meta → assets/textures/friendList/aa/sended_button.png.meta


BIN
assets/textures/friendList/avatar_mask.png


+ 0 - 30
assets/textures/friendList/avatar_mask.png.meta

@@ -1,30 +0,0 @@
-{
-  "ver": "2.0.0",
-  "uuid": "2e33dcbb-295a-4793-8af9-66864775dae7",
-  "type": "sprite",
-  "wrapMode": "clamp",
-  "filterMode": "bilinear",
-  "subMetas": {
-    "avatar_mask": {
-      "ver": "1.0.3",
-      "uuid": "da7f6e29-5f40-4875-8533-f31003bc591a",
-      "rawTextureUuid": "2e33dcbb-295a-4793-8af9-66864775dae7",
-      "trimType": "auto",
-      "trimThreshold": 1,
-      "rotated": false,
-      "offsetX": 0,
-      "offsetY": 0,
-      "trimX": 0,
-      "trimY": 0,
-      "width": 90,
-      "height": 90,
-      "rawWidth": 90,
-      "rawHeight": 90,
-      "borderTop": 22,
-      "borderBottom": 22,
-      "borderLeft": 22,
-      "borderRight": 22,
-      "subMetas": {}
-    }
-  }
-}

Some files were not shown because too many files changed in this diff