xiyou_yueNanZhengshi
zhangjiannan 2024-11-28 12:46:21 +08:00
parent e020470bca
commit 4bbb046510
7 changed files with 16594 additions and 3566 deletions

View File

@ -3,5 +3,5 @@ guid: 2520a089882a2e54cb1444ec5339c11a
PrefabImporter:
externalObjects: {}
userData:
assetBundleName: lz4/prefabs/effect/floating/s_jieling_hs_3006_skeff_casting_buff_nuqi
assetBundleName: lz4/prefabs/effect/floating/s_jieling_hs_3006_skeff_casting_buff_nuqi_en
assetBundleVariant: unity3d

View File

@ -3,5 +3,5 @@ guid: 928d0605582aea641b012aedae653fda
PrefabImporter:
externalObjects: {}
userData:
assetBundleName: lz4/prefabs/effect/floating/s_jieling_hs_3006_skeff_casting_buff_nuqi
assetBundleName: lz4/prefabs/effect/floating/s_jieling_hs_3006_skeff_casting_buff_nuqi_vi
assetBundleVariant: unity3d

File diff suppressed because it is too large Load Diff

View File

@ -37,7 +37,9 @@ SDKSubMitType = {
TYPE_GETSERVERLISTSUCCESS = 101,
TYPE_CLICKRECHARGEPACKAGE = 102,
TYPE_BUYRECHARGEPACKAGE = 103,
TYPE_PLAYTIME = 104
TYPE_PLAYTIME = 104,
TYPE_RESOURCE_DOWNLOAD_BEGAIN = 105,
TYPE_RESOURCE_DOWNLOAD_SUCCESS = 106
}
SDK_RESULT = {

View File

@ -58,7 +58,7 @@ function Game.LateUpdate()
end
function Game.Logout()
PlayerPrefs.SetInt("language", PlayerPrefs.GetInt("language_flag"))
PlayerPrefs.SetInt("language", PlayerPrefs.GetInt("language_flag", GetCurLanguage()))
if AppConst.isSDKLogin then
SDKMgr:Logout()
else

View File

@ -10,16 +10,16 @@ this.pt_gId = ""
local LoginRoot_Url = ServerConfigManager.GetVersionInfo("serverUrl")
function this.Initialize()
this.IsLogin = false
this.GameName='DouDou'
local defaultLoginWay=0
this.GameName = 'DouDou'
local defaultLoginWay = 0
if UnityEngine.Application.isMobilePlatform then
defaultLoginWay=1
defaultLoginWay = 1
else
defaultLoginWay=0
defaultLoginWay = 0
end
this.CurLoginWay=PlayerPrefs.GetInt(this.GameName.."LoginWay",defaultLoginWay)
this.CurAccount=PlayerPrefs.GetString(this.GameName.."Account",'')
this.CurSession=PlayerPrefs.GetString(this.GameName.."Session",'')
this.CurLoginWay = PlayerPrefs.GetInt(this.GameName .. "LoginWay", defaultLoginWay)
this.CurAccount = PlayerPrefs.GetString(this.GameName .. "Account", '')
this.CurSession = PlayerPrefs.GetString(this.GameName .. "Session", '')
this.isRegister = false
@ -35,7 +35,7 @@ function this.Initialize()
SDKMgr.onLoginCallback = function(loginResp)
-- 获取登录信息
local result = string.split(loginResp, "#")
result[1] = tonumber(result[1])
result[1] = tonumber(result[1])
if result[1] == SDK_RESULT.SUCCESS then
AppConst.SdkId = result[2] or ""
AppConst.OpenId = result[2] or ""
@ -69,6 +69,7 @@ function this.Initialize()
-- 防沉迷检测
this.CheckRealName()
end)
SubmitExtraData({ type = SDKSubMitType.TYPE_RESOURCE_DOWNLOAD_BEGAIN })
else
local errCode = result[2]
if not errCode then
@ -80,7 +81,7 @@ function this.Initialize()
end
SDKMgr.onSwitchAccountCallback = function(resp)
Log("onSwitchAccountCallback::"..resp)
Log("onSwitchAccountCallback::" .. resp)
local result = string.split(resp, "#")
if tonumber(result[1]) == SDK_RESULT.SUCCESS then
--ThinkingAnalyticsManager.Track("change_account")
@ -89,7 +90,7 @@ function this.Initialize()
end
SDKMgr.onLogoutCallback = function(resp)
Log("onLogoutCallback::"..resp)
Log("onLogoutCallback::" .. resp)
local result = string.split(resp, "#")
if LoginManager.IsLogin and tonumber(result[1]) == SDK_RESULT.SUCCESS then
--AnalyticsManager.Track("quit_account")
@ -99,7 +100,8 @@ function this.Initialize()
Game.GlobalEvent:DispatchEvent(GameEvent.LoginSuccess.OnLogout)
end
end
--
--
local _Time
function this.CheckRealName()
local appId = PackageManager.GetAppID()
@ -146,7 +148,10 @@ function this.CheckUserId(extData, func)
if extData then
local context = json.decode(extData)
if context then
HttpManager:SendGetHttp(LoginRoot_Url .. "jl_loginserver/getKTGameUserInfo?gid=".. context.gid .. "&pid=".. context.pid .. "&access_token=" .. AppConst.TokenStr,
HttpManager:SendGetHttp(
LoginRoot_Url ..
"jl_loginserver/getKTGameUserInfo?gid=" ..
context.gid .. "&pid=" .. context.pid .. "&access_token=" .. AppConst.TokenStr,
function(str)
if str then
Log(str)
@ -154,7 +159,7 @@ function this.CheckUserId(extData, func)
AppConst.OpenId = data.openid
end
-- 完成
if func then
if func then
func()
end
end)
@ -163,7 +168,7 @@ function this.CheckUserId(extData, func)
end
end
-- 不符合条件
if func then
if func then
func()
end
end
@ -196,98 +201,100 @@ function this.SaveLoginInfo(user, pw)
PlayerPrefs.SetString(this.GameName.."Account", this.CurAccount);
PlayerPrefs.SetString(this.GameName.."Session", this.CurSession);
PlayerPrefs.Save();
]]--
]]
--
--sdkMgr:SaveSession(this.CurLoginWay)
end
function this.RequestRegist(name, pw, call)
local sign = Util.MD5Encrypt(string.format("%s%s%s", name,
pw, this.sign))
pw, this.sign))
RequestPanel.Show(Language[11708])
HttpManager:SendGetHttp(LoginRoot_Url .. "jl_loginserver/registerUser?userName=".. name .. "&password=".. pw .."&repeat=".. pw .. "&sign=" .. sign,
function(str)
RequestPanel.Hide()
if str == nil then
return
end
--Log(str)
local json = require 'cjson'
local data = json.decode(str)
HttpManager:SendGetHttp(
LoginRoot_Url ..
"jl_loginserver/registerUser?userName=" .. name .. "&password=" .. pw .. "&repeat=" .. pw .. "&sign=" .. sign,
function(str)
RequestPanel.Hide()
if str == nil then
return
end
--Log(str)
local json = require 'cjson'
local data = json.decode(str)
if data.code==1 then
PopupTipPanel.ShowTip(Language[11709]..name.." "..data.msg)
else
--PopupTipPanel.ShowTip("账号:"..name.." "..data.msg)
end
if call then
call(data.code)
end
end,nil,nil,nil)
if data.code == 1 then
PopupTipPanel.ShowTip(Language[11709] .. name .. " " .. data.msg)
else
--PopupTipPanel.ShowTip("账号:"..name.." "..data.msg)
end
if call then
call(data.code)
end
end, nil, nil, nil)
end
function this.RequestUser(name, pw, call)
local sign = Util.MD5Encrypt(string.format("%s%s%s", name,
pw, this.sign))
pw, this.sign))
RequestPanel.Show(Language[11710])
HttpManager:SendGetHttp(LoginRoot_Url .. "jl_loginserver/userLogin?userName=".. name .. "&password=".. pw .. "&sign=" .. sign, function(str)
RequestPanel.Hide()
if str == nil then
return
end
--Log(str)
local json = require 'cjson'
local data = json.decode(str)
HttpManager:SendGetHttp(
LoginRoot_Url .. "jl_loginserver/userLogin?userName=" .. name .. "&password=" .. pw .. "&sign=" .. sign,
function(str)
RequestPanel.Hide()
if str == nil then
return
end
--Log(str)
local json = require 'cjson'
local data = json.decode(str)
--Log("data.code:"..data.code)
--Log("data.msg:"..data.msg)
--Log("data.code:"..data.code)
--Log("data.msg:"..data.msg)
if data.code==0 then
--Log("data.parms.openId:"..data.parms.openId)
--Log("data.parms.token:"..data.parms.token)
if data.code == 0 then
--Log("data.parms.openId:"..data.parms.openId)
--Log("data.parms.token:"..data.parms.token)
--PopupTipPanel.ShowTip(data.msg)
this.openId = data.parms.openId
this.token = data.parms.token
--场景转换
else
PopupTipPanel.ShowTip(data.msg)
end
if call then
call(data.code)
end
end,nil,nil,nil)
--PopupTipPanel.ShowTip(data.msg)
this.openId = data.parms.openId
this.token = data.parms.token
--场景转换
else
PopupTipPanel.ShowTip(data.msg)
end
if call then
call(data.code)
end
end, nil, nil, nil)
end
-- 判断服务器状态是否可进入
function this.IsServerStateEnterable(state)
if not state then
return
return
end
if state ~= ServerStateDef.Fluency
and state ~= ServerStateDef.Congestion
and state ~= ServerStateDef.Full then
if state ~= ServerStateDef.Fluency
and state ~= ServerStateDef.Congestion
and state ~= ServerStateDef.Full then
return false
end
return true
end
-- 初始化包信息
function this.InitPackInfo()
local LoginRoot_Url = ServerConfigManager.GetVersionInfo("serverUrl")
local LoginRoot_Channel = ServerConfigManager.GetVersionInfo("channel")
local LoginRoot_UserChannel = ServerConfigManager.GetSettingValue(ServerConfigManager.SettingConfig.USER_CHANNEL) or ""
local LoginRoot_UserChannel = ServerConfigManager.GetSettingValue(ServerConfigManager.SettingConfig.USER_CHANNEL) or
""
local ChannelID = LoginRoot_UserChannel == "" and LoginRoot_Channel or LoginRoot_UserChannel
local packId = PackageManager.GetPackageID()
if packId then
ChannelID = ChannelID.. packId
ChannelID = ChannelID .. packId
end
HttpManager:SendGetHttp(LoginRoot_Url.."jl_loginserver/getChannelInfo?ccId="..ChannelID, function(str)
HttpManager:SendGetHttp(LoginRoot_Url .. "jl_loginserver/getChannelInfo?ccId=" .. ChannelID, function(str)
if str == "" or str == "null" or string.find(str, "html") then
LogWarn("获取到的数据是空值,请检查!")
else
@ -298,5 +305,4 @@ function this.InitPackInfo()
end)
end
return this
return this

View File

@ -302,6 +302,7 @@ function this:OnOpen(...)
-- 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)
--设置背景
SubmitExtraData({ type = SDKSubMitType.TYPE_RESOURCE_DOWNLOAD_SUCCESS })
PackageManager.SetVideo(this.video, this.bg)
if AppConst.Code ~= "" then
MsgPanel.ShowOne(GetLanguageStrById(AppConst.Code))