diff --git a/assets/Scripts/chat18x/ui/panels/PopupGirlDetailPanel.ts b/assets/Scripts/chat18x/ui/panels/PopupGirlDetailPanel.ts index 6b0661da..f8240935 100644 --- a/assets/Scripts/chat18x/ui/panels/PopupGirlDetailPanel.ts +++ b/assets/Scripts/chat18x/ui/panels/PopupGirlDetailPanel.ts @@ -1,13 +1,19 @@ -import { _decorator, Component, Node } from "cc"; +import { _decorator, Component, Node, Label } from "cc"; import li_BaseView from "../../../Main/Common/li_BaseView"; import { GButton } from "../../../Main/Common/GButton"; import Utils from "../../../Main/Common/Utils"; import { DetailImageItem } from "../../uiitems/DetailImageItem"; +import { GirlService } from "db://assets/Scripts/chat18x/network/services/GirlService"; +import { DataManager, DataId } from "../../data/DataManager"; +import { GirlData } from "../../data/GirlData"; +import { WalletData } from "../../data/WalletData"; +import proto from "db://assets/Scripts/proto/proto.pb.js"; const { ccclass, property } = _decorator; @ccclass("PopupGirlDetailPanel") export class PopupGirlDetailPanel extends li_BaseView { private _nodeTab: any = {}; + private priceLabel: Label; private category: number; private girlId: number; private resId: number; @@ -20,6 +26,10 @@ export class PopupGirlDetailPanel extends li_BaseView { } onLoadCT() { Utils.parseNode(this.node, this._nodeTab); + const girlData = DataManager.I.getDataById(DataId.Girl); + // 价格 + this.priceLabel = this._nodeTab.Price.getComponent(Label); + this.priceLabel.string = girlData.getGrilPhotoOriginalPrice(this.category.toString(), this.girlId, this.resId).toString(); this.registerListener(); } registerListener() { diff --git a/assets/Scripts/chat18x/uiitems/DetailImageItem.ts b/assets/Scripts/chat18x/uiitems/DetailImageItem.ts index 9a8d41ee..b427134a 100644 --- a/assets/Scripts/chat18x/uiitems/DetailImageItem.ts +++ b/assets/Scripts/chat18x/uiitems/DetailImageItem.ts @@ -153,6 +153,7 @@ export class DetailImageItem extends Component { this.video.enabled = type === 2; this.priceFrame.active = type === 2; let price = 0; + let isUnlock = false; if (type === 1) { // 图片 price = girlData.getGrilPhotoOriginalPrice(this.category.toString(), this.girlId, this.resId); @@ -163,6 +164,7 @@ export class DetailImageItem extends Component { ); imgPath = this.url; this.isImage = true; + isUnlock = girlData.isImageUnlock(this.category.toString(), this.girlId, this.resId); } else if (type === 2) { // 视频 price = girlData.getGrilVideoOriginalPrice(this.category.toString(), this.girlId, this.resId); @@ -178,7 +180,7 @@ export class DetailImageItem extends Component { this.resId ); - const isUnlock = girlData.isVideoUnlock( + isUnlock = girlData.isVideoUnlock( this.category.toString(), this.girlId, this.resId