增加方法:获取 在聊天中,触发技师图片的id
This commit is contained in:
@@ -386,6 +386,22 @@ export class GirlData extends BaseData {
|
||||
return false;
|
||||
}
|
||||
|
||||
/** 获取 在聊天中,触发技师图片的id */
|
||||
public getTriggerGrilPhotoId(categoryId: string, girlId: number): number {
|
||||
let oneData = this.getGrilDetail(categoryId, girlId);
|
||||
if (!oneData) return 0;
|
||||
// 所有图片 id,展示类型属于在聊天中触发
|
||||
let allId = oneData.getAllTriggerGrilPhotoId();
|
||||
// 总聊天次数
|
||||
let chatTotalCount = this.getChatTotalCount(categoryId, girlId);
|
||||
// 遍历
|
||||
for (let id of allId) {
|
||||
let count = this.getGrilPhotoUnlockCounts(categoryId, girlId, id);
|
||||
if (chatTotalCount >= count) return id;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** 获取第一个技师图片的资源路径 */
|
||||
public getFirstGrilPhotoPath(categoryId: string, girlId: number): string {
|
||||
let oneData = this.getGrilDetail(categoryId, girlId);
|
||||
|
||||
Reference in New Issue
Block a user