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,11 +4,11 @@ require "Logic/GameEvent"
|
|||
--管理器--
|
||||
Game = {}
|
||||
local this = Game
|
||||
|
||||
local time
|
||||
--初始化完成,发送链接服务器信息--
|
||||
function Game.Initialize()
|
||||
math.randomseed(os.time())
|
||||
|
||||
time = Time.time
|
||||
-- 关闭多点触控
|
||||
UnityEngine.Input.multiTouchEnabled = false
|
||||
--
|
||||
|
|
@ -57,7 +57,6 @@ function Game.LateUpdate()
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
function Game.Logout()
|
||||
PlayerPrefs.SetInt("language", PlayerPrefs.GetInt("language_flag"))
|
||||
if AppConst.isSDKLogin then
|
||||
|
|
@ -76,7 +75,6 @@ function Game.Restart()
|
|||
end
|
||||
|
||||
function Game.Quit()
|
||||
|
||||
Framework.Dispose()
|
||||
UnityEngine.Application.Quit()
|
||||
end
|
||||
|
|
@ -86,7 +84,8 @@ function Game.OnApplicationPause(pauseStatus)
|
|||
LogError("Game.OnApplicationPause:" .. tostring(pauseStatus))
|
||||
if pauseStatus == true then
|
||||
LogError("11111111111111111111111111111111111111111111111111111111111111111")
|
||||
|
||||
--SubmitExtraData({ type = SDKSubMitType.TYPE_PLAYTIME , roleLevelUpTime = time })
|
||||
time = Time.time
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -96,10 +95,14 @@ function Game.OnApplicationFocus(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")
|
||||
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
|
||||
|
||||
|
|
@ -123,7 +124,6 @@ end
|
|||
|
||||
--绑定事件(用于子类重写)
|
||||
function this:BindEvent()
|
||||
|
||||
Util.AddClick(this.btnLogin, this.OnLoginClick)
|
||||
--this.dropDown:ClearOptions()
|
||||
|
||||
|
|
@ -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)
|
||||
|
|
@ -233,7 +234,6 @@ function this:BindEvent()
|
|||
PlayerPrefs.SetInt("IHaveConfirmProtos", 0)
|
||||
end
|
||||
end)
|
||||
|
||||
end
|
||||
|
||||
-- sdk 初始化完成回调
|
||||
|
|
@ -298,7 +298,6 @@ 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)
|
||||
|
|
@ -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])
|
||||
|
|
@ -389,7 +388,8 @@ function this.ShowNotice()
|
|||
noticeChannel = noticeChannel .. packID
|
||||
end
|
||||
end
|
||||
local url = LoginRoot_Url .. "jl_loginserver/getNotice?timestamp="..timeStamp.."&sign=".. timeSign.."&packageName="..noticeChannel
|
||||
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)
|
||||
|
|
@ -431,7 +431,6 @@ function this.RequestServerVersion(func)
|
|||
end)
|
||||
end
|
||||
|
||||
|
||||
-- 请求获取服务器列表
|
||||
function this.RequestServerList(userId, callback)
|
||||
this.RequestServerVersion(function()
|
||||
|
|
@ -441,6 +440,7 @@ function this.RequestServerList(userId, callback)
|
|||
local url = string.format(
|
||||
"%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)
|
||||
|
||||
|
|
@ -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)
|
||||
|
||||
|
|
@ -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)
|
||||
|
|
@ -704,7 +704,8 @@ function this.ExecuteLoading()
|
|||
--[[[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, -- 排行榜数据
|
||||
--[[[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, --检测所有重复穿戴的宝器并卸下
|
||||
|
|
@ -807,7 +808,6 @@ function this.ExecuteLoading()
|
|||
-- 检查新字状态
|
||||
FunctionOpenMananger.InitCheck()
|
||||
DataCenterManager.CommitBootStatus()
|
||||
|
||||
end,
|
||||
}
|
||||
--
|
||||
|
|
@ -928,7 +928,6 @@ function this.RequestHttpLogin()
|
|||
.. "&timeStamp=0",
|
||||
this.OnReceiveLogin, nil, nil, nil
|
||||
end
|
||||
|
||||
end
|
||||
HttpManager:SendGetHttp(url, this.OnReceiveLogin, nil, nil, nil)
|
||||
end
|
||||
|
|
@ -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])
|
||||
|
|
|
|||
Loading…
Reference in New Issue