Files
18xchat/assets/Scripts/chat18x/ui/panels/PopupGirlDetailPanel.ts
T

42 lines
1.1 KiB
TypeScript
Raw Normal View History

2025-09-09 16:09:10 +08:00
import { _decorator, Component, Node } from "cc";
2025-09-09 15:33:44 +08:00
import li_BaseView from "../../../Main/Common/li_BaseView";
import { GButton } from "../../../Main/Common/GButton";
2025-09-09 16:09:10 +08:00
import Utils from "../../../Main/Common/Utils";
2025-09-09 19:21:05 +08:00
import { DetailImageItem } from "../../uiitems/DetailImageItem";
2025-09-09 15:33:44 +08:00
const { ccclass, property } = _decorator;
2025-09-09 16:09:10 +08:00
@ccclass("PopupGirlDetailPanel")
export class PopupGirlDetailPanel extends li_BaseView {
2025-09-09 15:33:44 +08:00
private _nodeTab: any = {};
private girlId: number;
2025-09-09 16:09:10 +08:00
private resId: number;
2025-09-09 19:21:05 +08:00
private base: DetailImageItem;
2025-09-09 15:33:44 +08:00
openUIDataCT(data) {
2025-09-09 16:09:10 +08:00
this.resId = data.resId;
this.girlId = data.girlId;
2025-09-09 19:21:05 +08:00
this.base = data.base;
2025-09-09 15:33:44 +08:00
}
onLoadCT() {
Utils.parseNode(this.node, this._nodeTab);
2025-09-09 15:45:50 +08:00
this.registerListener();
2025-09-09 15:33:44 +08:00
}
registerListener() {
GButton.BandClick(this._nodeTab.BuyBtn, this.buyCharacter, this);
2025-09-09 15:45:50 +08:00
GButton.BandClick(this._nodeTab.CloseBtn, this.Close, this);
}
Close() {
this.close();
2025-09-09 15:33:44 +08:00
}
buyCharacter() {
// 购买id为girlId的女生
2025-09-09 16:09:10 +08:00
console.log(this.girlId + "---" + this.resId);
2025-09-09 19:21:05 +08:00
const success = true;
if (success) {
this.close();
this.base.refreshVideoBuy(true);
}
2025-09-09 15:33:44 +08:00
}
}