调试抚州
parent
98e5a0d49a
commit
7585f902c4
|
|
@ -18,6 +18,7 @@ local _LocalConfigAllGame = {
|
||||||
}
|
}
|
||||||
|
|
||||||
local FilterGame = function(games)
|
local FilterGame = function(games)
|
||||||
|
pt(games)
|
||||||
local tempGames = {}
|
local tempGames = {}
|
||||||
for k, v in pairs(games) do
|
for k, v in pairs(games) do
|
||||||
v.bundle = v.bundle:gsub("\r\n", "")
|
v.bundle = v.bundle:gsub("\r\n", "")
|
||||||
|
|
@ -72,67 +73,7 @@ local function __Login(cmd, _data, callBack)
|
||||||
end)
|
end)
|
||||||
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)
|
function M:GetPhoneCode(phone, callback)
|
||||||
|
|
@ -151,7 +92,7 @@ function M:PhoneLogin(phone, code, callback)
|
||||||
local _data = {}
|
local _data = {}
|
||||||
_data["phone"] = phone
|
_data["phone"] = phone
|
||||||
_data["code"] = code
|
_data["code"] = code
|
||||||
__LoginNew(Protocol.WEB_PHONE_LOGIN, _data, callback)
|
__Login(Protocol.WEB_PHONE_LOGIN, _data, callback)
|
||||||
end
|
end
|
||||||
|
|
||||||
--手机密码登录
|
--手机密码登录
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ require "Game.IGameInfo"
|
||||||
---
|
---
|
||||||
-- a net ExtendManager
|
-- a net ExtendManager
|
||||||
ExtendManager = {
|
ExtendManager = {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
local _extendMap = {}
|
local _extendMap = {}
|
||||||
|
|
@ -12,9 +12,9 @@ local _isUpdate = false
|
||||||
local _isInit = false
|
local _isInit = false
|
||||||
|
|
||||||
local function __new_config(data)
|
local function __new_config(data)
|
||||||
local ec = reimport(data.bundle ..".ExtendConfig")
|
local ec = reimport(data.bundle .. ".ExtendConfig")
|
||||||
--print("初始化ExtendManager===>>>"..data.bundle)
|
--print("初始化ExtendManager===>>>"..data.bundle)
|
||||||
--pt(data)
|
--pt(data)
|
||||||
local config = ec.new()
|
local config = ec.new()
|
||||||
ec.game_data = data
|
ec.game_data = data
|
||||||
_extendMap[data.game_id] = config
|
_extendMap[data.game_id] = config
|
||||||
|
|
@ -25,8 +25,8 @@ function ExtendManager.Init(game_list)
|
||||||
print("==========================================================ExtendManager")
|
print("==========================================================ExtendManager")
|
||||||
pt(game_list)
|
pt(game_list)
|
||||||
if _isInit then return end
|
if _isInit then return end
|
||||||
for i=1,#game_list do
|
for i = 1, #game_list do
|
||||||
local game = game_list[i]
|
local game = game_list[i]
|
||||||
__new_config(game)
|
__new_config(game)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -35,6 +35,7 @@ end
|
||||||
|
|
||||||
-- 更新扩展玩法到最新数据
|
-- 更新扩展玩法到最新数据
|
||||||
function ExtendManager.UpdateExtend(data)
|
function ExtendManager.UpdateExtend(data)
|
||||||
|
print("==========================================xtendManager.UpdateExtend")
|
||||||
if not data then return end
|
if not data then return end
|
||||||
local tem = _extendMap[data.game_id]
|
local tem = _extendMap[data.game_id]
|
||||||
if tem and (not GameApplication.Instance.buildApp) then
|
if tem and (not GameApplication.Instance.buildApp) then
|
||||||
|
|
@ -70,4 +71,4 @@ end
|
||||||
function ExtendManager.Destroy()
|
function ExtendManager.Destroy()
|
||||||
_extendMap = {}
|
_extendMap = {}
|
||||||
_isInit = false
|
_isInit = false
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -348,6 +348,7 @@ function M:UpdateFamilyRoom(fgCtr, id)
|
||||||
else
|
else
|
||||||
local newIndex = index - #roomList + 1
|
local newIndex = index - #roomList + 1
|
||||||
local config = ExtendManager.GetExtendConfig(playList[newIndex].gameId)
|
local config = ExtendManager.GetExtendConfig(playList[newIndex].gameId)
|
||||||
|
print("=======================================layList[newIndex].gameId", playList[newIndex].gameId)
|
||||||
local mode = config:GetGameInfo()
|
local mode = config:GetGameInfo()
|
||||||
local gamePlay = mode:LoadConfigToDetail(playList[newIndex].config)
|
local gamePlay = mode:LoadConfigToDetail(playList[newIndex].config)
|
||||||
obj:GetChild('Label_gameRule').title = gamePlay
|
obj:GetChild('Label_gameRule').title = gamePlay
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,6 @@ local function __login_response(self, response)
|
||||||
__goto_lobby(response)
|
__goto_lobby(response)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
if user.update ~= 0 then
|
if user.update ~= 0 then
|
||||||
ExtendHotupdate.UpdateGameList(user.games, f_enterLobby)
|
ExtendHotupdate.UpdateGameList(user.games, f_enterLobby)
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue