充值商品价格改为按配置显示
parent
2eeb381608
commit
5a89f52577
|
@ -109,7 +109,7 @@ function this.SingleDataShow(pre,value)
|
|||
local shows = shopItemData.RewardShow
|
||||
buyInfo:GetComponent("Text").text =Language[11454].. shopItemData.Limit-boughtNum.."/".. shopItemData.Limit..Language[10054] ..")"
|
||||
if shopItemData.Limit - boughtNum > 0 then
|
||||
price.text = string.format(MoneyUtil.GetMoneyUnitName(), shopItemData.Price)--shopItemData.Price..MoneyUtil.GetMoneyUnitName()
|
||||
price.text = string.format(MoneyUtil.GetMoneyUnitName(), MoneyUtil.GetMoney(shopItemData.Price))--shopItemData.Price..MoneyUtil.GetMoneyUnitName()
|
||||
btnBuy:GetComponent("Button").enabled = true
|
||||
Util.SetGray(btnBuy, false)
|
||||
else
|
||||
|
|
|
@ -108,7 +108,7 @@ function this.SingleDataShow(pre,value)
|
|||
local shows = shopItemData.RewardShow
|
||||
buyInfo:GetComponent("Text").text =Language[11454].. shopItemData.Limit-boughtNum.."/".. shopItemData.Limit..Language[10054] ..")"
|
||||
if shopItemData.Limit - boughtNum > 0 then
|
||||
price.text = string.format(MoneyUtil.GetMoneyUnitName(), shopItemData.Price)--shopItemData.Price..MoneyUtil.GetMoneyUnitName()
|
||||
price.text = string.format(MoneyUtil.GetMoneyUnitName(), MoneyUtil.GetMoney(shopItemData.Price))--shopItemData.Price..MoneyUtil.GetMoneyUnitName()
|
||||
btnBuy:GetComponent("Button").enabled = true
|
||||
Util.SetGray(btnBuy, false)
|
||||
else
|
||||
|
|
|
@ -87,13 +87,13 @@ function this.SingleDataShow(go, data)
|
|||
LimitText.text = shopItemData.Limit
|
||||
buyInfo:SetActive( shopItemData.IsDiscount ~= 0 )
|
||||
if shopItemData.IsDiscount and shopItemData.IsDiscount > 0 then
|
||||
buyInfo:GetComponent("Text").text = Language[10537]..string.format(MoneyUtil.GetMoneyUnitName(), shopItemData.Price / (shopItemData.IsDiscount/10))--shopItemData.Price / (shopItemData.IsDiscount/10)..MoneyUtil.GetMoneyUnitName()
|
||||
buyInfo:GetComponent("Text").text = Language[10537]..string.format(MoneyUtil.GetMoneyUnitName(), MoneyUtil.GetMoney(shopItemData.Price) / (shopItemData.IsDiscount/10))--shopItemData.Price / (shopItemData.IsDiscount/10)..MoneyUtil.GetMoneyUnitName()
|
||||
end
|
||||
if goodData then
|
||||
endTime = goodData.endTime
|
||||
end
|
||||
if shopItemData.Limit - boughtNum > 0 then
|
||||
price.text = string.format(MoneyUtil.GetMoneyUnitName(), shopItemData.Price)--..MoneyUtil.GetMoneyUnitName()
|
||||
price.text = string.format(MoneyUtil.GetMoneyUnitName(), MoneyUtil.GetMoney(shopItemData.Price))--..MoneyUtil.GetMoneyUnitName()
|
||||
btnBuy:GetComponent("Button").enabled = true
|
||||
Util.SetGray(btnBuy, false)
|
||||
else
|
||||
|
|
|
@ -198,7 +198,7 @@ function HeroStarFeedPage:SetGfitShow()
|
|||
_ItemViewList[i].gameObject:SetActive(true)
|
||||
end
|
||||
self.times.text = Language[10535]..curGiftList[curIndex].dynamicBuyTimes..Language[10054]
|
||||
self.price.text = string.format(MoneyUtil.GetMoneyUnitName(), RechargeConfig[curGiftId].Price)--..MoneyUtil.GetMoneyUnitName()
|
||||
self.price.text = string.format(MoneyUtil.GetMoneyUnitName(), MoneyUtil.GetMoney(RechargeConfig[curGiftId].Price))--..MoneyUtil.GetMoneyUnitName()
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ function WeekCard:WeekCardShow()
|
|||
else
|
||||
this.weekCardBuyBtn:GetComponent("Button").enabled=true
|
||||
this.weekCardBuyNum.text = Language[10556]..weekCardData.buyTimes.."/"..weekConFig.Limit
|
||||
Util.GetGameObject(self.weekCardBuyBtn.gameObject, "Text"):GetComponent("Text").text = "¥"..weekConFig.Price
|
||||
Util.GetGameObject(self.weekCardBuyBtn.gameObject, "Text"):GetComponent("Text").text = MoneyUtil.GetMoneyMark()..MoneyUtil.GetMoney(weekConFig.Price)
|
||||
end
|
||||
else
|
||||
this.weekCardBuyBtn:GetComponent("Button").enabled=false
|
||||
|
|
|
@ -82,7 +82,7 @@ function this.SetShow(root,data)
|
|||
stateBtn:GetComponent("Button").interactable=data.server.buyTimes< data.native.Limit
|
||||
if data.server.buyTimes< data.native.Limit then--未购买
|
||||
stateBtnImage.sprite=Util.LoadSprite(StateImageName[1])
|
||||
stateBtnText.text=string.format(MoneyUtil.GetMoneyUnitName(), data.native.Price)--..MoneyUtil.GetMoneyUnitName()
|
||||
stateBtnText.text=string.format(MoneyUtil.GetMoneyUnitName(), MoneyUtil.GetMoney(data.native.Price))--..MoneyUtil.GetMoneyUnitName()
|
||||
else
|
||||
Util.SetGray(stateBtn,true)
|
||||
stateBtnText.text=Language[10638]
|
||||
|
|
|
@ -48,8 +48,8 @@ function this.OnShowPanelData()
|
|||
conFigData = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig,ids[1] )
|
||||
shopItemData = OperatingManager.GetGiftGoodsInfo(conFigData.Type,conFigData.Id)
|
||||
if shopItemData == nil then return end
|
||||
this.oldPurchaseText.text = Language[10537]..string.format(MoneyUtil.GetMoneyUnitName(), conFigData.Price/(conFigData.IsDiscount/10))--..MoneyUtil.GetMoneyUnitName()
|
||||
this.curPurchaseText.text = Language[10640]..string.format(MoneyUtil.GetMoneyUnitName(), conFigData.Price)--..MoneyUtil.GetMoneyUnitName()
|
||||
this.oldPurchaseText.text = Language[10537]..string.format(MoneyUtil.GetMoneyUnitName(), MoneyUtil.GetMoney(conFigData.Price)/(conFigData.IsDiscount/10))--..MoneyUtil.GetMoneyUnitName()
|
||||
this.curPurchaseText.text = Language[10640]..string.format(MoneyUtil.GetMoneyUnitName(), MoneyUtil.GetMoney(conFigData.Price))--..MoneyUtil.GetMoneyUnitName()
|
||||
this.buyNumText.text = Language[10556]..shopItemData.buyTimes.."/"..conFigData.Limit
|
||||
if shopItemData.buyTimes <= 0 then
|
||||
this.buyText.text = Language[10641]
|
||||
|
|
|
@ -60,11 +60,11 @@ function this.OnShowPanelData(i)
|
|||
local itemRewardParent=Util.GetGameObject(preGrid[i],"itemRewardParent")
|
||||
local buyBtn=Util.GetGameObject(preGrid[i],"BuyBtn")
|
||||
local buyNumText=Util.GetGameObject(preGrid[i],"buyNumText"):GetComponent("Text")
|
||||
oldPurchaseText.text = Language[10643]..string.format(MoneyUtil.GetMoneyUnitName(), conFigData.Price/(conFigData.IsDiscount/10))--..MoneyUtil.GetMoneyUnitName()
|
||||
oldPurchaseText.text = Language[10643]..string.format(MoneyUtil.GetMoneyUnitName(), MoneyUtil.GetMoney(conFigData.Price)/(conFigData.IsDiscount/10))--..MoneyUtil.GetMoneyUnitName()
|
||||
buyNumText.text = Language[10556]..shopItemData.buyTimes.."/"..conFigData.Limit
|
||||
-- Log("购买次数 "..shopItemData.buyTimes)
|
||||
if shopItemData.buyTimes <= 0 then
|
||||
curPurchaseText.text = string.format(MoneyUtil.GetMoneyUnitName(), conFigData.Price)--..MoneyUtil.GetMoneyUnitName()
|
||||
curPurchaseText.text = string.format(MoneyUtil.GetMoneyUnitName(), MoneyUtil.GetMoney(conFigData.Price))--..MoneyUtil.GetMoneyUnitName()
|
||||
buyBtn:GetComponent("Button").enabled = true
|
||||
Util.SetGray(buyBtn, false)
|
||||
else
|
||||
|
|
|
@ -172,7 +172,7 @@ function this.SetInfo(id)
|
|||
|
||||
this.sendBtn:GetComponent("Button").interactable=surplusNum>0
|
||||
Util.SetGray(this.sendBtn,surplusNum<1)
|
||||
this.sendBtnText.text=string.format(MoneyUtil.GetMoneyUnitName(),recharge.Price)..Language[11062]
|
||||
this.sendBtnText.text=string.format(MoneyUtil.GetMoneyUnitName(),MoneyUtil.GetMoney(recharge.Price))..Language[11062]
|
||||
|
||||
--发红包按钮
|
||||
Util.AddOnceClick(this.sendBtn,function()
|
||||
|
|
|
@ -399,7 +399,7 @@ function GiftPackPage:RefreshShowData(item, data, type, DataTypeIndex)
|
|||
boughtNum = OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, data.goodsId)
|
||||
limitNum = shopItemData.Limit
|
||||
--limitNum = OperatingManager.GetLeftBuyTime(GoodsTypeDef.DirectPurchaseGift,data.goodsId)
|
||||
costId, finalNum, oriCostNum = nil,shopItemData.Price,nil
|
||||
costId, finalNum, oriCostNum = nil,MoneyUtil.GetMoney(shopItemData.Price),nil
|
||||
tipImage:SetActive(type == 4)
|
||||
if type == 4 then
|
||||
tipImageText.text = Language[11452]
|
||||
|
@ -455,7 +455,7 @@ function GiftPackPage:RefreshShowData(item, data, type, DataTypeIndex)
|
|||
else
|
||||
str=" "
|
||||
end
|
||||
price.text = string.format(MoneyUtil.GetMoneyUnitName(),finalNum)..str
|
||||
price.text = string.format(MoneyUtil.GetMoneyUnitName(),MoneyUtil.GetMoney(finalNum))..str
|
||||
else
|
||||
local str=""
|
||||
local index= string.len(tostring(finalNum))
|
||||
|
@ -467,7 +467,7 @@ function GiftPackPage:RefreshShowData(item, data, type, DataTypeIndex)
|
|||
str=" "
|
||||
end
|
||||
icon:SetActive(false)
|
||||
price.text = string.format(MoneyUtil.GetMoneyUnitName(),finalNum)..str--..Language[11453]
|
||||
price.text = string.format(MoneyUtil.GetMoneyUnitName(),MoneyUtil.GetMoney(finalNum))..str--..Language[11453]
|
||||
end
|
||||
buyInfo.text = Language[11454]..limitNum - boughtNum .. "/" .. limitNum..Language[11455] --limitNum == -1 and "" or limitNum - boughtNum .. "/" .. limitNum
|
||||
else
|
||||
|
|
|
@ -341,7 +341,7 @@ function this.GetGiftShowData()
|
|||
local goodsId = staticData[i].Id
|
||||
local data = {}
|
||||
data.rewardData = staticData[i].data.RewardShow
|
||||
data.price = staticData[i].data.Price
|
||||
data.price = MoneyUtil.GetMoney(staticData[i].data.Price)
|
||||
data.id = goodsId
|
||||
data.name = staticData[i].data.Name
|
||||
local serData = this.GetGiftGoodsInfo(GoodsTypeDef.DirectPurchaseGift, goodsId)
|
||||
|
|
|
@ -146,7 +146,7 @@ function WeekMonthGiftPackPage:RefreshShowData(item, data)
|
|||
Util.SetGray(btnBuy,not isCanBuy)
|
||||
icon:GetComponent("Image").enabled=isCanBuy
|
||||
if isCanBuy then
|
||||
price.text = string.format(MoneyUtil.GetMoneyUnitName(), finalNum)--..MoneyUtil.GetMoneyUnitName()
|
||||
price.text = string.format(MoneyUtil.GetMoneyUnitName(), MoneyUtil.GetMoney(finalNum))--..MoneyUtil.GetMoneyUnitName()
|
||||
buyInfo.text = Language[11454]..limitNum - boughtNum .. "/" .. limitNum..Language[11455] --limitNum == -1 and "" or limitNum - boughtNum .. "/" .. limitNum
|
||||
else
|
||||
price.alignment="MiddleCenter"
|
||||
|
|
|
@ -411,7 +411,7 @@ function GiftView:RefreshShowData(item, data, buyType, DataTypeIndex)
|
|||
name.text = shopItemData.Name
|
||||
boughtNum = OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, data.goodsId)
|
||||
limitNum = shopItemData.Limit
|
||||
costId, finalNum, oriCostNum = nil,shopItemData.Price,nil
|
||||
costId, finalNum, oriCostNum = nil, MoneyUtil.GetMoney(shopItemData.Price), nil
|
||||
tipImage:SetActive(isPrivilegeGift)
|
||||
if isPrivilegeGift then
|
||||
if shopItemData.DailyUpdate == 7 then
|
||||
|
|
|
@ -91,7 +91,7 @@ function this:ShopItemAdapter(shopItem, itemData)
|
|||
local itemInfo = ShopManager.GetRechargeItemInfo(itemData.goodsId)
|
||||
icon.sprite = Util.LoadSprite(GetResourcePath(itemInfo.Resources))
|
||||
num.text = itemInfo.BaseReward[1][2]
|
||||
price.text = "¥" .. itemInfo.Price
|
||||
price.text = MoneyUtil.GetMoneyMark() .. MoneyUtil.GetMoney(itemInfo.Price)
|
||||
-- 判断首充赠送
|
||||
local curBuyCount = itemData.buyTimes
|
||||
first:SetActive(curBuyCount < 1)
|
||||
|
|
|
@ -200,7 +200,7 @@ function this:SetGfitShow(rechargeData)
|
|||
_ItemViewList[i].gameObject:SetActive(true)
|
||||
end
|
||||
this.times.text = Language[10535]..rechargeData.dynamicBuyTimes..Language[10054]
|
||||
this.price.text = string.format(MoneyUtil.GetMoneyUnitName(), RechargeConfig[curGiftId].Price)--..MoneyUtil.GetMoneyUnitName()
|
||||
this.price.text = string.format(MoneyUtil.GetMoneyUnitName(), MoneyUtil.GetMoney(RechargeConfig[curGiftId].Price))--..MoneyUtil.GetMoneyUnitName()
|
||||
--this.oriPrice.gameObject:SetActive(activityType[curType].price)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue