Commit a80d876a authored by liujiangnan's avatar liujiangnan

feat:

parent 8ea88262
......@@ -93,17 +93,7 @@ cc.Class({
""
);
}
},
saveAnswer(data, callback) {
this.callNetworkApiPost(`v1/terminal/save/learnresult`, {
engineCode: this.engineCode,
w_id: data.w_id,
word: data.text_en,
}).then(callback);
},
},
// 需要预加载的数量
preloadCount: null,
// 统计已加载的数量
......@@ -112,7 +102,6 @@ cc.Class({
isDev: null,
engineCode: null, // 机器唯一编码
dataStore: null, // 内存数据仓库
currentSceneName: null, // 当前模板名称
// 统一释放异步资源的方法
......@@ -120,7 +109,6 @@ cc.Class({
this.preloadCount = 0;
this.loadedCount = 0;
this.dataStore = {};
initAir(this);
this.reWriteAir();
},
......@@ -143,7 +131,8 @@ cc.Class({
reWriteAir() {
window.courseware.getData = async (callback) => {
const data = this.dataStore[this.currentSceneName];
const data = await this.callNetworkApiGet("/v1/preference/words", {user_code: this.engineCode});
callback && callback(data);
}
if (!window.air) {
......
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