cc.Class({ extends: cc.Component, properties: { }, // LIFE-CYCLE CALLBACKS: // onLoad () {}, start () { }, onEnable() { if (window.wx != undefined) { window.wx.postMessage({ messageType: 0 }); } }, init() { }, previousPage() { if (window.wx != undefined) { window.wx.postMessage({ messageType: 1 }); } }, nextPage() { if (window.wx != undefined) { window.wx.postMessage({ messageType: 2 }); } } // update (dt) {}, });