Commit 46eba889 authored by 范雪寒's avatar 范雪寒

feat:

parent 044eacf2
...@@ -2405,7 +2405,7 @@ ...@@ -2405,7 +2405,7 @@
"__id__": 74 "__id__": 74
} }
], ],
"_active": false, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 78 "__id__": 78
...@@ -2628,7 +2628,7 @@ ...@@ -2628,7 +2628,7 @@
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 718, "width": 718,
"height": 517 "height": 485
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -2965,8 +2965,8 @@ ...@@ -2965,8 +2965,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 85, "width": 86,
"height": 107 "height": 108
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -2977,8 +2977,8 @@ ...@@ -2977,8 +2977,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, -8.477,
139.277, 144.575,
0, 0,
0, 0,
0, 0,
......
...@@ -84,16 +84,19 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -84,16 +84,19 @@ export default class SceneComponent extends MyCocosSceneComponent {
token: cc.sys.localStorage.getItem('token') token: cc.sys.localStorage.getItem('token')
}); });
console.log('goldDataStr = ', goldDataStr); console.log('goldDataStr = ', goldDataStr);
const goldData = JSON.parse(goldDataStr);
const goldNumber = cc.find('Canvas/userInfo/frame/goldBg/goldNumber');
goldNumber.getComponent(cc.Label).string = goldData.data;
const nickname = cc.find('Canvas/userInfo/frame/nickname'); const nickname = cc.find('Canvas/userInfo/frame/nickname');
nickname.getComponent(cc.Label).string = userInfo.nick_name; nickname.getComponent(cc.Label).string = userInfo.nick_name;
if (userInfo.avatar_url) { if (userInfo.avatar_url) { }
const headImg = cc.find('Canvas/userInfo/frame/mask/headImg'); const headUrl = middleLayerComponent.getHeadUrl();
cc.assetManager.loadRemote(userInfo.avatar_url, (err, tex) => { const headImg = cc.find('Canvas/userInfo/frame/mask/headImg');
headImg.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(tex); cc.assetManager.loadRemote(headUrl, (err, tex) => {
}); headImg.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(tex);
} });
} }
initListener() { initListener() {
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 86, "width": 648,
"height": 108, "height": 209,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"headImg": { "headImg": {
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
"offsetY": 0, "offsetY": 0,
"trimX": 0, "trimX": 0,
"trimY": 0, "trimY": 0,
"width": 648, "width": 86,
"height": 209, "height": 108,
"rawWidth": 648, "rawWidth": 86,
"rawHeight": 209, "rawHeight": 108,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment