Files
fc/dev/project/library/imports/37/37ce0293-cdf1-475b-9e65-dc6b922f015f.js
T
2026-05-24 10:21:26 +08:00

47 lines
1.1 KiB
JavaScript

"use strict";
cc._RF.push(module, '37ce0KTzfFHW55l3GuSLwFf', 'once.rewards.wnd');
// Scripts/mod/once/once.rewards.wnd.js
"use strict";
/******************************************************************
*
* 个人推送界面
*
******************************************************************/
var BridgeWindow = require("bridge.window");
var FxSVC = require("nx.fx.sv.expand");
var OnceMod = require("once.rewards.mod");
cc.Class({
"extends": BridgeWindow,
properties: {
lstRewards: {
"default": null,
type: FxSVC
}
},
// 展示
onEnable: function onEnable() {
// 道具列表
var items = nx.bridge.vget("OnceRewards");
this.lstRewards.rebuild(items);
var empty = nx.dt.arrEmpty(items);
nx.gui.setActive(this, "panel/get", !empty);
nx.gui.setActive(this, "panel/off", empty);
},
// 销毁
onDisable: function onDisable() {
// 视图监听解除
nx.bridge.vunbind(this);
},
// 點擊領取
onTouchReward: function onTouchReward() {
var _this = this;
OnceMod.getInstance().reqReward(function (_ret) {
_this.close();
});
}
});
cc._RF.pop();