增加方法:获取 在聊天中,触发技师图片的id
This commit is contained in:
@@ -107,7 +107,21 @@ export class GirlDetailData extends BaseData {
|
||||
}
|
||||
return allId;
|
||||
}
|
||||
|
||||
/** 获取所有技师图片数据的id,展示类型属于在聊天中触发 */
|
||||
public getAllTriggerGrilPhotoId(): number[] {
|
||||
if (!this.photoData) return [];
|
||||
|
||||
// 筛选出类型为 2 的图片
|
||||
let triggerPhotos = this.photoData.filter(photo => photo.imageType === 2);
|
||||
|
||||
// 按 unlockCounts 从大到小排序
|
||||
triggerPhotos.sort((a, b) => b.unlockCounts - a.unlockCounts);
|
||||
|
||||
// 返回排序后的 id 数组
|
||||
return triggerPhotos.map(photo => photo.id);
|
||||
}
|
||||
|
||||
/** 获取技师图片数据,通过 id */
|
||||
private getGrilPhotoData(id: number): proto.cs.IPurchaseCommercialImage | null {
|
||||
if (!this.photoData) return null;
|
||||
|
||||
Reference in New Issue
Block a user