724
parent
5f2383f886
commit
60d6bf9ccc
|
|
@ -104,6 +104,7 @@ function R.send(self,cmd, data, callback)
|
||||||
if data then
|
if data then
|
||||||
str = json.encode(data)
|
str = json.encode(data)
|
||||||
end
|
end
|
||||||
|
print("cmd:"..cmd.."str"..str)
|
||||||
self.c__netClient:Send(cmd,str,callback)
|
self.c__netClient:Send(cmd,str,callback)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ function M:connect(host,groupId,callback)
|
||||||
self._mgr_client:destroy()
|
self._mgr_client:destroy()
|
||||||
self._mgr_client = nil
|
self._mgr_client = nil
|
||||||
end
|
end
|
||||||
--print("666666666666666666666666666 ",host)
|
print("666666666666666666666666666 ",host)
|
||||||
local _mgr_client = NetClient.new(self.host, "mgr_group")
|
local _mgr_client = NetClient.new(self.host, "mgr_group")
|
||||||
self._mgr_client = _mgr_client
|
self._mgr_client = _mgr_client
|
||||||
_mgr_client:connect()
|
_mgr_client:connect()
|
||||||
|
|
@ -148,6 +148,7 @@ function M:connect(host,groupId,callback)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
else
|
else
|
||||||
|
print("dddd error")
|
||||||
self.connecting = false
|
self.connecting = false
|
||||||
_mgr_client:destroy()
|
_mgr_client:destroy()
|
||||||
if callback then
|
if callback then
|
||||||
|
|
|
||||||
|
|
@ -1152,6 +1152,7 @@ function M:FG_EnterGroup(group_id, callback)
|
||||||
_data.id = group_id
|
_data.id = group_id
|
||||||
printlog("FG_EnterGroup===>>>", _data.id)
|
printlog("FG_EnterGroup===>>>", _data.id)
|
||||||
_client:send(Protocol.WEB_ENTER_GROUP, _data, function(res)
|
_client:send(Protocol.WEB_ENTER_GROUP, _data, function(res)
|
||||||
|
|
||||||
if res.ReturnCode == 0 then
|
if res.ReturnCode == 0 then
|
||||||
-- 获取玩法列表
|
-- 获取玩法列表
|
||||||
local group = DataManager.groups:get(group_id)
|
local group = DataManager.groups:get(group_id)
|
||||||
|
|
@ -1161,6 +1162,7 @@ function M:FG_EnterGroup(group_id, callback)
|
||||||
|
|
||||||
self.mgr_ctr = ControllerManager.GetController(GroupMgrController)
|
self.mgr_ctr = ControllerManager.GetController(GroupMgrController)
|
||||||
self.mgr_ctr:connect(res.Data.host, group_id, function(res1)
|
self.mgr_ctr:connect(res.Data.host, group_id, function(res1)
|
||||||
|
pt(res1)
|
||||||
if res1.ReturnCode == 0 then
|
if res1.ReturnCode == 0 then
|
||||||
callback(res)
|
callback(res)
|
||||||
else
|
else
|
||||||
|
|
@ -1168,6 +1170,7 @@ function M:FG_EnterGroup(group_id, callback)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
else
|
else
|
||||||
|
Application.Quit()
|
||||||
callback(res)
|
callback(res)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
|
|
@ -173,8 +173,9 @@ function M:InitView(url)
|
||||||
if code == 0 then
|
if code == 0 then
|
||||||
self.groupMainView._view.visible = true
|
self.groupMainView._view.visible = true
|
||||||
else
|
else
|
||||||
ViewUtil.ErrorTip(-1, "code!" + code)
|
Application.Quit()
|
||||||
-- Application.Quit()
|
-- ViewUtil.ErrorTip(-1, "code!" + code)
|
||||||
|
|
||||||
printlog("获取圈子数据失败=======>>>>")
|
printlog("获取圈子数据失败=======>>>>")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue