Files
fc/dev/project/library/imports/2e/2e4406d8-4aae-4f82-92b1-1250db9d619a.js
T
2026-05-24 10:21:26 +08:00

60 lines
1.4 KiB
JavaScript

"use strict";
cc._RF.push(module, '2e440bYSq5PgpKxElDbnWGa', 'cmp.summon.infinite.record');
// Scripts/mod/summon/infinite/cmp.summon.infinite.record.js
"use strict";
/******************************************************************
*
* 无限十连抽记录
*
******************************************************************/
var BridgeWindow = require("bridge.window");
var FxSVC = require("nx.fx.sv.expand");
cc.Class({
"extends": BridgeWindow,
properties: {
svcList: {
"default": null,
type: FxSVC
}
},
// 重载:参数打开
onOpenConfigs: function onOpenConfigs(_params) {
// 替换模式
this.replace = _params ? _params.replace : false;
// 视图监听
this.vbind([["INFRecords", this.onRecordFreshed.bind(this)]]);
},
// 记录刷新
onRecordFreshed: function onRecordFreshed(_records) {
this.records = [{
slot: 1,
record: null,
replace: this.replace
}, {
slot: 2,
record: null,
replace: this.replace
}, {
slot: 3,
record: null,
replace: this.replace
}];
var temp = _records || [];
for (var i = 0; i < temp.length; ++i) {
var rec = temp[i];
for (var k = 0; k < this.records.length; ++k) {
if (this.records[k].slot == rec.id) {
this.records[k].record = rec;
break;
}
}
}
this.svcList.rebuild(this.records);
}
});
cc._RF.pop();