配置表数据变化
This commit is contained in:
@@ -67,11 +67,16 @@ export class GirlData extends BaseData {
|
||||
let allData = this.parseAllGirlBrief(respOrList);
|
||||
if (!allData) return;
|
||||
const bucket = this.ensureBucket(categoryId);
|
||||
// 用一个临时 Set 保存已有的 id,加速去重
|
||||
const existed = new Set<number>(bucket.girlIds);
|
||||
for (const g of allData) {
|
||||
const id = g.id;
|
||||
bucket.briefs.set(id, g);
|
||||
// TODO,去重
|
||||
bucket.girlIds.push(id);
|
||||
// 去重
|
||||
if (!existed.has(id)) {
|
||||
bucket.girlIds.push(id);
|
||||
existed.add(id);
|
||||
}
|
||||
}
|
||||
console.log("保存技师的简要数据: ", bucket);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user