Pārlūkot izejas kodu

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

hwt 6 gadi atpakaļ
vecāks
revīzija
808b97e099
1 mainītis faili ar 11 papildinājumiem un 11 dzēšanām
  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) {},