|
@@ -36,15 +36,19 @@ cc.Class({
|
|
|
this.scoreLabel.string = data.score;
|
|
|
this.nameLabel.string = data.nick;
|
|
|
|
|
|
+
|
|
|
+ if (CC_QQPLAY) {
|
|
|
+ var img = BK.Image.loadImage("GameRes://texture/icon.png");
|
|
|
+ this.avatar.spriteFrame = new cc.SpriteFrame(img);
|
|
|
+ }
|
|
|
+
|
|
|
cc.loader.load({
|
|
|
url: data.url, type: 'jpg'
|
|
|
}, (err, texture) => {
|
|
|
if (err === undefined || err === null) {
|
|
|
this.avatar.spriteFrame = new cc.SpriteFrame(texture);
|
|
|
} else {
|
|
|
- cc.loader.loadRes('./textures/default_avatar', cc.SpriteFrame, (err, spriteFrame) => {
|
|
|
- success(spriteFrame);
|
|
|
- })
|
|
|
+ console.log(err);
|
|
|
}
|
|
|
});
|
|
|
}
|