客服
This commit is contained in:
parent
50046726cf
commit
2c2e67caee
@ -36,4 +36,50 @@ function GameSettingManager:onExchangeCdkey(result)
|
|||||||
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.CDKEY_FINISH, result.status)
|
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.CDKEY_FINISH, result.status)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function GameSettingManager:showSupport(objectId)
|
||||||
|
if not objectId then
|
||||||
|
objectId = DataManager.PlayerData:getAcountId() or ""
|
||||||
|
end
|
||||||
|
local url = "https://perfeggs.aihelp.net/webchatv3/#/appKey/perfeggs_app_b666f90daa2a40edab1e043f72869374/domain/perfeggs.aihelp.net/appId/perfeggs_platform_4f3578be7390d5e8264ddee5002e76ac/?mode=showAllFAQSections&showConversationMoment=1&conversationIntent=1&alwaysShowHumanSupportButtonInBotPage=true&sdkVersion=3.2.0"
|
||||||
|
local platform = "Android"
|
||||||
|
if Platform:isIosPlatform() then
|
||||||
|
platform = "IOS"
|
||||||
|
end
|
||||||
|
-- 繁体,日语和韩语跳对应的语言,其他语言跳英文
|
||||||
|
local language = "&language="
|
||||||
|
local currLanguage = I18N:getCurLanguage()
|
||||||
|
if currLanguage == GConst.LANGUAGE.CHINESE_TC then
|
||||||
|
language = language .. "zh-TW"
|
||||||
|
elseif currLanguage == GConst.LANGUAGE.CHINESE then
|
||||||
|
language = language .. "zh-CN"
|
||||||
|
elseif currLanguage == GConst.LANGUAGE.JAPANESE then
|
||||||
|
language = language .. "ja"
|
||||||
|
elseif currLanguage == GConst.LANGUAGE.KOREAN then
|
||||||
|
language = language .. "ko"
|
||||||
|
else
|
||||||
|
language = language .. "en"
|
||||||
|
end
|
||||||
|
local userId = string.format('&userId=%s', objectId)
|
||||||
|
-- local userName = string.format('&userName=%s',
|
||||||
|
-- DataManager.PlayerData:getName() -- 用户名
|
||||||
|
-- )
|
||||||
|
local applicationIdentifier = string.format('&applicationIdentifier=%s', Platform:getIdentifier())
|
||||||
|
local applicationVersion = string.format('&applicationVersion=%s', Platform:getClientVersion())
|
||||||
|
local applicationName = string.format('&applicationName=Knights Combo')
|
||||||
|
local deviceModel = string.format('&deviceModel=%s', DeviceHelper:getDeviceModel())
|
||||||
|
local osVersion = string.format('&osVersion=%s',DeviceHelper:getOSVersion())
|
||||||
|
local networkType = string.format('&networkType=%s',DeviceHelper:getNetworkType())
|
||||||
|
local customData = string.format('&customData={"UserID":"%s","GameName":"Knights Combo","GameVersion":"%s","DeviceModel":"%s","Platform":"%s","OSversion":"%s","ApplicationIdentifier":"%s","NetworkType":"%s"}',
|
||||||
|
objectId, -- 用户名
|
||||||
|
Platform:getClientVersion(), --应用版本
|
||||||
|
DeviceHelper:getDeviceModel(), -- 机型
|
||||||
|
platform, -- 安卓还是苹果
|
||||||
|
DeviceHelper:getOSVersion(), -- OS 版本
|
||||||
|
Platform:getIdentifier(), -- 应用包名
|
||||||
|
DeviceHelper:getNetworkType() -- 网络类型
|
||||||
|
)
|
||||||
|
local tempStr = applicationIdentifier .. applicationVersion .. applicationName .. deviceModel .. osVersion .. networkType
|
||||||
|
GFunc.openUrl(CS.System.Uri(url .. language .. userId .. tempStr .. customData).AbsoluteUri)
|
||||||
|
end
|
||||||
|
|
||||||
return GameSettingManager
|
return GameSettingManager
|
||||||
@ -43,6 +43,7 @@ function GameSettingUI:_display()
|
|||||||
|
|
||||||
self:initLoginBtn()
|
self:initLoginBtn()
|
||||||
self:initCDKeyBtn()
|
self:initCDKeyBtn()
|
||||||
|
self:initSupportBtn()
|
||||||
self:refreshMusic()
|
self:refreshMusic()
|
||||||
self:refreshVoice()
|
self:refreshVoice()
|
||||||
end
|
end
|
||||||
@ -125,12 +126,21 @@ function GameSettingUI:initAppleLoginBtn()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function GameSettingUI:initCDKeyBtn()
|
function GameSettingUI:initCDKeyBtn()
|
||||||
self.uiMap["game_setting_ui.bg.cdkey_btn.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.CDKEY_NAME))
|
self.uiMap["game_setting_ui.bg.cdkey_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.CDKEY_NAME))
|
||||||
|
self.uiMap["game_setting_ui.bg.cdkey_btn.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.CDKEY_EXCHANGE))
|
||||||
self.uiMap["game_setting_ui.bg.cdkey_btn"]:addClickListener(function()
|
self.uiMap["game_setting_ui.bg.cdkey_btn"]:addClickListener(function()
|
||||||
ModuleManager.GameSettingManager:showCDKeyUI()
|
ModuleManager.GameSettingManager:showCDKeyUI()
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function GameSettingUI:initSupportBtn()
|
||||||
|
self.uiMap["game_setting_ui.bg.support_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SUPPORT_DESC_1))
|
||||||
|
self.uiMap["game_setting_ui.bg.support_btn.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.SUPPORT_DESC_2))
|
||||||
|
self.uiMap["game_setting_ui.bg.support_btn"]:addClickListener(function()
|
||||||
|
ModuleManager.GameSettingManager:showSupport()
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
function GameSettingUI:_addListeners()
|
function GameSettingUI:_addListeners()
|
||||||
self.uiMap["game_setting_ui.bg.close_btn"]:addClickListener(function()
|
self.uiMap["game_setting_ui.bg.close_btn"]:addClickListener(function()
|
||||||
self:closeUI()
|
self:closeUI()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user