调试抚州
parent
98e5a0d49a
commit
7585f902c4
|
|
@ -18,6 +18,7 @@ local _LocalConfigAllGame = {
|
|||
}
|
||||
|
||||
local FilterGame = function(games)
|
||||
pt(games)
|
||||
local tempGames = {}
|
||||
for k, v in pairs(games) do
|
||||
v.bundle = v.bundle:gsub("\r\n", "")
|
||||
|
|
@ -72,67 +73,7 @@ local function __Login(cmd, _data, callBack)
|
|||
end)
|
||||
end
|
||||
|
||||
local function __LoginNew(cmd, _data, callBack)
|
||||
local _client = ControllerManager.WebClient
|
||||
_client:send(cmd, _data, function(res)
|
||||
printlog("1111111111111111222222222222")
|
||||
-- pt(cmd)
|
||||
-- pt(res)
|
||||
|
||||
if (res.Data.type == 0) then
|
||||
local data = res.Data
|
||||
print(data.userData)
|
||||
local userInfo = stringToTAble(data.userData)
|
||||
printlog("===========================loginuserqian=======================")
|
||||
for k, v in pairs(userInfo) do
|
||||
printlog(k)
|
||||
printlog(v)
|
||||
end
|
||||
printlog("===========================loginuserqian=======================")
|
||||
local user = DataManager.SelfUser
|
||||
user.acc = userInfo.acc
|
||||
user.account_id = userInfo.id
|
||||
user.diamo = userInfo.diamo
|
||||
user.nick_name = userInfo.nick
|
||||
user.sex = userInfo.sex
|
||||
user.head_url = userInfo.portrait
|
||||
user.room_id = userInfo.roomid
|
||||
user.group_id = userInfo.groupId
|
||||
user.type = userInfo.type
|
||||
user.agent = userInfo.mng
|
||||
|
||||
user.real_info = userInfo.real_info
|
||||
user.phone = userInfo.phone
|
||||
user.address = userInfo.address
|
||||
printlog("===========================loginuser=======================")
|
||||
printlog(user.acc)
|
||||
for k, v in pairs(user) do
|
||||
printlog(k)
|
||||
printlog(v)
|
||||
end
|
||||
printlog("===========================loginuser=======================")
|
||||
user.games = FilterGame(data.games)
|
||||
|
||||
|
||||
|
||||
if Application.platform == RuntimePlatform.WindowsPlayer or Application.platform == RuntimePlatform.WindowsEditor then
|
||||
--GameApplication.Instance.printLog = true
|
||||
else
|
||||
--GameApplication.Instance.printLog = user.type == 2
|
||||
end
|
||||
|
||||
_client:setSession(data.session_id .. "," .. data.token)
|
||||
printlog("11111111111111111111111111111111")
|
||||
pt(data)
|
||||
ControllerManager.GroupClient = NetClient.new(data.groupWeb, "web_group", ConnectionProtocol.Web)
|
||||
ControllerManager.GroupClient:setSession((data["session_id"] .. "," .. data["token"]))
|
||||
end
|
||||
|
||||
if (callBack ~= nil) then
|
||||
callBack(res)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
--手机登录
|
||||
function M:GetPhoneCode(phone, callback)
|
||||
|
|
@ -151,7 +92,7 @@ function M:PhoneLogin(phone, code, callback)
|
|||
local _data = {}
|
||||
_data["phone"] = phone
|
||||
_data["code"] = code
|
||||
__LoginNew(Protocol.WEB_PHONE_LOGIN, _data, callback)
|
||||
__Login(Protocol.WEB_PHONE_LOGIN, _data, callback)
|
||||
end
|
||||
|
||||
--手机密码登录
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ local _isUpdate = false
|
|||
local _isInit = false
|
||||
|
||||
local function __new_config(data)
|
||||
local ec = reimport(data.bundle ..".ExtendConfig")
|
||||
local ec = reimport(data.bundle .. ".ExtendConfig")
|
||||
--print("初始化ExtendManager===>>>"..data.bundle)
|
||||
--pt(data)
|
||||
local config = ec.new()
|
||||
|
|
@ -25,7 +25,7 @@ function ExtendManager.Init(game_list)
|
|||
print("==========================================================ExtendManager")
|
||||
pt(game_list)
|
||||
if _isInit then return end
|
||||
for i=1,#game_list do
|
||||
for i = 1, #game_list do
|
||||
local game = game_list[i]
|
||||
__new_config(game)
|
||||
end
|
||||
|
|
@ -35,6 +35,7 @@ end
|
|||
|
||||
-- 更新扩展玩法到最新数据
|
||||
function ExtendManager.UpdateExtend(data)
|
||||
print("==========================================xtendManager.UpdateExtend")
|
||||
if not data then return end
|
||||
local tem = _extendMap[data.game_id]
|
||||
if tem and (not GameApplication.Instance.buildApp) then
|
||||
|
|
|
|||
|
|
@ -348,6 +348,7 @@ function M:UpdateFamilyRoom(fgCtr, id)
|
|||
else
|
||||
local newIndex = index - #roomList + 1
|
||||
local config = ExtendManager.GetExtendConfig(playList[newIndex].gameId)
|
||||
print("=======================================layList[newIndex].gameId", playList[newIndex].gameId)
|
||||
local mode = config:GetGameInfo()
|
||||
local gamePlay = mode:LoadConfigToDetail(playList[newIndex].config)
|
||||
obj:GetChild('Label_gameRule').title = gamePlay
|
||||
|
|
|
|||
|
|
@ -167,7 +167,6 @@ local function __login_response(self, response)
|
|||
__goto_lobby(response)
|
||||
end
|
||||
|
||||
|
||||
if user.update ~= 0 then
|
||||
ExtendHotupdate.UpdateGameList(user.games, f_enterLobby)
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue