百宝商会文字错乱修改

dev_chengFeng
jiaoyangna 2021-07-07 11:28:50 +08:00
parent 05ef24c89c
commit 7aa590621c
2 changed files with 20 additions and 1 deletions

View File

@ -71,5 +71,24 @@ function this.GetMoneyUnitNameWithMoney(money)
return string.format(formater, this.GetMoney(money))
end
-- 获取货币单位名称
local _t2n2 = {
[MoneyType.RMB] = "%s\n",
[MoneyType.USD] = "$\n%s",
}
function this.GetMoneyUnitName1(mt)
if not mt then
mt = this.MT
end
if _t2n2[mt] then
return _t2n2[mt]
end
return _t2n2[MoneyType.RMB]
end
function this.GetMoneyUnitNameWithMoney1(money)
local formater = this.GetMoneyUnitName1()
return string.format(formater, this.GetMoney(money))
end
return MoneyUtil

View File

@ -201,7 +201,7 @@ function this:SetScrollPre(root,data)
itemList[i].Name = Util.GetGameObject(itemList[i].go,"Name"):GetComponent("Text")
end
local config = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig,data.Id)
title.text = string.format("\n\n%s\n\n\n\n%s",MoneyUtil.GetMoneyUnitNameWithMoney(config.Rebate),MoneyUtil.GetMoneyUnitNameWithMoney(config.Price))
title.text = string.format("\n\n%s\n\n\n\n%s",MoneyUtil.GetMoneyUnitNameWithMoney1(config.Rebate),MoneyUtil.GetMoneyUnitNameWithMoney1(config.Price))
local rewardArray = data.RewardShow
if not itemsGrid then
itemsGrid = {}