This commit is contained in:
2020-08-06 22:56:33 +08:00
parent d8127ddae2
commit 113faa50ce
50 changed files with 1480 additions and 855 deletions

View File

@@ -13,7 +13,6 @@ local port = 29004
local baseUrl = joinStr("http://", host, ":", port, "/open_api/")
local socketUrl = joinStr("ws://", host, ":", port, "/tr_socket/websocket/")
NetProto.setSever = function(_host, _port)
host = _host
port = _port
@@ -84,12 +83,15 @@ local dispatch = function(content, params)
for k, p in pairs(PanelListener) do
ListenerQueue:enQueue(p)
end
---@type Coolape.CLPanelLua
local p
while (ListenerQueue:size() > 0) do
---@type coolape.Coolape.CLPanelBase
p = ListenerQueue:deQueue()
if p then
if p and (not p:IsNull()) and p.gameObject.activeInHierarchy then
p:procNetwork(cmd, code, msg, map)
else
NetProto.removePanelListener(p)
end
end
end
@@ -212,14 +214,14 @@ end
---@param p Coolape.CLPanelBase
function NetProto.addPanelListener(p)
if p then
PanelListener[p] = p
PanelListener[p.name] = p
end
end
---@param p Coolape.CLPanelBase
function NetProto.removePanelListener(p)
if p then
PanelListener[p] = nil
PanelListener[p.name] = nil
end
end
@@ -300,7 +302,7 @@ NetProto.cmds = {
updateUserInfo = "updateUserInfo", -- 更新用户信息
updateUserPhone = "updateUserPhone", -- 更新用户手机号
get_customerById = "get_customerById", -- 取得客户
readNotice = "readNotice", -- 已读公告
readNotice = "readNotice" -- 已读公告
}
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
@@ -616,7 +618,7 @@ NetProto.send.selectProductInfo = function(searchKey, page, callback, timeOutSec
NetProto.sendSocket(content, callback, timeOutSec)
end
NetProto.send.createWfInfo = function(workFlowInfo, callback, timeOutSec)
NetProto.send.createWfInfo = function(workFlowInfo, wfOptions, callback, timeOutSec)
local content = {}
content.action = NetProto.cmds.createWfInfo
local user = DBUser.getUserById(NetProto.loginNo)
@@ -625,6 +627,7 @@ NetProto.send.createWfInfo = function(workFlowInfo, callback, timeOutSec)
content.loginNo = NetProto.loginNo
content.groupId = NetProto.groupId
content.workFlowInfo = workFlowInfo
content.wfOptions = wfOptions
NetProto.sendSocket(content, callback, timeOutSec)
end