进圈协议加密
parent
cc5145bf59
commit
56415dd168
|
|
@ -164,6 +164,7 @@ end
|
||||||
function M:QuickLogin(session_id, callback)
|
function M:QuickLogin(session_id, callback)
|
||||||
local _data = {}
|
local _data = {}
|
||||||
_data.data = RSAHelper.Encrypt(json.encode({
|
_data.data = RSAHelper.Encrypt(json.encode({
|
||||||
|
quick = 1,
|
||||||
deviceCode = UnityEngine.SystemInfo.deviceUniqueIdentifier
|
deviceCode = UnityEngine.SystemInfo.deviceUniqueIdentifier
|
||||||
}))
|
}))
|
||||||
local _client = ControllerManager.WebClient
|
local _client = ControllerManager.WebClient
|
||||||
|
|
|
||||||
|
|
@ -1146,7 +1146,42 @@ function M:FG_GroupSetVip(group_id, member_id, isvip, callback)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--信息包加密进入圈子
|
||||||
function M:FG_EnterGroup(group_id, callback)
|
function M:FG_EnterGroup(group_id, callback)
|
||||||
|
local _client = ControllerManager.GroupClient
|
||||||
|
local _data = {}
|
||||||
|
_data.id = group_id
|
||||||
|
_data.data = RSAHelper.Encrypt(json.encode({
|
||||||
|
id = group_id,
|
||||||
|
deviceCode = UnityEngine.SystemInfo.deviceUniqueIdentifier
|
||||||
|
}))
|
||||||
|
printlog("FG_EnterGroup===>>>", _data.id)
|
||||||
|
_client:send(Protocol.WEB_ENTER_GROUP_2, _data, function(res)
|
||||||
|
if res.ReturnCode == 0 then
|
||||||
|
-- 获取玩法列表
|
||||||
|
local group = DataManager.groups:get(group_id)
|
||||||
|
group:clear()
|
||||||
|
group.notice = res.Data.notice
|
||||||
|
group.hide_action = res.Data.hide_action
|
||||||
|
|
||||||
|
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
|
||||||
|
callback(res1)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
else
|
||||||
|
Application.Quit()
|
||||||
|
callback(res)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
--正常进入圈子
|
||||||
|
function M:FG_EnterGroup2(group_id, callback)
|
||||||
local _client = ControllerManager.GroupClient
|
local _client = ControllerManager.GroupClient
|
||||||
local _data = {}
|
local _data = {}
|
||||||
_data.id = group_id
|
_data.id = group_id
|
||||||
|
|
|
||||||
|
|
@ -183,6 +183,8 @@ Protocol = {
|
||||||
WEB_FG_BAN_PLAY = "group/ban_play",
|
WEB_FG_BAN_PLAY = "group/ban_play",
|
||||||
-- 进入圈子
|
-- 进入圈子
|
||||||
WEB_ENTER_GROUP = "group/enter_group",
|
WEB_ENTER_GROUP = "group/enter_group",
|
||||||
|
-- 进入圈子,信息包加密
|
||||||
|
WEB_ENTER_GROUP_2 = "group/enter_group_3",
|
||||||
-- 获取上级合伙人
|
-- 获取上级合伙人
|
||||||
WEB_GET_SUPERIOR_PARTNERS = "group/get_member_parents",
|
WEB_GET_SUPERIOR_PARTNERS = "group/get_member_parents",
|
||||||
--获取积分转移限制
|
--获取积分转移限制
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,15 @@ function M:Retrieve()
|
||||||
ViewUtil.CloseModalWait()
|
ViewUtil.CloseModalWait()
|
||||||
if res.ReturnCode == 0 then
|
if res.ReturnCode == 0 then
|
||||||
PlayerPrefs.DeleteKey('session_id')
|
PlayerPrefs.DeleteKey('session_id')
|
||||||
Application.Quit()
|
ViewUtil.CloseModalWait()
|
||||||
|
local _curren_msg = MsgWindow.new(self._root_view, "您的账号已经切换,请重新登录", MsgWindow.MsgMode.OnlyOk, nil, nil,
|
||||||
|
{ closeZone = true })
|
||||||
|
_curren_msg.onOk:Add(
|
||||||
|
function()
|
||||||
|
Application.Quit()
|
||||||
|
end
|
||||||
|
)
|
||||||
|
_curren_msg:Show()
|
||||||
else
|
else
|
||||||
ViewUtil.ErrorTip(res.ReturnCode, "找回账号失败,请联系客服人员")
|
ViewUtil.ErrorTip(res.ReturnCode, "找回账号失败,请联系客服人员")
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue