Commit 1d22ae14 authored by haiyoucuv's avatar haiyoucuv

整理一下代码

parent 24c3912e
......@@ -160,7 +160,7 @@ export class ChangeEquipPanel extends Panel {
async getTaskInfo() {
if (!this.taskInfo) {
const success = store.updateTask();
const success = await store.updateTask();
if (!success) return {};
this.taskInfo = {};
store.taskInfo.forEach((v) => {
......@@ -168,13 +168,14 @@ export class ChangeEquipPanel extends Panel {
});
}
console.log("taskInfo: ", this.taskInfo)
return this.taskInfo;
}
/** 获取装备信息 */
async getEquipInfo() {
const [{success, data}, taskInfo] = await Promise.all([
await sendWebNetWithToken(WebNetName.equip),
sendWebNetWithToken(WebNetName.equip),
this.getTaskInfo(),
]);
......@@ -186,6 +187,7 @@ export class ChangeEquipPanel extends Panel {
equipTaskInfo.map(((item) => {
if (!item.taskCode) return;
const task = taskInfo[item.taskCode];
if (!task) return;
item.title = task.title
item.intervalLimitSize = task.intervalLimitSize
item.completedSize = task.completedSize
......
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