uu
This commit is contained in:
@@ -10,12 +10,30 @@ NetProto.send = {}
|
||||
---------------------------------------------------------------------------------------
|
||||
local host = "app.ttf-cti.com" -- "47.111.20.34"
|
||||
local port = 29004
|
||||
-- local host = "192.168.1.126"
|
||||
-- local port = 29000
|
||||
local baseUrl = joinStr("http://", host, ":", port, "/open_api/")
|
||||
-- local baseUrl = "http://47.111.20.34/home/open_api/"
|
||||
local socketUrl = joinStr("ws://", host, ":", port, "/tr_socket/websocket/")
|
||||
|
||||
NetProto.setSeverPublish = function()
|
||||
host = "app.ttf-cti.com"
|
||||
port = 29004
|
||||
baseUrl = joinStr("http://", host, ":", port, "/open_api/")
|
||||
socketUrl = joinStr("ws://", host, ":", port, "/tr_socket/websocket/")
|
||||
end
|
||||
|
||||
NetProto.setSeverDev = function()
|
||||
host = "app.ttf-cti.com"
|
||||
port = 29004
|
||||
baseUrl = joinStr("http://", host, ":", port, "/open_api/")
|
||||
socketUrl = joinStr("ws://", host, ":", port, "/tr_socket/websocket/")
|
||||
end
|
||||
|
||||
NetProto.setSeverLocal = function()
|
||||
host = "192.168.1.100"
|
||||
port = 29004
|
||||
baseUrl = joinStr("http://", host, ":", port, "/open_api/")
|
||||
socketUrl = joinStr("ws://", host, ":", port, "/tr_socket/websocket/")
|
||||
end
|
||||
|
||||
---@type Dist.SpringWebsocket.Client
|
||||
local socket = Client4Stomp.self
|
||||
local appid = 2020158
|
||||
@@ -199,10 +217,7 @@ NetProto.getTokenForAPI = function(appsecret, callback, failedCallback, orgs)
|
||||
end
|
||||
|
||||
NetProto.login = function(map, callback, failedCallback, orgs)
|
||||
-- local map = {
|
||||
-- phone = phone,
|
||||
-- password = password
|
||||
-- }
|
||||
map.model = SystemInfo.deviceModel
|
||||
NetProto.sendGet(NetProto.cmds.login, map, callback, failedCallback, orgs)
|
||||
end
|
||||
|
||||
@@ -243,7 +258,11 @@ NetProto.cmds = {
|
||||
createWfInfo = "createWfInfo", -- 创建订单
|
||||
create_followUp_task = "create_followUp_task", -- 创建跟进预约
|
||||
list_followUp_records = "list_followUp_records", -- 跟进记录
|
||||
workFlowQuery = "workFlowQuery" -- 工单列表
|
||||
workFlowQuery = "workFlowQuery", -- 工单列表
|
||||
backToGH = "backToGH", -- 返回公海
|
||||
delCustomerInfo = "delCustomerInfo", -- 删除客户
|
||||
loadProductType = "loadProductType", -- 产品类型
|
||||
pageGHQueryList = "pageGHQueryList", -- 公海列表
|
||||
}
|
||||
---------------------------------------------------------------------------------------
|
||||
---------------------------------------------------------------------------------------
|
||||
@@ -553,8 +572,9 @@ NetProto.send.selectProductInfo = function(searchKey, page, callback, timeOutSec
|
||||
content.action = NetProto.cmds.selectProductInfo
|
||||
content.loginNo = NetProto.loginNo
|
||||
content.groupId = NetProto.groupId
|
||||
-- content.flag = 0
|
||||
content.current_page = page
|
||||
content.search = searchKey
|
||||
content.keywords = searchKey
|
||||
NetProto.sendSocket(content, callback, timeOutSec)
|
||||
end
|
||||
|
||||
@@ -596,5 +616,38 @@ NetProto.send.workFlowQuery = function(filters, queryKey, page, callback, timeOu
|
||||
content.current_page = page
|
||||
NetProto.sendSocket(content, callback, timeOutSec)
|
||||
end
|
||||
|
||||
NetProto.send.backToGH = function(ids, callback, timeOutSec)
|
||||
local content = {}
|
||||
content.action = NetProto.cmds.backToGH
|
||||
content.groupId = NetProto.groupId
|
||||
content.ids = ids
|
||||
NetProto.sendSocket(content, callback, timeOutSec)
|
||||
end
|
||||
|
||||
NetProto.send.delCustomerInfo = function(ids, callback, timeOutSec)
|
||||
local content = {}
|
||||
content.action = NetProto.cmds.delCustomerInfo
|
||||
content.groupId = NetProto.groupId
|
||||
content.ids = ids
|
||||
NetProto.sendSocket(content, callback, timeOutSec)
|
||||
end
|
||||
|
||||
NetProto.send.loadProductType = function(callback, timeOutSec)
|
||||
local content = {}
|
||||
content.action = NetProto.cmds.loadProductType
|
||||
content.groupId = NetProto.groupId
|
||||
NetProto.sendSocket(content, callback, timeOutSec)
|
||||
end
|
||||
|
||||
NetProto.send.pageGHQueryList = function(filters, queryKey, page, callback, timeOutSec)
|
||||
local content = {}
|
||||
content.action = NetProto.cmds.pageGHQueryList
|
||||
content.groupId = NetProto.groupId
|
||||
content.filters = filters
|
||||
content.keywords = queryKey
|
||||
content.current_page = page
|
||||
NetProto.sendSocket(content, callback, timeOutSec)
|
||||
end
|
||||
------------------------------------------------------
|
||||
return NetProto
|
||||
|
||||
Reference in New Issue
Block a user