"use strict"; cc._RF.push(module, 'c3bdbdWeDpDT7+G9/NVWohJ', 'cmp.partner.reform.equips.compound.preview.wnd'); // Scripts/mod/partner/cmps/reform/cmp/cmp.partner.reform.equips.compound.preview.wnd.js "use strict"; /****************************************************************** * * 装备合成预览 * ******************************************************************/ var BridgeWindow = require("bridge.window"); var FxSVC = require("nx.fx.sv.expand"); cc.Class({ "extends": BridgeWindow, properties: { labTip: { "default": null, type: cc.RichText }, svcList: { "default": null, type: FxSVC } }, // 重载:参数打开 onOpenConfigs: function onOpenConfigs(_params) { // 参数判定 this.params = _params.data; this.cb = _params.cb; // 重建 this.rebuild(); }, // 重载:关闭前 onPreClosed: function onPreClosed() { this.svcList.rebuild([]); }, // 重建 rebuild: function rebuild() { // 花费(金币) var cfgs = Utils.getItemConfig(1); var icon = PathTool.queryIconPath(cfgs.icon); var txt = nx.text.format("lab_equipment_all_synthesis_window_tip1", cfgs.icon, nx.dt.shortCount(this.params.coin)); this.labTip.string = txt; // 获得列表 this.svcList.rebuild(this.params.list); }, // 点击确认 onTouchConfirm: function onTouchConfirm() { nx.dt.fnInvoke(this.cb, true); } }); cc._RF.pop();