角色数据修改

This commit is contained in:
chen wei bo
2025-09-08 16:12:51 +08:00
parent bc3660f329
commit 7665696c83
3 changed files with 27 additions and 2 deletions
+24
View File
@@ -288,6 +288,18 @@ export class GirlData extends BaseData {
return oneData.getAllGrilPhotoDataId();
}
/** 获取第一个技师图片的资源路径 */
public getFirstGrilPhotoPath(categoryId: string, girlId: number): string {
let oneData = this.getGrilDetail(categoryId, girlId);
if (!oneData) return "";
// 第一个 id
const ids = this.getAllGrilPhotoDataId(categoryId, girlId);
const length = ids.length;
if (length <= 0) return "";
// 返回数据
return oneData.getGrilPhotoPath(ids[0]);
}
/** 获取技师图片的类型 */
public getGrilPhotoType(categoryId: string, girlId: number, id: number): number {
let oneData = this.getGrilDetail(categoryId, girlId);
@@ -328,6 +340,18 @@ export class GirlData extends BaseData {
let oneData = this.getGrilDetail(categoryId, girlId);
if (!oneData) return [];
return oneData.getAllGrilVideoDataId();
}
/** 获取第一个技师视频的资源路径 */
public getFirstGrilVideoPath(categoryId: string, girlId: number): string {
let oneData = this.getGrilDetail(categoryId, girlId);
if (!oneData) return "";
// 第一个 id
const ids = this.getAllGrilVideoDataId(categoryId, girlId);
const length = ids.length;
if (length <= 0) return "";
// 返回数据
return oneData.getGrilVideoPath(ids[0]);
}
/** 获取技师视频的资源路径 */
@@ -195,7 +195,7 @@ export class MockGirlService implements IGirlService {
let videoPrice = girlDetailConfig.getVideoPriceById(girlId, id);
let oneData = this.genVideo(id, videoPath, videoEmotion, videoPrice);
videoData.push(oneData);
}
}
// 详细数据
let detail = this.genDetail(girlId, detailDesc, photoData, videoData);
// 图片解锁数据
@@ -166,7 +166,8 @@ export class GirlDetailPanel extends li_BaseView {
this.descAge.string =
LanguageUtils.getText("girldetailpanel.age") + age.toString();
const firstPath = girlData.getGrilVideoPath(this.category.toString(), this.id, 0);
const firstPath = girlData.getFirstGrilVideoPath(this.category.toString(), this.id);
console.log("firstPath: ", firstPath);
ResManager.I.changeBundleVideo(
this.avatarVideo,
firstPath,