|
|
@@ -145,7 +145,7 @@ export class LoginData {
|
|
|
"versioncfg": gData.appData.version,
|
|
|
"idfa": gData.appData.machineInfo.idfa,
|
|
|
"imei": gData.appData.machineInfo.imei,
|
|
|
- "mac": gData.appData.mac,
|
|
|
+ "mac": gData.appData.machineInfo.mac,
|
|
|
"oaid": gData.appData.machineInfo.oaid,
|
|
|
"szlm_did": mk.shuzilmM.szlm_did,
|
|
|
"black_box": mk.tongdunM.tdEquipID,
|
|
|
@@ -199,6 +199,7 @@ export class LoginData {
|
|
|
}
|
|
|
else if (response.errcode == -10003 || response.errcode == -20003) {
|
|
|
//清除缓存
|
|
|
+ console.log('KKKK 6 ', this.uin)
|
|
|
console.log('restart errcode ', response.errcode)
|
|
|
this.reload();
|
|
|
}
|
|
|
@@ -222,10 +223,12 @@ export class LoginData {
|
|
|
}
|
|
|
|
|
|
if (this.uin != data.uin) {
|
|
|
+ console.log('KKKK 0 ', this.uin)
|
|
|
this.uin = data.uin;
|
|
|
this.isNew = false;
|
|
|
}
|
|
|
else {
|
|
|
+ console.log('KKKK -1 ', this.uin)
|
|
|
this.isNew = true;
|
|
|
}
|
|
|
mk.storage.setStorage(StorageKey.uin, this.uin);
|
|
|
@@ -271,19 +274,29 @@ export class LoginData {
|
|
|
let parseData = JSON.parse(decryptData);
|
|
|
this.sessionKey = parseData.session_key;
|
|
|
mk.console.logSingle("[FC]checkLogin decrypt", parseData);
|
|
|
+ console.log("this.sessionKey ", this.sessionKey);
|
|
|
mk.storage.setStorage(StorageKey.sessionKey, this.sessionKey);
|
|
|
if (gData.wechatData.code != null) {
|
|
|
if (this.isNew) {
|
|
|
- gData.wechatData.code = null;
|
|
|
- this.reload();
|
|
|
+ console.log('KKKK 1 ', this.uin)
|
|
|
+ this.getUserInfo();
|
|
|
}
|
|
|
else {
|
|
|
- this.getUserInfo();
|
|
|
+ console.log('KKKK 2 ', this.uin)
|
|
|
+ this.isNew = false;
|
|
|
+ gData.wechatData.code = null;
|
|
|
+
|
|
|
+ cc.audioEngine.stopAll();
|
|
|
+ //调用Android的更好
|
|
|
+ cc.game.restart();
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
+ console.log('KKKK 3 ', this.uin)
|
|
|
this.getUserInfo();
|
|
|
}
|
|
|
+
|
|
|
+ this.getUserInfo();
|
|
|
}
|
|
|
|
|
|
private async getUserInfo() {
|
|
|
@@ -303,6 +316,7 @@ export class LoginData {
|
|
|
//获取user
|
|
|
let aa = {
|
|
|
"uin": this.uin,
|
|
|
+ "mac": gData.appData.machineInfo.mac,
|
|
|
"login_ticket": this.loginTicket,
|
|
|
"szlm_did": mk.shuzilmM.szlm_did,
|
|
|
"black_box": mk.tongdunM.tdEquipID
|