Commit d603f89e authored by liujiangnan's avatar liujiangnan

feat: 防止日志重新召唤

parent 947223ec
...@@ -1009,13 +1009,15 @@ export default class NewClass extends middleLayerBase { ...@@ -1009,13 +1009,15 @@ export default class NewClass extends middleLayerBase {
this.data = _data; this.data = _data;
} }
isLogUploading = false;
async navLogCaller() { async navLogCaller() {
const res = await this.asyncCallNetworkApiGet("/api/application/v1/engine/report", { const res = await this.asyncCallNetworkApiGet("/api/application/v1/engine/report", {
engineid: this.ENGINE_INFO.uuid, engineid: this.ENGINE_INFO.uuid,
packagename: 'com.iplayabc.oxford.lite' packagename: 'com.iplayabc.oxford.lite'
}); });
const data = JSON.parse(res).data; const data = JSON.parse(res).data;
if (data && data == true) { if (data && data == true && this.isLogUploading==false) {
this.isLogUploading = true;
(<any>window).courseware.logUpload(async (res) => { (<any>window).courseware.logUpload(async (res) => {
const {fileUrl, error} = JSON.parse(res); const {fileUrl, error} = JSON.parse(res);
if (fileUrl) { if (fileUrl) {
...@@ -1024,6 +1026,7 @@ export default class NewClass extends middleLayerBase { ...@@ -1024,6 +1026,7 @@ export default class NewClass extends middleLayerBase {
packagename: 'com.iplayabc.oxford.lite', packagename: 'com.iplayabc.oxford.lite',
file_name: fileUrl file_name: fileUrl
}); });
this.isLogUploading = false;
} }
}); });
} }
......
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