58 lines
1.4 KiB
JavaScript
58 lines
1.4 KiB
JavaScript
|
|
"use strict";
|
||
|
|
cc._RF.push(module, '2125fn/I8hB+5Kjnsim4vbD', 'cmp.act.summon.limit.score.wnd');
|
||
|
|
// Scripts/mod/acts/summonLimit/cmp/cmp.act.summon.limit.score.wnd.js
|
||
|
|
|
||
|
|
"use strict";
|
||
|
|
|
||
|
|
/******************************************************************
|
||
|
|
*
|
||
|
|
* 奖励界面
|
||
|
|
*
|
||
|
|
******************************************************************/
|
||
|
|
|
||
|
|
var FxSVC = require("nx.fx.sv.expand");
|
||
|
|
var BridgeWindow = require("bridge.window");
|
||
|
|
var BridgeItemBinder = require("bridge.binder.item.icon.count");
|
||
|
|
cc.Class({
|
||
|
|
"extends": BridgeWindow,
|
||
|
|
properties: {
|
||
|
|
nodTitle: {
|
||
|
|
"default": null,
|
||
|
|
type: cc.Node
|
||
|
|
},
|
||
|
|
nodScore: {
|
||
|
|
"default": null,
|
||
|
|
type: BridgeItemBinder
|
||
|
|
},
|
||
|
|
lstItems: {
|
||
|
|
"default": null,
|
||
|
|
type: FxSVC
|
||
|
|
}
|
||
|
|
},
|
||
|
|
// 重载:参数打开
|
||
|
|
onOpenConfigs: function onOpenConfigs(_params) {
|
||
|
|
if (nx.dt.objEmpty(_params) || !_params.mod) {
|
||
|
|
this.delayClose();
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
this.mod = _params.mod;
|
||
|
|
this.data = _params.data;
|
||
|
|
this.nodScore.setID(this.data.need_id);
|
||
|
|
nx.gui.setString(this.nodTitle, "", nx.text.getKey(this.data.exchange_name));
|
||
|
|
this.lstItems.rebuild(this.data.exchange_list);
|
||
|
|
},
|
||
|
|
// 选中切换
|
||
|
|
onFocusChanged: function onFocusChanged(_item) {
|
||
|
|
var data = _item ? _item.mdata : null;
|
||
|
|
if (!data || !this.mod) {
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
this.mod.reqScoreBuy(data.aim, 1, function (_ret, _data) {
|
||
|
|
if (_ret) {
|
||
|
|
_item.setData(_data);
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
cc._RF.pop();
|