账号相关提示
This commit is contained in:
parent
75a1352777
commit
3eee5957f6
@ -57,7 +57,7 @@ function AccountManager:bindAccount()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function AccountManager:onBindAccount(result)
|
function AccountManager:onBindAccount(result)
|
||||||
if result.err_code == GConst.ERROR_STR.SUCCESS then
|
if result.status == 0 then
|
||||||
local accountInfo = LocalData:getAccountInfo()
|
local accountInfo = LocalData:getAccountInfo()
|
||||||
local loginType = SDKManager.BF_LOGIN_TYPE.GOOGLE
|
local loginType = SDKManager.BF_LOGIN_TYPE.GOOGLE
|
||||||
if Platform:isIosPlatform() then
|
if Platform:isIosPlatform() then
|
||||||
@ -74,6 +74,12 @@ function AccountManager:onBindAccount(result)
|
|||||||
GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.BIND_ACCOUNT_SUCCESS))
|
GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.BIND_ACCOUNT_SUCCESS))
|
||||||
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.BIND_ACCOUNT_SUCCESS)
|
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.BIND_ACCOUNT_SUCCESS)
|
||||||
else -- 一些失败的提示
|
else -- 一些失败的提示
|
||||||
|
local params = {
|
||||||
|
content = I18N:getGlobalText(I18N.GlobalConst.ALREADY_BINDED_DESC),
|
||||||
|
boxType = GConst.MESSAGE_BOX_TYPE.MB_OK,
|
||||||
|
okText = I18N:getGlobalText(I18N.GlobalConst.BTN_TEXT_OK),
|
||||||
|
}
|
||||||
|
GFunc.showMessageBox(params)
|
||||||
local loginType = SDKManager.BF_LOGIN_TYPE.GOOGLE
|
local loginType = SDKManager.BF_LOGIN_TYPE.GOOGLE
|
||||||
if Platform:isIosPlatform() then
|
if Platform:isIosPlatform() then
|
||||||
loginType = SDKManager.BF_LOGIN_TYPE.APPLE
|
loginType = SDKManager.BF_LOGIN_TYPE.APPLE
|
||||||
@ -103,7 +109,7 @@ function AccountManager:changeAccount()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function AccountManager:onChangeAccount(result)
|
function AccountManager:onChangeAccount(result)
|
||||||
if result.err_code == GConst.ERROR_STR.SUCCESS then -- 目标账号存在,切换到目标账号
|
if result.status == 0 then
|
||||||
local accountInfo = LocalData:getAccountInfo()
|
local accountInfo = LocalData:getAccountInfo()
|
||||||
local loginType = SDKManager.BF_LOGIN_TYPE.GOOGLE
|
local loginType = SDKManager.BF_LOGIN_TYPE.GOOGLE
|
||||||
if Platform:isIosPlatform() then
|
if Platform:isIosPlatform() then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user