【ios】sdk登录成功之前不再关闭登录按钮,逍遥游按钮报错

dev_chengFeng
gaoxin 2021-04-21 19:28:35 +08:00
parent a6dadba241
commit dd667ae26a
2 changed files with 3 additions and 6 deletions

View File

@ -120,7 +120,6 @@ function this:BindEvent()
--SDK 登录 --SDK 登录
Util.AddClick(this.sdkLoginBtn, function() Util.AddClick(this.sdkLoginBtn, function()
this.sdkLoginBtn:SetActive(false)
this.SDKLogin() this.SDKLogin()
end) end)
@ -128,7 +127,6 @@ end
-- sdk 初始化完成回调 -- sdk 初始化完成回调
function this.OnInitSuccess() function this.OnInitSuccess()
this.sdkLoginBtn:SetActive(false)
this.SDKLogin() this.SDKLogin()
end end
@ -153,7 +151,7 @@ end
function this:OnLogout() function this:OnLogout()
if IsSDKLogin then if IsSDKLogin then
this.SetLoginPart(false) this.SetLoginPart(false)
this.sdkLoginBtn:SetActive(false) this.sdkLoginBtn:SetActive(true)
this.inputField.gameObject:SetActive(false) this.inputField.gameObject:SetActive(false)
this.UserBtn:SetActive(false) this.UserBtn:SetActive(false)
this.btnUser:SetActive(false) this.btnUser:SetActive(false)
@ -161,7 +159,6 @@ function this:OnLogout()
this.SDKLogin() this.SDKLogin()
else else
this.sdkLoginBtn:SetActive(false) this.sdkLoginBtn:SetActive(false)
local userId = PlayerPrefs.GetString(openIdkey, defaultOpenIdkey) local userId = PlayerPrefs.GetString(openIdkey, defaultOpenIdkey)
if IsDevelopLogin then if IsDevelopLogin then
this.UserBtn:SetActive(false) this.UserBtn:SetActive(false)
@ -196,7 +193,7 @@ function this:OnOpen(...)
if IsSDKLogin then if IsSDKLogin then
this.SetLoginPart(false) this.SetLoginPart(false)
this.sdkLoginBtn:SetActive(false) this.sdkLoginBtn:SetActive(true)
this.inputField.gameObject:SetActive(false) this.inputField.gameObject:SetActive(false)
this.UserBtn:SetActive(false) this.UserBtn:SetActive(false)
this.btnUser:SetActive(false) this.btnUser:SetActive(false)
@ -280,6 +277,7 @@ function this.RefreshLoginStatus(result)
if result == SDK_RESULT.SUCCESS then if result == SDK_RESULT.SUCCESS then
RequestPanel.Show(Language[11139]) RequestPanel.Show(Language[11139])
this.SetLoginPart(true) this.SetLoginPart(true)
this.sdkLoginBtn:SetActive(false)
-- 获取服务器列表 -- 获取服务器列表
this.RequestServerList(AppConst.OpenId, this.OnReceiveServerList) this.RequestServerList(AppConst.OpenId, this.OnReceiveServerList)
else else

View File

@ -318,4 +318,3 @@ function XiaoyaoHeroGetPopup:OnDestroy()
end end
return XiaoyaoHeroGetPopup return XiaoyaoHeroGetPopup
return XiaoyaoHeroGetPopup