Files
fc/dev/project/library/imports/19/19939573-1db8-4ac3-be70-608f3c9b0d46.js
T
2026-05-24 10:21:26 +08:00

59 lines
1.6 KiB
JavaScript

"use strict";
cc._RF.push(module, '19939VzHbhKw75wYI88mw1G', 'cmp.friend.list');
// Scripts/mod/friend/cmp/cmp.friend.list.js
"use strict";
var FriendController = require("friend_controller");
cc.Class({
"extends": cc.Component,
properties: {
btn_del_label: {
"default": null,
type: cc.Label
}
},
// LIFE-CYCLE CALLBACKS:
// onLoad () {},
start: function start() {},
onEnable: function onEnable() {},
onDisable: function onDisable() {},
touchDel: function touchDel() {},
touchSend: function touchSend() {
var count = FriendController.getInstance().getModel().getFriendPresentCount() || 10;
var list = [];
var vo = null;
var index = 1;
var arr_list = FriendController.getInstance().getModel().getArray() || [];
for (var i in arr_list) {
var vo = arr_list[i];
if (vo && vo.is_present == 0) {
var obj = {};
obj.rid = vo.rid;
obj.srv_id = vo.srv_id;
obj.is_present = vo.is_present;
obj.is_draw = vo.is_draw;
list.push(obj);
index = index + 1;
}
if (index >= count) break;
}
FriendController.getInstance().sender_13317(0, list);
},
touchAdd: function touchAdd() {},
touchGet: function touchGet() {
var list = [];
var array = FriendController.getInstance().getModel().getArray();
for (var i = 0; i < array.length; i++) {
var vo = array[i];
if (vo && vo.is_draw == 1) list.push({
rid: vo.rid,
srv_id: vo.srv_id
});
}
FriendController.getInstance().sender_13317(1, list);
nx.mTip.openTip("bar.friend.rev", false);
} // update (dt) {},
});
cc._RF.pop();