Commit 97bafa44 authored by 李维's avatar 李维

在用户头像框上增加点击登录按钮

parent 079450d0
{
"ver": "1.1.2",
"uuid": "3384fe5b-d367-40a8-a909-73f2ae0ec21a",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
{
"ver": "1.0.1",
"uuid": "75e6ca99-d274-42c9-a46d-24908b4564a0",
"subMetas": {}
}
\ No newline at end of file
{"name":"shop_light","imagePath":"shop_light_tex.png","SubTexture":[{"name":"circle","x":1,"height":382,"frameY":-8,"y":1,"frameHeight":397,"frameX":-8,"frameWidth":397,"width":382},{"name":"shop/star2","x":28,"height":25,"y":485,"width":25},{"name":"shop/star1","x":225,"height":14,"y":487,"width":14},{"name":"shop/shadow","x":1,"height":49,"y":385,"width":257},{"name":"shop/gift","x":299,"height":57,"y":436,"width":60},{"name":"shop/coin2","x":55,"height":21,"y":485,"width":21},{"name":"shop/c","x":104,"height":67,"y":436,"width":62},{"name":"shop/a","x":361,"height":56,"y":436,"width":53},{"name":"shop/b","x":168,"height":66,"y":436,"width":55},{"name":"shop/coin","x":260,"height":38,"y":385,"width":39},{"name":"shop/star5","x":1,"height":25,"y":485,"width":25},{"name":"shop/star4","x":78,"height":19,"y":485,"width":19},{"name":"shop/star3","x":241,"height":12,"y":487,"width":12},{"name":"shop/car","x":385,"height":134,"y":1,"width":242},{"name":"shop/wheel2","x":336,"height":32,"y":385,"width":32},{"name":"shop/wheel1","x":370,"height":32,"y":385,"width":32},{"name":"shop/cat","x":1,"height":47,"y":436,"width":101},{"name":"shop/sale","x":225,"height":49,"y":436,"width":72},{"name":"shop/line","x":301,"height":34,"y":385,"width":33}],"height":512,"width":1024}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "6fec3d98-345b-4354-b0ed-ed052c817b4e",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "1d6b18f3-3e5a-4acb-8bcd-9334430827d1",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1024,
"height": 512,
"platformSettings": {},
"subMetas": {
"shop_light_tex": {
"ver": "1.0.4",
"uuid": "2dc7fb03-f26a-4ce7-8923-8d7595b9759d",
"rawTextureUuid": "1d6b18f3-3e5a-4acb-8bcd-9334430827d1",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -198,
"offsetY": 0.5,
"trimX": 1,
"trimY": 1,
"width": 626,
"height": 509,
"rawWidth": 1024,
"rawHeight": 512,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
......@@ -89,10 +89,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (middleLayer.getComponent('middleLayer').isLogin == false) {
// 游客
cc.find("Canvas/avatar_border/nick_name").getComponent(cc.Label).string = "游客";
cc.find("Canvas/avatar_border/nick_name").active = false; // 游客隐藏用户名
cc.find("Canvas/avatar_border/goldBg").active = false; // 游客隐藏金币
this.initUserInfoView();
return;
}
cc.find("Canvas/avatar_border/guideLogin").active = false; // 登录用户隐藏游客登录覆盖层
const kidInfo = await middleLayer.getComponent('middleLayer').getUserInfo();
cc.find("Canvas/avatar_border/nick_name").getComponent(cc.Label).string = kidInfo.nick_name || "拼读达人";
const golds = await this.getGolds(kidInfo);
......@@ -248,10 +251,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
buttonOnClick(avatar_border, async () => {
if (middleLayerComponent.isLogin == false) {
// 游客
// 提示先登录后购买
middleLayerComponent.showConfirm("需要登录后才能使用,去登录吗?", ()=>{
middleLayerComponent.loadOnlineBundle('NJ_login');
});
middleLayerComponent.loadOnlineBundle('NJ_login');
return;
}
cc.find('Canvas/userInfo').active = true;
......
{
"ver": "2.3.5",
"uuid": "07c6c7b3-103e-4ffb-89e1-67289bd799bb",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 180,
"height": 71,
"platformSettings": {},
"subMetas": {
"btn_orange": {
"ver": "1.0.4",
"uuid": "05ba0b03-372d-4322-ae3a-3fccc8765033",
"rawTextureUuid": "07c6c7b3-103e-4ffb-89e1-67289bd799bb",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 180,
"height": 71,
"rawWidth": 180,
"rawHeight": 71,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "410ec1a2-da62-490d-999e-d39915a27854",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 118,
"height": 52,
"platformSettings": {},
"subMetas": {
"text_codeshop": {
"ver": "1.0.4",
"uuid": "dd2b99de-803e-4cf4-bd3b-4d000864e18f",
"rawTextureUuid": "410ec1a2-da62-490d-999e-d39915a27854",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0.5,
"offsetY": 0,
"trimX": 4,
"trimY": 6,
"width": 111,
"height": 40,
"rawWidth": 118,
"rawHeight": 52,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
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