This commit is contained in:
2021-04-02 07:25:30 +08:00
parent bf55cc7e54
commit 5a43e0d172
20 changed files with 1627 additions and 1107 deletions

View File

@@ -97,6 +97,9 @@ DBMessage.onGetMessage = function(type, list, meta)
---@param v _DBMessage
for i, v in ipairs(list) do
v.NOTICETYPE = type
if v.NOTICETYPE == DBMessage.MsgType.Timeout then
v.READFLAG = v.remindingFlag == "Y" and 1 or 0
end
table.insert(db.list[type], v) -- 倒序
end
-- //TODO:保存到本地
@@ -161,7 +164,7 @@ function DBMessage.getUnreadNum(type)
local list = DBMessage.getMessages(DBMessage.MsgType.Timeout)
---@param v
for i, v in ipairs(list) do
if v.ReadFlag == DBMessage.ReadFlag.unread then
if v.READFLAG == DBMessage.ReadFlag.unread then
count = count + 1
end
end

View File

@@ -306,6 +306,7 @@ NetProto.cmds = {
updateUserPhone = "updateUserPhone", -- 更新用户手机号
get_customerById = "get_customerById", -- 取得客户
readNotice = "readNotice", -- 已读公告
wforder_cancel_reminder = "wforder_cancel_reminder", -- 已读到期提醒
authorizedPhone = "authorizedPhone", -- 认证手机号
preUpdatePho = "preUpdatePho", -- 绑定号码之前验证
}
@@ -759,6 +760,14 @@ NetProto.send.readNotice = function(id, callback, timeOutSec)
NetProto.sendSocket(content, callback, timeOutSec)
end
NetProto.send.wforder_cancel_reminder = function(id, callback, timeOutSec)
local content = {}
content.action = NetProto.cmds.readNotice
content.orderId = id
content.groupId = NetProto.groupId
NetProto.sendSocket(content, callback, timeOutSec)
end
NetProto.send.authorizedPhone = function(data, callback, timeOutSec)
local content = {}
content.action = NetProto.cmds.authorizedPhone
@@ -775,5 +784,7 @@ NetProto.send.preUpdatePho = function(phoneNo, callback, timeOutSec)
content.groupId = NetProto.groupId
NetProto.sendSocket(content, callback, timeOutSec)
end
------------------------------------------------------
return NetProto

View File

@@ -109,6 +109,17 @@ function TRPSysMsgList:onClickCell(cell, data)
elseif data.NOTICETYPE == DBMessage.MsgType.Task4Cust then
getPanelAsy("PanelCustListProc", onLoadedPanelTT, data)
elseif data.NOTICETYPE == DBMessage.MsgType.Timeout then
-- 通知已读了
NetProto.send.wforder_cancel_reminder(
data.orderId,
function(content)
if content.success then
data.READFLAG = DBMessage.ReadFlag.readed
data.remindingFlag = "Y"
self.uiobjs.LoopTable:refreshContentOnly()
end
end
)
getPanelAsy("PanelSysMsgDetail", onLoadedPanelTT, data)
else
printw("没有处理该消息类型", data.NOTICETYPE)