let ButtonSelect1 = require('ButtonSelect1') let ViewBase = require('ViewBase') cc.Class({ extends: ViewBase, properties: { button1: { default: null, type: ButtonSelect1, serializable: true, }, button2: { default: null, type: ButtonSelect1, serializable: true, }, button3: { default: null, type: ButtonSelect1, serializable: true, }, button4: { default: null, type: ButtonSelect1, serializable: true, }, }, onLoad () { self.buttons = [ this.button1, this.button2, this.button3, this.button4, ]; this.views = [ {type:JMC.UIEnum.DreamMain, view:null, initing:false}, {type:JMC.UIEnum.DreamMain, view:null, initing:false}, {type:JMC.UIEnum.DreamMain, view:null, initing:false}, {type:JMC.UIEnum.DreamMain, view:null, initing:false}, ]; this.curViewType = null this.onClickTitle(null, "0") }, onClickTitle(event, customEventData) { let index = parseInt(customEventData) let viewType = this.views[index] this.curViewType = viewType; this.createOrShowView(this.curViewType) cc.log(G.CfgMgr.battleBoxAwardConfig.getByMultipleKey(2001, 10001)); cc.log(G.CfgMgr.battleBoxConfig.getByMainKey(2001)); }, createOrShowView(type) { } // update (dt) {}, });