up
This commit is contained in:
@@ -440,7 +440,7 @@ function procOffLine()
|
||||
return
|
||||
end
|
||||
|
||||
-- CLAlert.add(LGet("MsgOffline"), Color.yellow, 1)
|
||||
-- CLAlert.add(LGet("MsgOffline"), Color.white, 1)
|
||||
printe(LGet("MsgOffline"))
|
||||
InvokeEx.cancelInvoke() -- 放在前面,后面马上就要用到invoke
|
||||
local ok, result = pcall(doReleaseAllRes)
|
||||
@@ -476,9 +476,9 @@ function doReleaseAllRes()
|
||||
CLLNet.stop()
|
||||
end
|
||||
|
||||
if Net.self.netGameDataQueue then
|
||||
Net.self.netGameDataQueue:Clear()
|
||||
end
|
||||
-- if Net.self and Net.self.netGameDataQueue then
|
||||
-- Net.self.netGameDataQueue:Clear()
|
||||
-- end
|
||||
|
||||
-- 页面处理
|
||||
CLPanelManager.hideAllPanel()
|
||||
@@ -512,7 +512,7 @@ function doSomethingBeforeRestart()
|
||||
if not ok then
|
||||
printe(result)
|
||||
end
|
||||
Net.self:clean()
|
||||
-- Net.self:clean()
|
||||
---@type Coolape.CLBaseLua
|
||||
local worldmap = getCC(MyMain.self.transform, "worldmap", "CLBaseLua")
|
||||
worldmap:destoryLua()
|
||||
|
||||
@@ -41,6 +41,7 @@ MyUtl.callCust = function(cust)
|
||||
end
|
||||
cust.jsonStr = cust.jsonStr or {}
|
||||
local phones = ArrayList()
|
||||
local phonesVal = ArrayList()
|
||||
|
||||
local taskId = tostring(cust.taskId)
|
||||
local fields = DBCust.getFieldsByTask(taskId)
|
||||
@@ -48,15 +49,17 @@ MyUtl.callCust = function(cust)
|
||||
if attr.attrType == DBCust.FieldType.phone then
|
||||
local phNo = cust.jsonStr[joinStr(attr.id, "_", attr.attrName)]
|
||||
if not isNilOrEmpty(phNo) then
|
||||
phones:Add(joinStr(attr.attrName,": ", phNo))
|
||||
phones:Add(joinStr(attr.attrName, ": ", phNo))
|
||||
phonesVal:Add(phNo)
|
||||
end
|
||||
end
|
||||
end
|
||||
if phones.Count > 0 then
|
||||
phones:Insert(0, joinStr("默认: ",cust.phoneNo))
|
||||
phones:Insert(0, joinStr("默认: ", cust.phoneNo))
|
||||
phonesVal:Insert(0, cust.phoneNo)
|
||||
CLUIPopListPanel.show(
|
||||
phones,
|
||||
phones,
|
||||
phonesVal,
|
||||
function(val, selectedItem)
|
||||
if val then
|
||||
MyUtl.doCall(cust.custId, val)
|
||||
@@ -83,4 +86,18 @@ MyUtl.doCall = function(custId, phoneNo)
|
||||
)
|
||||
end
|
||||
|
||||
MyUtl.toast = function(msg, staySec)
|
||||
CLToastRoot.toast(msg, CLToastRoot.Type.normal, staySec)
|
||||
end
|
||||
MyUtl.toastS = function(msg, staySec)
|
||||
CLToastRoot.toast(msg, CLToastRoot.Type.success, staySec)
|
||||
end
|
||||
MyUtl.toastW = function(msg, staySec)
|
||||
CLToastRoot.toast(msg, CLToastRoot.Type.warning, staySec)
|
||||
end
|
||||
|
||||
MyUtl.toastE = function(msg, staySec)
|
||||
CLToastRoot.toast(msg, CLToastRoot.Type.error, staySec)
|
||||
end
|
||||
|
||||
return MyUtl
|
||||
|
||||
Reference in New Issue
Block a user