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

34 lines
917 B
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 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 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 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 15:33:44 +08:00
}
}