角色数据修改

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(); 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 { public getGrilPhotoType(categoryId: string, girlId: number, id: number): number {
let oneData = this.getGrilDetail(categoryId, girlId); let oneData = this.getGrilDetail(categoryId, girlId);
@@ -330,6 +342,18 @@ export class GirlData extends BaseData {
return oneData.getAllGrilVideoDataId(); 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]);
}
/** 获取技师视频的资源路径 */ /** 获取技师视频的资源路径 */
public getGrilVideoPath(categoryId: string, girlId: number, id: number): string { public getGrilVideoPath(categoryId: string, girlId: number, id: number): string {
let oneData = this.getGrilDetail(categoryId, girlId); let oneData = this.getGrilDetail(categoryId, girlId);
@@ -166,7 +166,8 @@ export class GirlDetailPanel extends li_BaseView {
this.descAge.string = this.descAge.string =
LanguageUtils.getText("girldetailpanel.age") + age.toString(); 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( ResManager.I.changeBundleVideo(
this.avatarVideo, this.avatarVideo,
firstPath, firstPath,