协议调试

This commit is contained in:
chen wei bo
2025-09-09 20:33:49 +08:00
parent b74bfb7051
commit e5767d5303
6 changed files with 57 additions and 30 deletions
@@ -60,7 +60,16 @@ export class DetailImageItem extends Component {
this.base.setVideEnable(true);
},
};
const isRelease = randomRange(0, 1) > 0.5;
// 数据
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
let isRelease = false;
if (this.type === 1) {
// 图片
isRelease = girlData.isImageUnlock(this.category.toString(), this.girlId, this.resId);
} else if (this.type === 2) {
// 视频
isRelease = girlData.isVideoUnlock(this.category.toString(), this.girlId, this.resId);
}
if (isRelease) {
if (this.url) {
ViewManager.I.openBundlesView("ShowPanel", data);
@@ -68,6 +77,7 @@ export class DetailImageItem extends Component {
}
} else {
ViewManager.I.openBundlesView("PopupGirlDetailPanel", {
category: this.category,
resId: this.resId,
girlId: this.girlId,
base: this,
@@ -142,8 +152,10 @@ export class DetailImageItem extends Component {
let imgPath = "";
this.video.enabled = type === 2;
this.priceFrame.active = type === 2;
let price = 0;
if (type === 1) {
// 图片
price = girlData.getGrilPhotoOriginalPrice(this.category.toString(), this.girlId, this.resId);
this.url = girlData.getGrilPhotoPic(
this.category.toString(),
this.girlId,
@@ -153,6 +165,7 @@ export class DetailImageItem extends Component {
this.isImage = true;
} else if (type === 2) {
// 视频
price = girlData.getGrilVideoOriginalPrice(this.category.toString(), this.girlId, this.resId);
this.isImage = false;
this.url = girlData.getGrilVideoPath(
this.category.toString(),
@@ -175,9 +188,9 @@ export class DetailImageItem extends Component {
} else {
imgPath = this.url + "_thumbnail";
}
this.priceFrame.active = data.price > 0;
this.priceFrame.active = price > 0;
this.videoPrice.string = data.price.toString();
this.videoPrice.string = price.toString();
}
ResManager.I.changeBundleSpriteFrame(this.img, imgPath, "Chat18x", () => {