upgrade
This commit is contained in:
@@ -44,7 +44,8 @@ DBMessage.MsgType = {
|
||||
SysNotice = 3, -- 系统通知
|
||||
Task = 4,
|
||||
Task4Cust = 5, -- 跟进客户
|
||||
Task4Support = 6 -- 代办补货
|
||||
Task4Support = 6, -- 代办补货
|
||||
Timeout = 7 -- 到期提醒
|
||||
}
|
||||
|
||||
DBMessage.ReadFlag = {
|
||||
@@ -95,6 +96,7 @@ DBMessage.onGetMessage = function(type, list, meta)
|
||||
end
|
||||
---@param v _DBMessage
|
||||
for i, v in ipairs(list) do
|
||||
v.NOTICETYPE = type
|
||||
table.insert(db.list[type], v) -- 倒序
|
||||
end
|
||||
-- //TODO:保存到本地
|
||||
@@ -155,6 +157,14 @@ function DBMessage.getUnreadNum(type)
|
||||
count = count + 1
|
||||
end
|
||||
end
|
||||
elseif type == DBMessage.MsgType.Timeout then
|
||||
local list = DBMessage.getMessages(DBMessage.MsgType.Timeout)
|
||||
---@param v
|
||||
for i, v in ipairs(list) do
|
||||
if v.ReadFlag == DBMessage.ReadFlag.unread then
|
||||
count = count + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return count
|
||||
|
||||
Reference in New Issue
Block a user