// --------------------------------------------------------------------
// @author: xxx@syg.com(必填, 创建模块的人员)
// @description:
// 这里填写详细说明,主要填写该模块的功能简要
//
Create: 2019-04-16 15:45:17
// --------------------------------------------------------------------
var PromptEvent = require("prompt_event")
var PromptModel = cc.Class({
extends: BaseClass,
ctor: function () {
},
properties: {
},
initConfig: function () {
this.prompt_list = [];
this.auto_id = 0;
},
addPromptData(data){
let config = Config.notice_data.data_get[data.type]
if(config == null){
cc.log("==============> 添加小图标失败, 未配置该小图标数据, 类型为 ", data.type)
return
}
let prompt_vo = null
let obj = this.getSridByData(data)
let cur_rid = obj.rid
let cur_srv_id = obj.srv_id
if(this.checkIsInList(data.type, cur_rid, cur_srv_id) == true) return;
this.auto_id = this.auto_id + 1
let PromptVo = require("prompt_vo")
if(config.can_overly == 1){
prompt_vo = this.getPromptVoByType(data.type)
if(prompt_vo == null){
prompt_vo = new PromptVo(data.type, this.auto_id)
this.prompt_list.push(prompt_vo)
}
prompt_vo.update(data)
}else{
prompt_vo = new PromptVo(data.type, this.auto_id)
prompt_vo.update(data)
this.prompt_list.push(prompt_vo)
}
gcore.GlobalEvent.fire(PromptEvent.ADD_PROMPT_DATA, prompt_vo);
},
getPromptVoByType(type){
for(let i=0;i 0){
for(let i=0;i 0){
for(let i=0;i 0){
for(let i=0;i 0){
for(let i=0;i 0){
for(let i=0;i