61 lines
1.4 KiB
JavaScript
61 lines
1.4 KiB
JavaScript
|
|
"use strict";
|
||
|
|
cc._RF.push(module, 'b13ebIhHJRDZJXhvUHN+Zv1', 'cmp.guild.active.detail.item');
|
||
|
|
// Scripts/mod/guild/active/cmps/cmp.guild.active.detail.item.js
|
||
|
|
|
||
|
|
"use strict";
|
||
|
|
|
||
|
|
/******************************************************************
|
||
|
|
*
|
||
|
|
* 联盟活跃奖励详情项
|
||
|
|
*
|
||
|
|
******************************************************************/
|
||
|
|
|
||
|
|
var SVCItem = require("nx.fx.sv.expand.item");
|
||
|
|
var ItemLayout = require("cmp.item.layout");
|
||
|
|
cc.Class({
|
||
|
|
"extends": SVCItem,
|
||
|
|
properties: {
|
||
|
|
nodLevel: {
|
||
|
|
"default": null,
|
||
|
|
type: cc.Node
|
||
|
|
},
|
||
|
|
nodExp: {
|
||
|
|
"default": null,
|
||
|
|
type: cc.Node
|
||
|
|
},
|
||
|
|
nodAttrs: {
|
||
|
|
"default": null,
|
||
|
|
type: cc.Node
|
||
|
|
},
|
||
|
|
nodRewards: {
|
||
|
|
"default": null,
|
||
|
|
type: ItemLayout
|
||
|
|
}
|
||
|
|
},
|
||
|
|
// 数据重置
|
||
|
|
rebind: function rebind(_idx, _data, _key) {
|
||
|
|
this._super(_idx, _data, _key);
|
||
|
|
if (nx.dt.objEmpty(_data)) {
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
this.freshBase();
|
||
|
|
},
|
||
|
|
// 更新
|
||
|
|
freshBase: function freshBase() {
|
||
|
|
// 等级
|
||
|
|
var lv = nx.text.format("LvNumber", this.mdata.lev);
|
||
|
|
nx.gui.setString(this.nodLevel, "", lv);
|
||
|
|
|
||
|
|
// 经验
|
||
|
|
nx.gui.setString(this.nodExp, "", this.mdata.exp);
|
||
|
|
|
||
|
|
// 奖励
|
||
|
|
this.nodRewards.rebuild(this.mdata.items);
|
||
|
|
|
||
|
|
// 加成
|
||
|
|
nx.bridge.attrs.setAttribute(nx.gui.find(this.nodAttrs, "p1"), this.mdata.attr[0]);
|
||
|
|
nx.bridge.attrs.setAttribute(nx.gui.find(this.nodAttrs, "p2"), this.mdata.attr[1]);
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
cc._RF.pop();
|