import Panel from "../views/Panel";
import StartScene from "../startScene/StartScene";
import ToastCtrl from "../ctrls/toastCtrl";
import { DataManager } from "../../libs/tw/manager/DataManager";
// import { huanbeiNet } from "../NetConst";

export default class NoPrizePanel extends Panel{
    protected get skinKey() { return 'NoPrize' }
    public closeBtn:eui.Button;
    constructor(){
        super();

    }
    initEvents(){
        super.initEvents();
        this.onTap(this.closeBtn,this.onTap_closePanel);
    }

    onTap_closePanel(){
        // insex
        // huanbeiNet.getTask((s)=>{
        //     if(!s){
        //         ToastCtrl.instance.show(`活动太火爆了，请稍后再来~`);
        //     }
        //     let data = DataManager.ins.getData("getTask").data;
        //     this.hidePanel();
        //     StartScene.instance.updateData(data);
        // },window['projectId'],true,window['pageId'])
        this.hidePanel();
        
    }

    removeEvents(){
        super.removeEvents();
        this.clearTap(this.closeBtn,this.onTap_closePanel);
    }
}