Commit 8b324781 authored by liujiangnan's avatar liujiangnan

feat: 游客模式上报处理

parent 063796ca
......@@ -352,6 +352,10 @@ export default class NewClass extends middleLayerBase {
}
saveRecordResult(recordResult) {
if (this.isLogin == false) {
// 游客
return false;
}
this.getUserBaseInfo().then(kidInfo => {
if (!kidInfo) {
return;
......@@ -451,6 +455,10 @@ export default class NewClass extends middleLayerBase {
}
async saveAnswer(data, callback = null) {
if (this.isLogin == false) {
// 游客
return;
}
const token = cc.sys.localStorage.getItem('token');
const kidInfo: any = await this.getUserBaseInfo();
if (!kidInfo) {
......@@ -502,7 +510,9 @@ export default class NewClass extends middleLayerBase {
}
await this.playGetParterAnim();
this.unlockNextForder();
if (this.isLogin == true) {
this.unlockNextForder();
}
}
isLevelActived() {
......@@ -574,6 +584,10 @@ export default class NewClass extends middleLayerBase {
}
saveLastGameData(callback) {
// 游客不保存
if (this.isLogin == false) {
return true;
}
const token = cc.sys.localStorage.getItem('token');
this.callNetworkApiGet('/api/oxford/v1/kid/info', { token }, (res) => {
const kidData = JSON.parse(res);
......
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