Jelajahi Sumber

修复没有头像不显示 星探邀请

hwt 6 tahun lalu
induk
melakukan
808b97e099
1 mengubah file dengan 11 tambahan dan 11 penghapusan
  1. 11 11
      assets/scripts/talent/TalentInvitedItem.js

+ 11 - 11
assets/scripts/talent/TalentInvitedItem.js

@@ -11,13 +11,13 @@ cc.Class({
         avatarSprite: cc.Sprite,
 
         hasUser: {
-            get: function() {
+            get: function () {
                 if (!this._hasUser) {
                     this._hasUser = false;
                 }
                 return this._hasUser;
             },
-            set: function(value) {
+            set: function (value) {
                 this._hasUser = value;
                 if (this._hasUser) {
                     this.inviteNode.active = false;
@@ -32,10 +32,10 @@ cc.Class({
 
     // LIFE-CYCLE CALLBACKS:
 
-    onLoad () {
+    onLoad() {
     },
 
-    start () {
+    start() {
 
     },
 
@@ -46,13 +46,13 @@ cc.Class({
     configData(userData) {
         this.hasUser = true;
 
-        if (userData.head) {
-            Api.createImageFromUrl(userData.head, (spriteFrame) => {
-                this.avatarSprite.spriteFrame = spriteFrame;
-            });
-        } else {
-            this.avatarSprite.spriteFrame = null;
-        }
+        // if (userData.head) {
+        Api.createImageFromUrl(userData.head, (spriteFrame) => {
+            this.avatarSprite.spriteFrame = spriteFrame;
+        });
+        // } else {
+        //     this.avatarSprite.spriteFrame = null;
+        // }
     },
 
     // update (dt) {},