|
|
@@ -32,7 +32,7 @@ export default class Login extends cc.Component {
|
|
|
|
|
|
private hasDeviceBackInit = false;
|
|
|
|
|
|
- private hasCheckAnti = false;
|
|
|
+ private hasLogin = false;
|
|
|
|
|
|
private hasCheckPermission = false;
|
|
|
|
|
|
@@ -42,6 +42,8 @@ export default class Login extends cc.Component {
|
|
|
|
|
|
private coreGame = null;
|
|
|
|
|
|
+ private hasCheckChannel = false;
|
|
|
+
|
|
|
private initShuzilm = false;
|
|
|
|
|
|
onLoad() {
|
|
|
@@ -77,6 +79,7 @@ export default class Login extends cc.Component {
|
|
|
}
|
|
|
|
|
|
update() {
|
|
|
+ //隐私弹窗
|
|
|
if (!this.hasCheckPrivacy) {
|
|
|
this.hasCheckPrivacy = true
|
|
|
this.checkPrivacy()
|
|
|
@@ -118,35 +121,23 @@ export default class Login extends cc.Component {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if (!CC_DEBUG) {
|
|
|
- if (gData.loginData.popIdentifySwitch) {
|
|
|
- if (!this.hasCheckAnti) {
|
|
|
- this.hasCheckAnti = true
|
|
|
- // this.checkShowIdentification()
|
|
|
- JsbSystem.ysdkInit();
|
|
|
- JsbSystem.autologin();
|
|
|
- }
|
|
|
-
|
|
|
- if (!gData.loginData.passAnti) {
|
|
|
- return
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
if (gData.loginData.loadResCompelete) {
|
|
|
+ //数盟初始化
|
|
|
if (!this.initShuzilm) {
|
|
|
this.initShuzilm = true;
|
|
|
mk.shuzilmM.init();
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if (mk.shuzilmM.hasGot && mk.tongdunM.hasGot) {
|
|
|
- if (mk.aliRiskManager.getRiskCode) {
|
|
|
- mk.aliRiskManager.getRiskCode = false;
|
|
|
+ if (mk.shuzilmM.hasGot && mk.tongdunM.hasGot && mk.aliRiskManager.getRiskCode) {
|
|
|
+ //开始登陆
|
|
|
+ if (!this.hasLogin) {
|
|
|
+ this.hasLogin = true;
|
|
|
|
|
|
this.login();
|
|
|
}
|
|
|
else if (gData.gameData.dataFinish) {//登录流程完毕
|
|
|
+ //微信登录按钮 注释
|
|
|
// if (gData.loginData.isAuth || CC_DEBUG) {
|
|
|
// if (!this.loadSceneState) {
|
|
|
// this.loadSceneState = true;
|
|
|
@@ -158,15 +149,27 @@ export default class Login extends cc.Component {
|
|
|
// this.node_btnLogin.active = true;
|
|
|
// }
|
|
|
|
|
|
+ if (!CC_DEBUG) {
|
|
|
+ //检查用户来源渠道
|
|
|
+ if (!this.hasCheckChannel) {
|
|
|
+ this.hasCheckChannel = true;
|
|
|
+ gData.loginData.getUserChannel();
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!gData.loginData.passAnti) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (!this.loadSceneState) {
|
|
|
this.loadSceneState = true;
|
|
|
+
|
|
|
this.loadMain();
|
|
|
}
|
|
|
|
|
|
gData.gameData.dataFinish = false;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|