协议调试

This commit is contained in:
chen wei bo
2025-09-10 01:00:48 +08:00
parent eb55de718e
commit 6c1f564f03
5 changed files with 150 additions and 38 deletions
@@ -188,26 +188,26 @@ export class GirlDetailPanel extends li_BaseView {
bindVideoToggle() {
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
let ids = girlData.getAllDisplayGrilVideoId(this.category.toString(), this.id);
this.refreshImgs(2, this.category, this.id, ids);
let resIds = girlData.getAllDisplayGrilVideoId(this.category.toString(), this.id);
this.refreshImgs(2, this.category, this.id, resIds);
}
refreshImgs(
type: number,
category: number,
id: number,
datas: number[]
resIds: number[]
) {
for (let i = this.imgsLayout.children.length - 1; i >= 0; i--) {
this.imgsLayout.children[i].destroy();
}
let count = datas.length;
let count = resIds.length;
for (let i = 0; i < count; i++) {
let newNode = instantiate(this.imgItemInst.node);
let item = newNode.getComponent(DetailImageItem);
let data = datas[i];
item.refresh(this, type, category, id, data);
let resId = resIds[i];
item.refresh(this, type, category, id, resId);
newNode.active = true;
this.imgsLayout.addChild(newNode);
}
@@ -17,19 +17,27 @@ export class PopupGirlDetailPanel extends li_BaseView {
private category: number;
private girlId: number;
private resId: number;
private type: number;
private base: DetailImageItem;
openUIDataCT(data) {
this.category = data.category;
this.resId = data.resId;
this.girlId = data.girlId;
this.base = data.base;
this.type = data.type;
}
onLoadCT() {
Utils.parseNode(this.node, this._nodeTab);
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
// 价格
this.priceLabel = this._nodeTab.Price.getComponent(Label);
this.priceLabel.string = girlData.getGrilPhotoOriginalPrice(this.category.toString(), this.girlId, this.resId).toString();
if (this.type === 1) {
// 图片
this.priceLabel.string = girlData.getGrilPhotoOriginalPrice(this.category.toString(), this.girlId, this.resId).toString();
} else if (this.type === 2) {
// 视频
this.priceLabel.string = girlData.getGrilVideoOriginalPrice(this.category.toString(), this.girlId, this.resId).toString();
}
this.registerListener();
}
registerListener() {