模拟数据:每日推荐
This commit is contained in:
@@ -309,6 +309,7 @@ export class GirlData extends BaseData {
|
||||
public setDailyRecommend(res: proto.cs.ICSDailyRecommendRes): void {
|
||||
this.mergeBriefs(DAILY_BUCKET, res.girls);
|
||||
this._dailyRecommendIds = res.girls.map(g => g.id ?? 0);
|
||||
console.log("保存每日推荐: ", this._dailyRecommendIds);
|
||||
}
|
||||
|
||||
/** 获取每日推荐的简要信息 */
|
||||
@@ -319,10 +320,24 @@ export class GirlData extends BaseData {
|
||||
return b.briefs.get(b.girlIds[index]) ?? null;
|
||||
}
|
||||
|
||||
/** 获取 id */
|
||||
public getRecommendGrilId(index: number): number {
|
||||
let oneData = this.getRecommendGrilBrief(DAILY_BUCKET, index);
|
||||
if (!oneData) return 0;
|
||||
return oneData.id;
|
||||
}
|
||||
|
||||
/** 获取名字 */
|
||||
public getRecommendGrilName(index: number): string {
|
||||
let oneData = this.getRecommendGrilBrief(DAILY_BUCKET, index);
|
||||
if (!oneData) return "";
|
||||
return oneData.name;
|
||||
}
|
||||
|
||||
/** 获取头像 */
|
||||
public getRecommendGrilAvatar(index: number): string {
|
||||
let oneData = this.getRecommendGrilBrief(DAILY_BUCKET, index);
|
||||
if (!oneData) return "";
|
||||
return oneData.avatar;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user