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