xiyou_yueNanZhengshi
parent
a53756f8af
commit
62457cbf96
|
|
@ -33,6 +33,11 @@ SDKSubMitType = {
|
|||
TYPE_VIP_LEVELUP = 8,
|
||||
TYPE_CHANGE_NAME = 9,
|
||||
TYPE_FENGTI_BIND_ACCOUNT = 10,
|
||||
TYPE_GETSERVERLIST = 100,
|
||||
TYPE_GETSERVERLISTSUCCESS = 101,
|
||||
TYPE_CLICKRECHARGEPACKAGE = 102,
|
||||
TYPE_BUYRECHARGEPACKAGE = 103,
|
||||
TYPE_PLAYTIME = 104
|
||||
}
|
||||
|
||||
SDK_RESULT = {
|
||||
|
|
|
|||
|
|
@ -2247,7 +2247,6 @@ function SubmitExtraData(context)
|
|||
params.moneyNum = BagManager.GetItemCountById(16)
|
||||
params.roleCreateTime = PlayerManager.userCreateTime
|
||||
params.roleLevelUpTime = context.roleLevelUpTime and context.roleLevelUpTime or "0"
|
||||
|
||||
-- 特殊处理, 改名时用zoneName传递老名字
|
||||
if context.type == SDKSubMitType.TYPE_CHANGE_NAME then
|
||||
params.zoneName = context.oldName
|
||||
|
|
|
|||
|
|
@ -4,29 +4,29 @@ require "Logic/GameEvent"
|
|||
--管理器--
|
||||
Game = {}
|
||||
local this = Game
|
||||
|
||||
local time
|
||||
--初始化完成,发送链接服务器信息--
|
||||
function Game.Initialize()
|
||||
math.randomseed(os.time())
|
||||
|
||||
time = Time.time
|
||||
-- 关闭多点触控
|
||||
UnityEngine.Input.multiTouchEnabled = false
|
||||
--
|
||||
this.CurPlatform = tostring(UnityEngine.Application.platform)
|
||||
U3d.Application.runInBackground = true
|
||||
--
|
||||
this.CurPlatform = tostring(UnityEngine.Application.platform)
|
||||
U3d.Application.runInBackground = true
|
||||
Screen.sleepTimeout = U3d.SleepTimeout.NeverSleep
|
||||
this.GlobalEvent = EventManager.New()
|
||||
this.InitManagers()
|
||||
-- 默认30帧
|
||||
if PlayerPrefs.HasKey("ResLution") then
|
||||
UnityEngine.Application.targetFrameRate = 60--PlayerPrefs.GetInt("ResLution") == 0 and 30 or 60
|
||||
UnityEngine.Application.targetFrameRate = 60 --PlayerPrefs.GetInt("ResLution") == 0 and 30 or 60
|
||||
else
|
||||
UnityEngine.Application.targetFrameRate = 60
|
||||
end
|
||||
|
||||
-- 延迟
|
||||
Timer.New(function()
|
||||
UIManager.OpenPanel(UIName.LoginPanel)
|
||||
UIManager.OpenPanel(UIName.LoginPanel)
|
||||
UIManager.OpenPanel(UIName.HorseRaceLampView)
|
||||
end, 0.5):Start()
|
||||
end
|
||||
|
|
@ -38,14 +38,14 @@ function Game.InitManagers()
|
|||
Framework.Initialize()
|
||||
this.managerList = {}
|
||||
for i, v in ipairs(managers) do
|
||||
this.managerList[i] = require("Modules/"..v)
|
||||
this.managerList[i] = require("Modules/" .. v)
|
||||
|
||||
if this.managerList[i].Initialize then
|
||||
this.managerList[i].Initialize()
|
||||
end
|
||||
end
|
||||
|
||||
--
|
||||
|
||||
--
|
||||
UpdateBeat:Add(this.LateUpdate, this)
|
||||
end
|
||||
|
||||
|
|
@ -57,9 +57,8 @@ function Game.LateUpdate()
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
function Game.Logout()
|
||||
PlayerPrefs.SetInt("language",PlayerPrefs.GetInt("language_flag"))
|
||||
PlayerPrefs.SetInt("language", PlayerPrefs.GetInt("language_flag"))
|
||||
if AppConst.isSDKLogin then
|
||||
SDKMgr:Logout()
|
||||
else
|
||||
|
|
@ -71,35 +70,39 @@ function Game.Restart()
|
|||
Framework.Dispose()
|
||||
-- 退出时把socket断掉
|
||||
SocketManager.Disconnect(SocketType.LOGIN)
|
||||
--
|
||||
--
|
||||
App.Instance:ReStart()
|
||||
end
|
||||
|
||||
function Game.Quit()
|
||||
|
||||
Framework.Dispose()
|
||||
UnityEngine.Application.Quit()
|
||||
end
|
||||
|
||||
--应用程序暂停/恢复
|
||||
function Game.OnApplicationPause(pauseStatus)
|
||||
LogError("Game.OnApplicationPause:"..tostring(pauseStatus))
|
||||
if pauseStatus==true then
|
||||
LogError("Game.OnApplicationPause:" .. tostring(pauseStatus))
|
||||
if pauseStatus == true then
|
||||
LogError("11111111111111111111111111111111111111111111111111111111111111111")
|
||||
|
||||
--SubmitExtraData({ type = SDKSubMitType.TYPE_PLAYTIME , roleLevelUpTime = time })
|
||||
time = Time.time
|
||||
end
|
||||
end
|
||||
|
||||
--应用程序获得焦点/失去焦点
|
||||
function Game.OnApplicationFocus(hasFocus)
|
||||
LogError("Game.OnApplicationFocus:"..tostring(hasFocus))
|
||||
LogError("Game.OnApplicationFocus:" .. tostring(hasFocus))
|
||||
if hasFocus then
|
||||
LogError("222222222222222222222222222222222222")
|
||||
--Game.GlobalEvent:DispatchEvent(Protocal.Exception, self)
|
||||
time = Time.time
|
||||
else
|
||||
SubmitExtraData({ type = SDKSubMitType.TYPE_PLAYTIME, roleLevelUpTime = tostring(Time.time - time) })
|
||||
end
|
||||
end
|
||||
|
||||
--应用程序退出
|
||||
function Game.OnApplicationQuit()
|
||||
Log("Game.OnApplicationQuit")
|
||||
end
|
||||
SubmitExtraData({ type = SDKSubMitType.TYPE_PLAYTIME, roleLevelUpTime = tostring(Time.time - time) })
|
||||
end
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@ local LoginRoot_SubChannel = ServerConfigManager.GetVersionInfo("subChannel")
|
|||
local LoginRoot_Channel = ServerConfigManager.GetVersionInfo("channel")
|
||||
local LoginRoot_Version = ServerConfigManager.GetVersionInfo("version")
|
||||
local LoginRoot_PackageVersion = ServerConfigManager.GetVersionInfo("packageVersion")
|
||||
local LoginRoot_NoticeChannel = ServerConfigManager.GetSettingValue(ServerConfigManager.SettingConfig.NOTICE_CHANNEL) or ""
|
||||
local LoginRoot_NoticeChannel = ServerConfigManager.GetSettingValue(ServerConfigManager.SettingConfig.NOTICE_CHANNEL) or
|
||||
""
|
||||
local LoginRoot_UserChannel = ServerConfigManager.GetSettingValue(ServerConfigManager.SettingConfig.USER_CHANNEL) or ""
|
||||
local orginLayer
|
||||
|
||||
|
|
@ -50,7 +51,7 @@ function this:InitComponent()
|
|||
this.btnUser = Util.GetGameObject(this.loginPart, "btnUser")
|
||||
this.btnNotice = Util.GetGameObject(this.loginPart, "btnNotice")
|
||||
this.btnAgeTip = Util.GetGameObject(this.loginPart, "btnAgeTip")
|
||||
this.btnAgeTipPosition=this.btnAgeTip:GetComponent("RectTransform").localPosition
|
||||
this.btnAgeTipPosition = this.btnAgeTip:GetComponent("RectTransform").localPosition
|
||||
this.btnNotice:SetActive(IsShowNotice)
|
||||
|
||||
|
||||
|
|
@ -64,7 +65,7 @@ function this:InitComponent()
|
|||
this.loginMask = Util.GetGameObject(this.loginPart, "loginMask")
|
||||
|
||||
this.versionText = Util.GetGameObject(this.loginPart, "version"):GetComponent("Text")
|
||||
this.versionText.text = Language[11712]..LoginRoot_Version
|
||||
this.versionText.text = Language[11712] .. LoginRoot_Version
|
||||
|
||||
-- this.bg1 = Util.GetGameObject(this.gameObject, "bg11"):GetComponent("RawImage")
|
||||
-- resMgr:SetStreamingTexture(this.bg1, "login_caohua.png")
|
||||
|
|
@ -118,12 +119,11 @@ function this:InitComponent()
|
|||
this.protos:SetActive(IsUserProtoActive)
|
||||
this.newproto:SetActive(false)
|
||||
this.beianBtn = Util.GetGameObject(this.gameObject, "healthTip/beianTxt")
|
||||
Util.GetGameObject(this.gameObject, "healthTip/beianTxt"):GetComponent("Text").text="beian.miit.gov.cn"
|
||||
Util.GetGameObject(this.gameObject, "healthTip/beianTxt"):GetComponent("Text").text = "beian.miit.gov.cn"
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
function this:BindEvent()
|
||||
|
||||
Util.AddClick(this.btnLogin, this.OnLoginClick)
|
||||
--this.dropDown:ClearOptions()
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ function this:BindEvent()
|
|||
this.ShowNotice()
|
||||
end)
|
||||
Util.AddClick(this.btnAgeTip, function()
|
||||
UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.AgeTip,this.btnAgeTipPosition.x,this.btnAgeTipPosition.y)
|
||||
UIManager.OpenPanel(UIName.HelpPopup, HELP_TYPE.AgeTip, this.btnAgeTipPosition.x, this.btnAgeTipPosition.y)
|
||||
end)
|
||||
Util.AddClick(this.UserBtn, function()
|
||||
local user = PlayerPrefs.GetString(openIdkey, defaultOpenIdkey)
|
||||
|
|
@ -181,7 +181,8 @@ function this:BindEvent()
|
|||
LoginManager.ServerId = list.server_id
|
||||
LoginManager.state = list.state
|
||||
--local severArea = tonumber(string.sub(list.server_id, 0, -5))
|
||||
this.serverMes.text = PlayerManager.serverInfo.name-- .. "\t<color=#56F384FF>" .. severArea .. "</color>" .. Language[11713]
|
||||
this.serverMes.text = PlayerManager.serverInfo
|
||||
.name -- .. "\t<color=#56F384FF>" .. severArea .. "</color>" .. Language[11713]
|
||||
end
|
||||
})
|
||||
end)
|
||||
|
|
@ -201,7 +202,7 @@ function this:BindEvent()
|
|||
Util.AddClick(this.sdkLoginBtn, function()
|
||||
-- 喜扑IOS包sdk无法屏蔽点击事件,不允许主动触发
|
||||
if LoginRoot_Channel == "XP2" then
|
||||
return
|
||||
return
|
||||
end
|
||||
this.SDKLogin()
|
||||
end)
|
||||
|
|
@ -224,16 +225,15 @@ function this:BindEvent()
|
|||
OpenWeb("https://beian.miit.gov.cn/#/Integrated/recordQuery")
|
||||
end)
|
||||
Util.AddClick(this.ConfirmBtn, function()
|
||||
local confirm = PlayerPrefs.GetInt("IHaveConfirmProtos")
|
||||
local confirm = PlayerPrefs.GetInt("IHaveConfirmProtos")
|
||||
if confirm == 0 then
|
||||
this.ConfirmImg:SetActive(true)
|
||||
PlayerPrefs.SetInt("IHaveConfirmProtos",1)
|
||||
PlayerPrefs.SetInt("IHaveConfirmProtos", 1)
|
||||
elseif confirm == 1 then
|
||||
this.ConfirmImg:SetActive(false)
|
||||
PlayerPrefs.SetInt("IHaveConfirmProtos",0)
|
||||
PlayerPrefs.SetInt("IHaveConfirmProtos", 0)
|
||||
end
|
||||
end)
|
||||
|
||||
end
|
||||
|
||||
-- sdk 初始化完成回调
|
||||
|
|
@ -261,7 +261,7 @@ end
|
|||
|
||||
function this:OnLogout()
|
||||
if IsSDKLogin then
|
||||
this.SetLoginPart(false)
|
||||
this.SetLoginPart(false)
|
||||
this.sdkLoginBtn:SetActive(true)
|
||||
this.inputField.gameObject:SetActive(false)
|
||||
this.UserBtn:SetActive(false)
|
||||
|
|
@ -298,10 +298,9 @@ end
|
|||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function this:OnOpen(...)
|
||||
|
||||
-- local url="http://82.157.34.193:9991/delivery/ohayooGetExternal"
|
||||
-- local data="body;高级基金;notify_url;http://82.157.34.193:9991/delivery/OhayooCallback;open_id;32AtGSX36PYLuNbx;custom_callback_info;20001190_78_4001_IOS;order_no;200011901931657796390;product_id;78;sign_type;MD5;subject;高级基金;total_amount;12800;trade_time;1657796390;valid_time;2592000"
|
||||
-- HttpManager:SendPostHttp(url,data, this.OnReceiveLogin, nil, nil, nil)
|
||||
-- local url="http://82.157.34.193:9991/delivery/ohayooGetExternal"
|
||||
-- local data="body;高级基金;notify_url;http://82.157.34.193:9991/delivery/OhayooCallback;open_id;32AtGSX36PYLuNbx;custom_callback_info;20001190_78_4001_IOS;order_no;200011901931657796390;product_id;78;sign_type;MD5;subject;高级基金;total_amount;12800;trade_time;1657796390;valid_time;2592000"
|
||||
-- HttpManager:SendPostHttp(url,data, this.OnReceiveLogin, nil, nil, nil)
|
||||
--设置背景
|
||||
PackageManager.SetVideo(this.video, this.bg)
|
||||
if AppConst.Code ~= "" then
|
||||
|
|
@ -310,7 +309,7 @@ function this:OnOpen(...)
|
|||
end
|
||||
|
||||
if IsSDKLogin then
|
||||
this.SetLoginPart(false)
|
||||
this.SetLoginPart(false)
|
||||
this.sdkLoginBtn:SetActive(true)
|
||||
this.inputField.gameObject:SetActive(false)
|
||||
this.UserBtn:SetActive(false)
|
||||
|
|
@ -360,7 +359,6 @@ function this:OnOpen(...)
|
|||
-- local curHeroData = {}
|
||||
-- --用条件进行匹配,使得满足条件
|
||||
-- GodSoulManager.PutQueen(godData, godDatas, 1,godSingleDatas,curHeroData,5)
|
||||
|
||||
end
|
||||
|
||||
--界面关闭时调用(用于子类重写)
|
||||
|
|
@ -374,6 +372,7 @@ function this.CheckNoticeShow()
|
|||
IsShowNotice = not ServerConfigManager.IsSettingActive(ServerConfigManager.SettingConfig.IS_NO_NOTICE)
|
||||
this.btnNotice:SetActive(IsShowNotice)
|
||||
end
|
||||
|
||||
-- 打开公告界面
|
||||
function this.ShowNotice()
|
||||
RequestPanel.Show(Language[11715])
|
||||
|
|
@ -382,16 +381,17 @@ function this.ShowNotice()
|
|||
local noticeChannel = LoginRoot_NoticeChannel
|
||||
local subNoticeID = PackageManager.GetSubNoticeID()
|
||||
if subNoticeID then
|
||||
noticeChannel = noticeChannel.. subNoticeID
|
||||
noticeChannel = noticeChannel .. subNoticeID
|
||||
else
|
||||
local packID = PackageManager.GetPackageID()
|
||||
if packID then
|
||||
noticeChannel = noticeChannel .. packID
|
||||
end
|
||||
end
|
||||
local url = LoginRoot_Url .. "jl_loginserver/getNotice?timestamp="..timeStamp.."&sign=".. timeSign.."&packageName="..noticeChannel
|
||||
HttpManager:SendGetHttp(url,function (str)
|
||||
UIManager.OpenPanel(UIName.NoticePopup,str)
|
||||
local url = LoginRoot_Url ..
|
||||
"jl_loginserver/getNotice?timestamp=" .. timeStamp .. "&sign=" .. timeSign .. "&packageName=" .. noticeChannel
|
||||
HttpManager:SendGetHttp(url, function(str)
|
||||
UIManager.OpenPanel(UIName.NoticePopup, str)
|
||||
end, nil, nil, nil)
|
||||
end
|
||||
|
||||
|
|
@ -400,10 +400,10 @@ function this.RequestServerVersion(func)
|
|||
local ChannelID = LoginRoot_UserChannel == "" and LoginRoot_Channel or LoginRoot_UserChannel
|
||||
local packId = PackageManager.GetPackageID()
|
||||
if packId then
|
||||
ChannelID = ChannelID.. packId
|
||||
ChannelID = ChannelID .. packId
|
||||
end
|
||||
local url = LoginRoot_Url .. "jl_loginserver/getServerVersion?serverVersion="..ChannelID
|
||||
HttpManager:SendGetHttp(url, function (str)
|
||||
local url = LoginRoot_Url .. "jl_loginserver/getServerVersion?serverVersion=" .. ChannelID
|
||||
HttpManager:SendGetHttp(url, function(str)
|
||||
if str == "" or str == "null" or string.find(str, "html") then
|
||||
LogWarn("获取到的ServerVersion数据是空值,请检查!")
|
||||
else
|
||||
|
|
@ -413,25 +413,24 @@ function this.RequestServerVersion(func)
|
|||
-- 当前包的版本号小于GM配置的版本号则包连接正式服,否则连接提审服
|
||||
local vcode = ServerConfigManager.GetSDKVersionCode()
|
||||
if vcode <= context.serverInfo then
|
||||
SERVER_VERSION = 0 -- 正式服
|
||||
SERVER_VERSION = 0 -- 正式服
|
||||
else
|
||||
SERVER_VERSION = 1 -- 提审服
|
||||
SERVER_VERSION = 1 -- 提审服
|
||||
end
|
||||
end
|
||||
end
|
||||
--
|
||||
--
|
||||
if func then
|
||||
func()
|
||||
end
|
||||
end, nil, nil, function(errCode, errMsg)
|
||||
LogError("GetServerVersion Error: "..tostring(errCode) .. ", "..tostring(errMsg))
|
||||
LogError("GetServerVersion Error: " .. tostring(errCode) .. ", " .. tostring(errMsg))
|
||||
if func then
|
||||
func()
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
-- 请求获取服务器列表
|
||||
function this.RequestServerList(userId, callback)
|
||||
this.RequestServerVersion(function()
|
||||
|
|
@ -439,40 +438,41 @@ function this.RequestServerList(userId, callback)
|
|||
--userId=100
|
||||
RequestPanel.Show(Language[11714])
|
||||
local url = string.format(
|
||||
"%sjl_loginserver/getServerList?openId=%s&channel=%s&plat=android&sub_channel=%s&server_version=%s",
|
||||
"%sjl_loginserver/getServerList?openId=%s&channel=%s&plat=android&sub_channel=%s&server_version=%s",
|
||||
LoginRoot_Url, userId, LoginRoot_Channel, LoginRoot_SubChannel, SERVER_VERSION)
|
||||
SubmitExtraData({ type = SDKSubMitType.TYPE_GETSERVERLIST })
|
||||
HttpManager:SendGetHttp(url, callback, nil, nil, nil)
|
||||
end)
|
||||
|
||||
|
||||
--用户协议,隐私政策
|
||||
this.RequestProtos(userId)
|
||||
end
|
||||
|
||||
--获取用户隐私协议
|
||||
function this.RequestProtos(userId)
|
||||
-- this.protos:SetActive(false)
|
||||
-- this.protos:SetActive(false)
|
||||
this.ConfirmImg:SetActive(PlayerPrefs.GetInt("IHaveConfirmProtos") == 1)
|
||||
UrlList[1] = ""
|
||||
UrlList[2] = ""
|
||||
if not IsUserProtoActive then
|
||||
Log("用户和隐私协议功能未开启")
|
||||
return
|
||||
return
|
||||
end
|
||||
local chanel= AppConst.SdkChannel
|
||||
local chanel = AppConst.SdkChannel
|
||||
local ChannelID = LoginRoot_UserChannel == "" and LoginRoot_Channel or LoginRoot_UserChannel
|
||||
local PackageID = PackageManager.GetPackageID()
|
||||
if PackageID then
|
||||
ChannelID = ChannelID .. PackageID
|
||||
end
|
||||
local url = LoginRoot_Url.."jl_loginserver/getAgreement?gamePack="..ChannelID
|
||||
LogError("协议地址为=="..url)
|
||||
HttpManager:SendGetHttp(url, function (str)
|
||||
local url = LoginRoot_Url .. "jl_loginserver/getAgreement?gamePack=" .. ChannelID
|
||||
LogError("协议地址为==" .. url)
|
||||
HttpManager:SendGetHttp(url, function(str)
|
||||
local json = require 'cjson'
|
||||
local data = json.decode(str)
|
||||
if data.parms then
|
||||
UrlList[1] = data.parms.instructions
|
||||
UrlList[2] = data.parms.privacy
|
||||
Log("instructionsUrl:"..tostring(UrlList[1]).." privacyUrl:"..tostring(UrlList[2]))
|
||||
Log("instructionsUrl:" .. tostring(UrlList[1]) .. " privacyUrl:" .. tostring(UrlList[2]))
|
||||
HaveConfirm = true
|
||||
else
|
||||
this.protos:SetActive(false)
|
||||
|
|
@ -481,14 +481,14 @@ function this.RequestProtos(userId)
|
|||
HaveConfirm = false
|
||||
return
|
||||
end
|
||||
if UrlList[1] ~= "" and UrlList[2] ~="" then
|
||||
if UrlList[1] ~= "" and UrlList[2] ~= "" then
|
||||
this.protos:SetActive(true)
|
||||
if chanel and (chanel=="ZZXX" or chanel=="ZZXXXQ") then
|
||||
if chanel and (chanel == "ZZXX" or chanel == "ZZXXXQ") then
|
||||
this.newproto:SetActive(true)
|
||||
else
|
||||
this.newproto:SetActive(false)
|
||||
this.newproto:SetActive(false)
|
||||
end
|
||||
|
||||
|
||||
HaveConfirm = true
|
||||
else
|
||||
this.protos:SetActive(false)
|
||||
|
|
@ -542,7 +542,7 @@ end
|
|||
function this.OnReceiveAnnouncement(str)
|
||||
if str == nil then
|
||||
return
|
||||
end ;
|
||||
end;
|
||||
pcall(function()
|
||||
local json = require 'cqueryAllies'
|
||||
local data = json.decode(str);
|
||||
|
|
@ -561,7 +561,7 @@ function this.OnReceiveServerList(str)
|
|||
MyPCall(function()
|
||||
local json = require 'cjson'
|
||||
local data = json.decode(str)
|
||||
|
||||
SubmitExtraData({ type = SDKSubMitType.TYPE_GETSERVERLISTSUCCESS })
|
||||
---selectServerPart
|
||||
this.SetServerList(data)
|
||||
|
||||
|
|
@ -612,12 +612,12 @@ function this.SetServerList(data)
|
|||
-- 默认选择第一个服务器
|
||||
local lastIndex = 1
|
||||
-- 判断要显示的服务器
|
||||
local showServer
|
||||
local showServer
|
||||
|
||||
if this.lastServer then --有最近登录显示最近登录,没有显示推荐,否则显示第一个服
|
||||
if this.lastServer then --有最近登录显示最近登录,没有显示推荐,否则显示第一个服
|
||||
showServer = this.lastServer.serverid
|
||||
else
|
||||
if this.recommend then
|
||||
if this.recommend then
|
||||
showServer = this.recommend
|
||||
end
|
||||
end
|
||||
|
|
@ -637,10 +637,10 @@ function this.SetServerList(data)
|
|||
LoginManager.state = this.serverList[lastIndex].state
|
||||
|
||||
--local severArea = tonumber(string.sub(this.serverList[lastIndex].server_id, 0, -5))
|
||||
this.serverMes.text = PlayerManager.serverInfo.name-- .. "\t<color=#56F384FF>" .. severArea .. "</color>" .. Language[11713]
|
||||
this.serverMes.text = PlayerManager.serverInfo
|
||||
.name -- .. "\t<color=#56F384FF>" .. severArea .. "</color>" .. Language[11713]
|
||||
|
||||
RequestPanel.Hide()
|
||||
|
||||
end
|
||||
|
||||
function this.CacheLoginData(data)
|
||||
|
|
@ -654,7 +654,7 @@ function this.CacheLoginData(data)
|
|||
if this.serverList[i].isnew > 0 then
|
||||
local tempData = this.serverList[i]
|
||||
for j = i, 2, -1 do
|
||||
this.serverList[j] = this.serverList[j-1]
|
||||
this.serverList[j] = this.serverList[j - 1]
|
||||
end
|
||||
this.serverList[1] = tempData
|
||||
break
|
||||
|
|
@ -671,91 +671,92 @@ end
|
|||
--登录进主界面之前需要依次请求玩家数据,物品数据,装备数据,英雄数据,编队数据,任务数据, 异妖数据,工坊数据, 冒险数据
|
||||
function this.ExecuteLoading()
|
||||
local requestList = {
|
||||
--[[[1] = ]]function() NetManager.PlayerInfoRequest(LoadingPanel.OnStep) end, -- 基础信息
|
||||
--[[[2] = ]]function() NetManager.GetComparenumInfoRequest(LoadingPanel.OnStep) end, -- 数字游戏信息
|
||||
--[[[2] = ]]function() NetManager.RequestMission(LoadingPanel.OnStep) end, -- 任务信息
|
||||
--[[[3] = ]]function() NetManager.ItemInfoRequest(0, LoadingPanel.OnStep) end, -- 物品信息
|
||||
--[[[4]=]]function() NetManager.CrossServerStatusRequest(LoadingPanel.OnStep) end, -- 装备(走背包了)
|
||||
--[[[5] = ]]function() NetManager.AllEquipTreasureRequest(0, LoadingPanel.OnStep) end, -- 宝物
|
||||
--[[[1] = ]] function() NetManager.PlayerInfoRequest(LoadingPanel.OnStep) end, -- 基础信息
|
||||
--[[[2] = ]] function() NetManager.GetComparenumInfoRequest(LoadingPanel.OnStep) end, -- 数字游戏信息
|
||||
--[[[2] = ]] function() NetManager.RequestMission(LoadingPanel.OnStep) end, -- 任务信息
|
||||
--[[[3] = ]] function() NetManager.ItemInfoRequest(0, LoadingPanel.OnStep) end, -- 物品信息
|
||||
--[[[4]=]] function() NetManager.CrossServerStatusRequest(LoadingPanel.OnStep) end, -- 装备(走背包了)
|
||||
--[[[5] = ]] function() NetManager.AllEquipTreasureRequest(0, LoadingPanel.OnStep) end, -- 宝物
|
||||
-- [[[6] = ]]function() NetManager.GetSoulPrintDataRequest(0, LoadingPanel.OnStep) end, -- 魂印(走背包了)
|
||||
--[[[5] = ]]function() NetManager.GetAllFaXiangRequest(1, LoadingPanel.OnStep) end, -- 法相
|
||||
--[[[6] =]]function() NetManager.AllBookEnableResponse(LoadingPanel.OnStep) end, --天枢密卷
|
||||
--[[[7] = ]]function() NetManager.DiffMonsterRequest(0,LoadingPanel.OnStep) end, -- 异妖
|
||||
--[[[8] = ]]function() NetManager.HeroInfoRequest(0, LoadingPanel.OnStep) end, -- 神将信息
|
||||
--[[[9] = ]]function() NetManager.TeamInfoRequest(LoadingPanel.OnStep) end, -- 编队
|
||||
--[[[10] =]]function() NetManager.GetAllMailData(LoadingPanel.OnStep) end, -- 邮件
|
||||
--[[[11] =]]function() NetManager.GetAllFightDataRequest(LoadingPanel.OnStep) end, -- 关卡信息
|
||||
--[[[12] =]]function() NetManager.GetActivityAllRewardRequest(LoadingPanel.OnStep) end, -- 活动奖励
|
||||
--[[[13] =]]--function() NetManager.RequestBaseArenaData(LoadingPanel.OnStep) end, -- 竞技场
|
||||
--[[[14] =]]function() ShopManager.InitData(LoadingPanel.OnStep) end, -- 商店
|
||||
--function() NetManager.GetWorkShopInfoRequest(LoadingPanel.OnStep) end, -- 工坊?
|
||||
--[[[15] =]]function() ChatManager.InitData(LoadingPanel.OnStep) end, -- 聊天
|
||||
--[[[16] =]]function() NetManager.GetAllFunState(LoadingPanel.OnStep) end, -- 功能开启信息
|
||||
--[[[17] =]]function() NetManager.RequestGetFriendInfo(1, LoadingPanel.OnStep) end, -- 好友
|
||||
--[[[18] =]]function() NetManager.RequestGetFriendInfo(2, LoadingPanel.OnStep) end, -- 好友申请
|
||||
--[[[19] =]]function() NetManager.RequestGetFriendInfo(3, LoadingPanel.OnStep) end, -- 好友搜索
|
||||
--[[[20] =]]function() NetManager.RequestGetFriendInfo(4, LoadingPanel.OnStep) end, -- 黑名单
|
||||
--[[[21] =]]function() FriendChatManager.InitData(LoadingPanel.OnStep) end, -- 好友消息
|
||||
--[[[22] =]]function() MyGuildManager.InitBaseData(LoadingPanel.OnStep) end, -- 公会信息
|
||||
--function() GuildFightManager.InitBaseData(LoadingPanel.OnStep) end, -- 公会战
|
||||
--[[[23] =]]function() NetManager.GetAllGuildSkillData(LoadingPanel.OnStep) end, -- 公会技能
|
||||
--[[[24] =]]function() NetManager.InitFightPointLevelInfo(LoadingPanel.OnStep) end, -- 关卡
|
||||
--[[[25] =]]function() NetManager.GetExpeditionRequest(ExpeditionManager.expeditionLeve,LoadingPanel.OnStep) end, -- 大闹天宫
|
||||
--[[[26] =]]function() NetManager.GuildHelpGetAllRequest(LoadingPanel.OnStep) end, -- 公会援助
|
||||
--[[[27] =]]function() DeathPosManager.InitData(LoadingPanel.OnStep) end, -- 十绝阵
|
||||
--[[[28] =]]function() NetManager.TreasureOfHeavenScoreRequest(LoadingPanel.OnStep) end, -- 天宫秘宝积分
|
||||
--[[[29] =]]function() NetManager.RankFirstRequest({3,22,20,4,21},{0,0,0,0,20},LoadingPanel.OnStep) end, -- 排行榜数据
|
||||
--[[[30] =]]function() NetManager.GetSituationInfoRequest(LoadingPanel.OnStep) end, --轩辕宝镜
|
||||
--[[[31] =]]function() NetManager.RefreshTimeSLRequest(LoadingPanel.OnStep) end, --青龙秘宝倒计时
|
||||
--[[[32] =]]function() HeroManager.CheckRepeatTreasure(LoadingPanel.OnStep) end, --检测所有重复穿戴的宝器并卸下
|
||||
--[[[33] =]]function() XiaoYaoManager.GetOpenMapData(LoadingPanel.OnStep) end, --逍遥游
|
||||
--[[[34] =]]function() NetManager.GetHeroSkinData(LoadingPanel.OnStep) end, --皮肤
|
||||
--[[[35] =]]function() NetManager.GetFourElementGetInfo(LoadingPanel.OnStep) end, --四灵试炼
|
||||
--[[[35] =]]function() NetManager.GetChallengeCopyInfo(LoadingPanel.OnStep) end, --挑战副本
|
||||
--[[[36] =]]function() MonsterCampManager.SetMyHelpHeroData(nil,nil,LoadingPanel.OnStep) end,--助战神将
|
||||
--[[[37] =]]function() NetManager.HongMengInfoResponse(LoadingPanel.OnStep) end, --鸿蒙阵
|
||||
--[[[5] = ]] function() NetManager.GetAllFaXiangRequest(1, LoadingPanel.OnStep) end, -- 法相
|
||||
--[[[6] =]] function() NetManager.AllBookEnableResponse(LoadingPanel.OnStep) end, --天枢密卷
|
||||
--[[[7] = ]] function() NetManager.DiffMonsterRequest(0, LoadingPanel.OnStep) end, -- 异妖
|
||||
--[[[8] = ]] function() NetManager.HeroInfoRequest(0, LoadingPanel.OnStep) end, -- 神将信息
|
||||
--[[[9] = ]] function() NetManager.TeamInfoRequest(LoadingPanel.OnStep) end, -- 编队
|
||||
--[[[10] =]] function() NetManager.GetAllMailData(LoadingPanel.OnStep) end, -- 邮件
|
||||
--[[[11] =]] function() NetManager.GetAllFightDataRequest(LoadingPanel.OnStep) end, -- 关卡信息
|
||||
--[[[12] =]] function() NetManager.GetActivityAllRewardRequest(LoadingPanel.OnStep) end, -- 活动奖励
|
||||
--[[[13] =]] --function() NetManager.RequestBaseArenaData(LoadingPanel.OnStep) end, -- 竞技场
|
||||
--[[[14] =]] function() ShopManager.InitData(LoadingPanel.OnStep) end, -- 商店
|
||||
--function() NetManager.GetWorkShopInfoRequest(LoadingPanel.OnStep) end, -- 工坊?
|
||||
--[[[15] =]] function() ChatManager.InitData(LoadingPanel.OnStep) end, -- 聊天
|
||||
--[[[16] =]] function() NetManager.GetAllFunState(LoadingPanel.OnStep) end, -- 功能开启信息
|
||||
--[[[17] =]] function() NetManager.RequestGetFriendInfo(1, LoadingPanel.OnStep) end, -- 好友
|
||||
--[[[18] =]] function() NetManager.RequestGetFriendInfo(2, LoadingPanel.OnStep) end, -- 好友申请
|
||||
--[[[19] =]] function() NetManager.RequestGetFriendInfo(3, LoadingPanel.OnStep) end, -- 好友搜索
|
||||
--[[[20] =]] function() NetManager.RequestGetFriendInfo(4, LoadingPanel.OnStep) end, -- 黑名单
|
||||
--[[[21] =]] function() FriendChatManager.InitData(LoadingPanel.OnStep) end, -- 好友消息
|
||||
--[[[22] =]] function() MyGuildManager.InitBaseData(LoadingPanel.OnStep) end, -- 公会信息
|
||||
--function() GuildFightManager.InitBaseData(LoadingPanel.OnStep) end, -- 公会战
|
||||
--[[[23] =]] function() NetManager.GetAllGuildSkillData(LoadingPanel.OnStep) end, -- 公会技能
|
||||
--[[[24] =]] function() NetManager.InitFightPointLevelInfo(LoadingPanel.OnStep) end, -- 关卡
|
||||
--[[[25] =]] function() NetManager.GetExpeditionRequest(ExpeditionManager.expeditionLeve, LoadingPanel.OnStep) end, -- 大闹天宫
|
||||
--[[[26] =]] function() NetManager.GuildHelpGetAllRequest(LoadingPanel.OnStep) end, -- 公会援助
|
||||
--[[[27] =]] function() DeathPosManager.InitData(LoadingPanel.OnStep) end, -- 十绝阵
|
||||
--[[[28] =]] function() NetManager.TreasureOfHeavenScoreRequest(LoadingPanel.OnStep) end, -- 天宫秘宝积分
|
||||
--[[[29] =]] function() NetManager.RankFirstRequest({ 3, 22, 20, 4, 21 }, { 0, 0, 0, 0, 20 }, LoadingPanel
|
||||
.OnStep) end, -- 排行榜数据
|
||||
--[[[30] =]] function() NetManager.GetSituationInfoRequest(LoadingPanel.OnStep) end, --轩辕宝镜
|
||||
--[[[31] =]] function() NetManager.RefreshTimeSLRequest(LoadingPanel.OnStep) end, --青龙秘宝倒计时
|
||||
--[[[32] =]] function() HeroManager.CheckRepeatTreasure(LoadingPanel.OnStep) end, --检测所有重复穿戴的宝器并卸下
|
||||
--[[[33] =]] function() XiaoYaoManager.GetOpenMapData(LoadingPanel.OnStep) end, --逍遥游
|
||||
--[[[34] =]] function() NetManager.GetHeroSkinData(LoadingPanel.OnStep) end, --皮肤
|
||||
--[[[35] =]] function() NetManager.GetFourElementGetInfo(LoadingPanel.OnStep) end, --四灵试炼
|
||||
--[[[35] =]] function() NetManager.GetChallengeCopyInfo(LoadingPanel.OnStep) end, --挑战副本
|
||||
--[[[36] =]] function() MonsterCampManager.SetMyHelpHeroData(nil, nil, LoadingPanel.OnStep) end, --助战神将
|
||||
--[[[37] =]] function() NetManager.HongMengInfoResponse(LoadingPanel.OnStep) end, --鸿蒙阵
|
||||
--[--[[38] =]]function() NetManager.AllBookEnableResponse(LoadingPanel.OnStep) end, --天枢密卷
|
||||
--[[[39] =]]function() NetManager.AllEndLessHeroDataResponse(0, LoadingPanel.OnStep) end,--无尽英雄数据
|
||||
--[[[40] =]]function() NetManager.GetEndlessTreasureInfoResponse(LoadingPanel.OnStep) end,--无尽密保
|
||||
--[[[41] =]]function() MyGuildManager.ReuqsetRedPackage(LoadingPanel.OnStep) end, --请求红包
|
||||
--[[[42] =]]function() NetManager.HardStageRequest(LoadingPanel.OnStep) end, --山河社稷图
|
||||
--[[[43] =]]function() NetManager.VipLevelStateRequset(LoadingPanel.OnStep) end, --vip
|
||||
--[[[44] =]]function() NetManager.RequestRedPacketData(LoadingPanel.OnStep) end, --福利红包
|
||||
--[[[45] =]]function() NetManager.BeautyBagWishEquipRequest(nil,LoadingPanel.OnStep) end,--心愿魂印
|
||||
--[[[46] =]]function() LingLongBaoJingManager.InitData(LoadingPanel.OnStep) end, --玲珑宝镜
|
||||
--[[[47] =]]function() NetManager.IsCrossRequert(LoadingPanel.OnStep) end, --跨服
|
||||
--[[[48] =]]function() NetManager.TaiChuSecretvolumeRequest(LoadingPanel.OnStep) end, --太初密卷
|
||||
--[[[49] =]]function() NetManager.CrossYuXuLunDaoGetInfoRequest(2,LoadingPanel.OnStep) end, --玉虚论道红点
|
||||
--[[[50] =]]function() NetManager.GetLikeableDataRequest(LoadingPanel.OnStep) end, --好感度
|
||||
--[[[51] =]]function() NetManager.GetTransformationRequest(LoadingPanel.OnStep) end, --身外化身
|
||||
--[[[52] =]]function() NetManager.GetLingMaiInfoRequest(0,LoadingPanel.OnStep) end, --灵脉秘境
|
||||
--[[[53] =]]function() NetManager.SendGetTailsmanSoulData(LoadingPanel.OnStep) end, --法宝之灵
|
||||
--[[[54] =]]--function() NetManager.RequestArenaRankData(1,LoadingPanel.OnStep) end, --获取竞技场数据
|
||||
--[[[55] =]]function() HomeLandManager.GetData(LoadingPanel.OnStep) end, --家园获取数据
|
||||
--[[[56] =]]function() NetManager.ExplorerMapInfoRequest(LoadingPanel.OnStep) end, --灵脉秘境
|
||||
--[[[57] =]]function() CommonActPageManager.GetPowerRicePower(LoadingPanel.OnStep) end, --战力冲刺
|
||||
--[[[58] =]]function() NetManager.RequestMagicSoldierInfo(LoadingPanel.OnStep) end, --神兵
|
||||
--[[[59] =]]function() NetManager.GemNewInfoRequest(LoadingPanel.OnStep) end, --新命石
|
||||
--[[[60] =]]function() NetManager.BaublesAllInfoRequest(LoadingPanel.OnStep) end, --新法宝
|
||||
--[[[61] =]]function() NetManager.TrainingArchitectureInfoRequest(LoadingPanel.OnStep) end, --特训信息
|
||||
--[[[62] =]]function() NetManager.NewArenaResetRequest(LoadingPanel.OnStep) end, -- 竞技场
|
||||
--[[[63] =]]function() NetManager.GetNewArenaInfoRequest(LoadingPanel.OnStep) end, -- 竞技场
|
||||
--[[[64] =]]function() NetManager.GetSoldiersInfoRequest(LoadingPanel.OnStep) end, --小兵
|
||||
--[[[65] =]]function() NetManager.BaublesAllInfoRequest(LoadingPanel.OnStep) end, --新法宝
|
||||
--[[[66] =]]function() NetManager.TrainingArchitectureInfoRequest(LoadingPanel.OnStep) end,
|
||||
--[[[67] =]]function() NetManager.QueryBookImageRequest(6,LoadingPanel.OnStep) end,
|
||||
--[[[68] =]]function() NetManager.QueryBookImageRequest(7,LoadingPanel.OnStep) end,
|
||||
--[[[69] =]]function() NetManager.QueryBookImageRequest(8,LoadingPanel.OnStep) end,
|
||||
--[[[70] =]]function() NetManager.QueryLuofuRegisterInfoRequest(LoadingPanel.OnStep) end,
|
||||
--[[[71] =]]function() JumpServerManager.LoginGetWorldArenaInfoRequest(LoadingPanel.OnStep) end,--跨服天梯
|
||||
--[[[72] =]]function() NetManager.AssistInfoRequest(LoadingPanel.OnStep) end,
|
||||
--[[[39] =]] function() NetManager.AllEndLessHeroDataResponse(0, LoadingPanel.OnStep) end, --无尽英雄数据
|
||||
--[[[40] =]] function() NetManager.GetEndlessTreasureInfoResponse(LoadingPanel.OnStep) end, --无尽密保
|
||||
--[[[41] =]] function() MyGuildManager.ReuqsetRedPackage(LoadingPanel.OnStep) end, --请求红包
|
||||
--[[[42] =]] function() NetManager.HardStageRequest(LoadingPanel.OnStep) end, --山河社稷图
|
||||
--[[[43] =]] function() NetManager.VipLevelStateRequset(LoadingPanel.OnStep) end, --vip
|
||||
--[[[44] =]] function() NetManager.RequestRedPacketData(LoadingPanel.OnStep) end, --福利红包
|
||||
--[[[45] =]] function() NetManager.BeautyBagWishEquipRequest(nil, LoadingPanel.OnStep) end, --心愿魂印
|
||||
--[[[46] =]] function() LingLongBaoJingManager.InitData(LoadingPanel.OnStep) end, --玲珑宝镜
|
||||
--[[[47] =]] function() NetManager.IsCrossRequert(LoadingPanel.OnStep) end, --跨服
|
||||
--[[[48] =]] function() NetManager.TaiChuSecretvolumeRequest(LoadingPanel.OnStep) end, --太初密卷
|
||||
--[[[49] =]] function() NetManager.CrossYuXuLunDaoGetInfoRequest(2, LoadingPanel.OnStep) end, --玉虚论道红点
|
||||
--[[[50] =]] function() NetManager.GetLikeableDataRequest(LoadingPanel.OnStep) end, --好感度
|
||||
--[[[51] =]] function() NetManager.GetTransformationRequest(LoadingPanel.OnStep) end, --身外化身
|
||||
--[[[52] =]] function() NetManager.GetLingMaiInfoRequest(0, LoadingPanel.OnStep) end, --灵脉秘境
|
||||
--[[[53] =]] function() NetManager.SendGetTailsmanSoulData(LoadingPanel.OnStep) end, --法宝之灵
|
||||
--[[[54] =]] --function() NetManager.RequestArenaRankData(1,LoadingPanel.OnStep) end, --获取竞技场数据
|
||||
--[[[55] =]] function() HomeLandManager.GetData(LoadingPanel.OnStep) end, --家园获取数据
|
||||
--[[[56] =]] function() NetManager.ExplorerMapInfoRequest(LoadingPanel.OnStep) end, --灵脉秘境
|
||||
--[[[57] =]] function() CommonActPageManager.GetPowerRicePower(LoadingPanel.OnStep) end, --战力冲刺
|
||||
--[[[58] =]] function() NetManager.RequestMagicSoldierInfo(LoadingPanel.OnStep) end, --神兵
|
||||
--[[[59] =]] function() NetManager.GemNewInfoRequest(LoadingPanel.OnStep) end, --新命石
|
||||
--[[[60] =]] function() NetManager.BaublesAllInfoRequest(LoadingPanel.OnStep) end, --新法宝
|
||||
--[[[61] =]] function() NetManager.TrainingArchitectureInfoRequest(LoadingPanel.OnStep) end, --特训信息
|
||||
--[[[62] =]] function() NetManager.NewArenaResetRequest(LoadingPanel.OnStep) end, -- 竞技场
|
||||
--[[[63] =]] function() NetManager.GetNewArenaInfoRequest(LoadingPanel.OnStep) end, -- 竞技场
|
||||
--[[[64] =]] function() NetManager.GetSoldiersInfoRequest(LoadingPanel.OnStep) end, --小兵
|
||||
--[[[65] =]] function() NetManager.BaublesAllInfoRequest(LoadingPanel.OnStep) end, --新法宝
|
||||
--[[[66] =]] function() NetManager.TrainingArchitectureInfoRequest(LoadingPanel.OnStep) end,
|
||||
--[[[67] =]] function() NetManager.QueryBookImageRequest(6, LoadingPanel.OnStep) end,
|
||||
--[[[68] =]] function() NetManager.QueryBookImageRequest(7, LoadingPanel.OnStep) end,
|
||||
--[[[69] =]] function() NetManager.QueryBookImageRequest(8, LoadingPanel.OnStep) end,
|
||||
--[[[70] =]] function() NetManager.QueryLuofuRegisterInfoRequest(LoadingPanel.OnStep) end,
|
||||
--[[[71] =]] function() JumpServerManager.LoginGetWorldArenaInfoRequest(LoadingPanel.OnStep) end, --跨服天梯
|
||||
--[[[72] =]] function() NetManager.AssistInfoRequest(LoadingPanel.OnStep) end,
|
||||
----[[[73] =]]function() NetManager.AnewRechargeOrderRequest(LoadingPanel.OnStep) end,
|
||||
function() -- 登录请求最终接口,所有请求放在此接口之前
|
||||
function() -- 登录请求最终接口,所有请求放在此接口之前
|
||||
-- 登录成功确认
|
||||
NetManager.LoginConfimRequest()
|
||||
NetManager.AnewRechargeOrderRequest()
|
||||
-- 登录时初始化主界面竖条显示为打开状态
|
||||
PlayerPrefs.SetInt(PlayerManager.uid.."MainRightBarSetting",1)
|
||||
PlayerPrefs.SetInt(PlayerManager.uid .. "MainRightBarSetting", 1)
|
||||
if AppConst.isGuide then
|
||||
if GuideManager.GetCurId(GuideType.Force) == 1 and PlayerManager.nickName == tostring(PlayerManager.uid) and PlayerManager.level == 1 then
|
||||
-- 新的引导
|
||||
|
|
@ -789,28 +790,27 @@ function this.ExecuteLoading()
|
|||
LogError("开始调用日志上报--------------------------------------------------------")
|
||||
LogBlue("调用日志上报")
|
||||
this.SubmitGameData()
|
||||
if OperatingManager.IsBuyGift(78)==false then
|
||||
PlayerPrefs.SetInt(PlayerManager.uid.."chaozhijijin128",0)
|
||||
if OperatingManager.IsBuyGift(78) == false then
|
||||
PlayerPrefs.SetInt(PlayerManager.uid .. "chaozhijijin128", 0)
|
||||
end
|
||||
if OperatingManager.IsBuyGift(79)==false then
|
||||
PlayerPrefs.SetInt(PlayerManager.uid.."chaozhijijin328",0)
|
||||
if OperatingManager.IsBuyGift(79) == false then
|
||||
PlayerPrefs.SetInt(PlayerManager.uid .. "chaozhijijin328", 0)
|
||||
end
|
||||
PlayerPrefs.SetInt(PlayerManager.uid.."XunBaoMiZong_zqbg",0)
|
||||
PlayerPrefs.SetInt(PlayerManager.uid .. "XunBaoMiZong_zqbg", 0)
|
||||
local dailyActInfo = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.yunmenghaoli)
|
||||
if dailyActInfo and #dailyActInfo.mission > 0 then
|
||||
-- 每天检测
|
||||
PlayerPrefs.SetInt(PlayerManager.uid.."_YunMeng_Check"..dailyActInfo.activityId,0)
|
||||
PlayerPrefs.SetInt(PlayerManager.uid .. "_YunMeng_Check" .. dailyActInfo.activityId, 0)
|
||||
end
|
||||
|
||||
|
||||
-- 登录成功刷新红点数据
|
||||
RedpotManager.CheckAllRedPointStatus()
|
||||
-- 检查新字状态
|
||||
FunctionOpenMananger.InitCheck()
|
||||
DataCenterManager.CommitBootStatus()
|
||||
|
||||
end,
|
||||
}
|
||||
--
|
||||
--
|
||||
for _, func in ipairs(requestList) do
|
||||
LoadingPanel.AddStep(func)
|
||||
end
|
||||
|
|
@ -867,8 +867,8 @@ function this.RequestHttpLogin()
|
|||
RequestPanel.Show(Language[11718])
|
||||
local url = ""
|
||||
local user_channel = LoginRoot_UserChannel == "" and LoginRoot_Channel or LoginRoot_UserChannel
|
||||
local tokenStr=AppConst.TokenStr
|
||||
local Platform=1
|
||||
local tokenStr = AppConst.TokenStr
|
||||
local Platform = 1
|
||||
-- if user_channel~="pc" then
|
||||
-- local chanel= SDKMgr:GetChannel()
|
||||
-- if chanel and chanel=="Ohayoo" then
|
||||
|
|
@ -878,19 +878,19 @@ function this.RequestHttpLogin()
|
|||
-- end
|
||||
-- end
|
||||
if IsSDKLogin then
|
||||
url = LoginRoot_Url
|
||||
.. "jl_loginserver/getUserInfo?openId=" .. AppConst.OpenId
|
||||
.. "&serverId=" .. LoginManager.ServerId
|
||||
.. "&token=" .. tokenStr
|
||||
.. "&platform=" .. Platform
|
||||
.. "&channel=" .. user_channel
|
||||
.. "&sub_channel=" .. LoginRoot_SubChannel
|
||||
.. "&pid=" .. AppConst.SdkChannel --LoginManager.pt_pId
|
||||
.. "&gid=" .. AppConst.SdkPackageName --LoginManager.pt_gId
|
||||
.. "&version=" .. LoginRoot_PackageVersion
|
||||
.. "&timeStamp="..LoginManager.SdkLoginTimeStamp
|
||||
.. "&ext="..encodeURI(LoginManager.extData)
|
||||
.. "&platform_appid="..LoginManager.p_appId
|
||||
url = LoginRoot_Url
|
||||
.. "jl_loginserver/getUserInfo?openId=" .. AppConst.OpenId
|
||||
.. "&serverId=" .. LoginManager.ServerId
|
||||
.. "&token=" .. tokenStr
|
||||
.. "&platform=" .. Platform
|
||||
.. "&channel=" .. user_channel
|
||||
.. "&sub_channel=" .. LoginRoot_SubChannel
|
||||
.. "&pid=" .. AppConst.SdkChannel --LoginManager.pt_pId
|
||||
.. "&gid=" .. AppConst.SdkPackageName --LoginManager.pt_gId
|
||||
.. "&version=" .. LoginRoot_PackageVersion
|
||||
.. "&timeStamp=" .. LoginManager.SdkLoginTimeStamp
|
||||
.. "&ext=" .. encodeURI(LoginManager.extData)
|
||||
.. "&platform_appid=" .. LoginManager.p_appId
|
||||
-- .. "&userId="..LoginManager.qyUserId
|
||||
-- .. "&platformId="..LoginManager.qyPlatformId
|
||||
-- .. "×tamp="..LoginManager.qyTimestamp
|
||||
|
|
@ -905,30 +905,29 @@ function this.RequestHttpLogin()
|
|||
return
|
||||
end
|
||||
PlayerPrefs.SetString(openIdkey, str)
|
||||
url = LoginRoot_Url
|
||||
.. "jl_loginserver/getUserInfo?openId=" .. str
|
||||
.. "&serverId=" .. LoginManager.ServerId
|
||||
url = LoginRoot_Url
|
||||
.. "jl_loginserver/getUserInfo?openId=" .. str
|
||||
.. "&serverId=" .. LoginManager.ServerId
|
||||
.. "&token=111"
|
||||
.. "&platform=1"
|
||||
.. "&channel=" .. user_channel
|
||||
.. "&sub_channel=" .. LoginRoot_SubChannel
|
||||
.. "&channel=" .. user_channel
|
||||
.. "&sub_channel=" .. LoginRoot_SubChannel
|
||||
.. "&admin=d53b3e8ef74bf72d8aafce3a1c8671a0"
|
||||
.. "&version=" .. LoginRoot_PackageVersion
|
||||
.. "&timeStamp=0"
|
||||
else
|
||||
url = LoginRoot_Url
|
||||
.. "jl_loginserver/getUserInfo?openId=" ..LoginManager.openId
|
||||
.. "&serverId=" .. LoginManager.ServerId
|
||||
.. "&token=" .. LoginManager.token
|
||||
url = LoginRoot_Url
|
||||
.. "jl_loginserver/getUserInfo?openId=" .. LoginManager.openId
|
||||
.. "&serverId=" .. LoginManager.ServerId
|
||||
.. "&token=" .. LoginManager.token
|
||||
.. "&platform=4"
|
||||
.. "&channel=" .. user_channel
|
||||
.. "&sub_channel=" .. LoginRoot_SubChannel
|
||||
.. "&channel=" .. user_channel
|
||||
.. "&sub_channel=" .. LoginRoot_SubChannel
|
||||
.. "&admin=d53b3e8ef74bf72d8aafce3a1c8671a0"
|
||||
.. "&version=" .. LoginRoot_PackageVersion
|
||||
.. "&timeStamp=0",
|
||||
this.OnReceiveLogin, nil, nil, nil
|
||||
this.OnReceiveLogin, nil, nil, nil
|
||||
end
|
||||
|
||||
end
|
||||
HttpManager:SendGetHttp(url, this.OnReceiveLogin, nil, nil, nil)
|
||||
end
|
||||
|
|
@ -946,7 +945,7 @@ function this.OnReceiveLogin(str)
|
|||
local data = json.decode(str)
|
||||
if data.errorCode and data.errorCode == -1 then
|
||||
MsgPanel.ShowOne(data.reason or Language[11719])
|
||||
return
|
||||
return
|
||||
end
|
||||
if data.uid and data.token and not LoginManager.IsLogin then
|
||||
AppConst.UserId = data.uid
|
||||
|
|
@ -956,6 +955,7 @@ function this.OnReceiveLogin(str)
|
|||
end)
|
||||
end
|
||||
end
|
||||
|
||||
-----------++++++++++++++++++++++++++++++++++++++++ http +++++++++++++++++++++++++++++
|
||||
|
||||
-----------++++++++++++++++++++++++++++++++++++++++ socket +++++++++++++++++++++++++++++
|
||||
|
|
@ -967,6 +967,7 @@ function this.RequestSocketLogin()
|
|||
SocketManager.AddNetwork(SocketType.LOGIN, LoginManager.SocketAddress, LoginManager.SocketPort)
|
||||
SocketManager.TryConnect(SocketType.LOGIN)
|
||||
end
|
||||
|
||||
function this.OnConnect(network)
|
||||
local openId = AppConst.isSDKLogin and AppConst.OpenId or PlayerPrefs.GetString(openIdkey)
|
||||
NetManager.LoginRequest(openId, function()
|
||||
|
|
@ -977,6 +978,7 @@ function this.OnConnect(network)
|
|||
RequestPanel.Hide()
|
||||
end)
|
||||
end
|
||||
|
||||
function this.OnDisconnect(network)
|
||||
RequestPanel.Hide()
|
||||
PopupTipPanel.ShowTip(Language[11719])
|
||||
|
|
@ -1001,4 +1003,4 @@ function this.SubmitGameData()
|
|||
SubmitExtraData({ type = SDKSubMitType.TYPE_ENTER_GAME })
|
||||
end
|
||||
|
||||
return LoginPanel
|
||||
return LoginPanel
|
||||
|
|
|
|||
Loading…
Reference in New Issue