From a09d821eacb1eb5200ca7a0bec608c2580f9bd6c Mon Sep 17 00:00:00 2001 From: "guoqing.zhu" <1521292690@qq.com> Date: Sun, 5 Jun 2022 19:45:23 +0800 Subject: [PATCH] update --- assets/LoginScene.fire | 4 ++-- assets/res/prefabs/NUI/UIGuninfo.prefab | 4 ++-- assets/res/prefabs/NUI/UINheroinfo.prefab | 4 ++-- assets/res/prefabs/NUI/cell_HeroItemGroup.prefab | 16 ++++++++-------- assets/res/prefabs/NUI/cell_guns.prefab | 12 ++++++------ assets/scripts/UILogin.js | 8 ++++++++ assets/scripts/jcfw/service/jclogin.js | 6 ++++++ 7 files changed, 34 insertions(+), 20 deletions(-) diff --git a/assets/LoginScene.fire b/assets/LoginScene.fire index 15baeb3b..1e38aa5b 100644 --- a/assets/LoginScene.fire +++ b/assets/LoginScene.fire @@ -47,8 +47,8 @@ }, "_scale": { "__type__": "cc.Vec3", - "x": 0.583953857421875, - "y": 0.583953857421875, + "x": 0.805834949016571, + "y": 0.805834949016571, "z": 1 }, "_quat": { diff --git a/assets/res/prefabs/NUI/UIGuninfo.prefab b/assets/res/prefabs/NUI/UIGuninfo.prefab index 7ae77d81..6f9b485c 100644 --- a/assets/res/prefabs/NUI/UIGuninfo.prefab +++ b/assets/res/prefabs/NUI/UIGuninfo.prefab @@ -10121,7 +10121,7 @@ "__id__": 293 } ], - "_active": true, + "_active": false, "_level": 3, "_components": [ { @@ -11303,7 +11303,7 @@ "__id__": 329 } ], - "_active": true, + "_active": false, "_level": 2, "_components": [ { diff --git a/assets/res/prefabs/NUI/UINheroinfo.prefab b/assets/res/prefabs/NUI/UINheroinfo.prefab index bf667e9a..f109ae12 100644 --- a/assets/res/prefabs/NUI/UINheroinfo.prefab +++ b/assets/res/prefabs/NUI/UINheroinfo.prefab @@ -4497,7 +4497,7 @@ "__id__": 129 } ], - "_active": true, + "_active": false, "_level": 3, "_components": [ { @@ -6902,7 +6902,7 @@ "__id__": 197 } ], - "_active": true, + "_active": false, "_level": 5, "_components": [ { diff --git a/assets/res/prefabs/NUI/cell_HeroItemGroup.prefab b/assets/res/prefabs/NUI/cell_HeroItemGroup.prefab index bbb04819..b4e67836 100644 --- a/assets/res/prefabs/NUI/cell_HeroItemGroup.prefab +++ b/assets/res/prefabs/NUI/cell_HeroItemGroup.prefab @@ -3206,7 +3206,7 @@ "__id__": 89 } ], - "_active": true, + "_active": false, "_level": 4, "_components": [ { @@ -4266,7 +4266,7 @@ "__id__": 122 } ], - "_active": true, + "_active": false, "_level": 3, "_components": [ { @@ -7824,7 +7824,7 @@ "__id__": 222 } ], - "_active": true, + "_active": false, "_level": 4, "_components": [ { @@ -8884,7 +8884,7 @@ "__id__": 255 } ], - "_active": true, + "_active": false, "_level": 3, "_components": [ { @@ -12442,7 +12442,7 @@ "__id__": 355 } ], - "_active": true, + "_active": false, "_level": 4, "_components": [ { @@ -13502,7 +13502,7 @@ "__id__": 388 } ], - "_active": true, + "_active": false, "_level": 3, "_components": [ { @@ -17060,7 +17060,7 @@ "__id__": 488 } ], - "_active": true, + "_active": false, "_level": 4, "_components": [ { @@ -18120,7 +18120,7 @@ "__id__": 521 } ], - "_active": true, + "_active": false, "_level": 3, "_components": [ { diff --git a/assets/res/prefabs/NUI/cell_guns.prefab b/assets/res/prefabs/NUI/cell_guns.prefab index d0d8ad59..c357e224 100644 --- a/assets/res/prefabs/NUI/cell_guns.prefab +++ b/assets/res/prefabs/NUI/cell_guns.prefab @@ -1778,7 +1778,7 @@ "__id__": 49 } ], - "_active": true, + "_active": false, "_level": 4, "_components": [ { @@ -2941,7 +2941,7 @@ "__id__": 85 } ], - "_active": true, + "_active": false, "_level": 3, "_components": [ { @@ -5148,7 +5148,7 @@ "__id__": 147 } ], - "_active": true, + "_active": false, "_level": 4, "_components": [ { @@ -6311,7 +6311,7 @@ "__id__": 183 } ], - "_active": true, + "_active": false, "_level": 3, "_components": [ { @@ -8518,7 +8518,7 @@ "__id__": 245 } ], - "_active": true, + "_active": false, "_level": 4, "_components": [ { @@ -9681,7 +9681,7 @@ "__id__": 281 } ], - "_active": true, + "_active": false, "_level": 3, "_components": [ { diff --git a/assets/scripts/UILogin.js b/assets/scripts/UILogin.js index d6cf4c4c..406cc683 100644 --- a/assets/scripts/UILogin.js +++ b/assets/scripts/UILogin.js @@ -149,6 +149,8 @@ cc.Class({ cc.Notifier.on("chainerr",this,this.showchainErrTip.bind(this)); + cc.Notifier.on("AutoLoginFailed",this,this.loginFailed.bind(this)); + cc.debug.setDisplayStats(false); @@ -171,6 +173,11 @@ cc.Class({ } }, + loginFailed(){ + this.btn_tourist.active = true; + this.btn_wallet.active = true; + }, + showchainErrTip(){ uimanger.showUI(ChainErrTip.prefabPath); }, @@ -201,6 +208,7 @@ cc.Class({ cc.Notifier.off('sdkLoginSuccess', this); cc.Notifier.off('autologinsuccess', this); cc.Notifier.off("chainerr",this,this.showchainErrTip.bind(this)); + cc.Notifier.off("AutoLoginFailed",this,this.loginFailed.bind(this)); cc.loader.onProgress = null; SDKManage.logEvent('login_success', 'loginmain'); }, diff --git a/assets/scripts/jcfw/service/jclogin.js b/assets/scripts/jcfw/service/jclogin.js index 44832b92..3a78dcf9 100644 --- a/assets/scripts/jcfw/service/jclogin.js +++ b/assets/scripts/jcfw/service/jclogin.js @@ -188,6 +188,12 @@ module.exports = { return; } + if (obj.errcode == 1001) { + cc.Notifier.emit("AutoLoginFailed"); + return; + } + + if (obj.errcode == 0) { console.log('[__login]success!' + JSON.stringify(obj)); cc.subchannel = obj.channel;