"use strict"; cc._RF.push(module, '22e3aVlFhxKNplUTCwdEBXX', 'cmp.vip.wnd'); // Scripts/mod/payment/cmp/cmp.vip.wnd.js "use strict"; /****************************************************************** * * VIP界面 * ******************************************************************/ var FxTogs = require("nx.fx.togs"); var BridgeWindow = require("bridge.window"); var PageType = cc.Enum({ Charge: 0, // 充值 Vip: 1, // VIP DailyGift: 2, // 日常礼包 Privilege: 3 // 特权商店 }); cc.Class({ "extends": BridgeWindow, properties: { togMenu: { "default": null, type: FxTogs }, rootBanners: { "default": null, type: cc.Node }, rootPages: { "default": null, type: cc.Node } }, onLoad: function onLoad() { // Tog监听 this.togMenu.posTog = this.onTogMenu.bind(this); this.togMenu.togTo(0); this.activeMenu(0); }, onDestroy: function onDestroy() {}, // 重载:关闭前 onPreClosed: function onPreClosed() {}, onOpenConfigs: function onOpenConfigs(params) { this.index = params.index; this.sub_type = params.sub_type; }, // 激活菜单 activeMenu: function activeMenu(_pt) { if (this.curPT == _pt) { return; } this.curPT = _pt; // 条幅切换 nx.gui.setActive(this.rootBanners, "vip", _pt == PageType.Vip || _pt == PageType.Charge); // 页面切换 nx.gui.setActive(this.rootPages, "charge", _pt == PageType.Charge); }, // 背包切换 onTogMenu: function onTogMenu(_index) { this.activeMenu(parseInt(_index)); } }); cc._RF.pop();