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