| 1234567891011121314151617181920212223242526272829303132 |
- import { _decorator, Component, Node, Label, EventHandler, Button } from 'cc';
- import { BitmapFont } from '../core/ui/BitmapFont';
- import { WithDrawType } from './MyWalletUI';
- const { ccclass, property } = _decorator;
- @ccclass('WithdrawalItem')
- export class WithdrawalItem extends Component {
- @property({ tooltip: "剩余次数", type: Label }) public times: Label;
- @property({ tooltip: "提现金额", type: BitmapFont }) private moneyTxt: BitmapFont;
- @property({ tooltip: "选中高亮", type: Node }) public chooseImg: Node;
- public chooseChangeBack: EventHandler;
- public itemData: any;
- public chooseID: number;
- start() {
- }
- public setData(data: { id: number, type: number, needWatchVideo: boolean, des: string, money: number, needBonus: number, message: string }, chooseID: number) {
- this.chooseID = chooseID;
- this.itemData = data;
- data.type == WithDrawType.Frist && (this.times.string = "新手档");
- data.type != WithDrawType.Frist && (this.times.string = "");
- this.moneyTxt.string = data.money + "元";
- this.node.getComponent(Button).interactable = true;
- }
- public choose() {
- this.chooseChangeBack && this.chooseChangeBack.emit([this.chooseID, this.itemData.message, this.itemData.type, this.itemData.id]);
- }
- }
|