import Panel from "../../libs/new_wx/components/Panel";
import { DataManager } from "../../libs/tw/manager/DataManager";

export default class Prize1Panel extends Panel {
    //优惠券
    start() {
        super.start();
        const data = DataManager.ins.getData('getPlugOrderStatus2');
        this['nametxt'].text = data.lottery.title;
        this['img'].source = data.lottery.imgurl
    }

    initEvents() {
        super.initEvents();
        this.useBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_useBtn, this)
    }

    onTap_useBtn() {
        const data = DataManager.ins.getData('getPlugOrderStatus2');
        location.href=data.lottery.link
    }

    get skinKey(): string { return 'Prize1' }
    useBtn: eui.Button;
}