兑换信息补充

This commit is contained in:
sk 2024-08-12 16:37:08 +08:00
parent dc631f4334
commit ff086c3de3
1 changed files with 9 additions and 0 deletions

View File

@ -108,6 +108,7 @@ type ExchangeShopInfo struct {
TelCharge int32 //话费
ShopType int32 //商品类型
TelData []*shop.TelChargeData //运营商配置
Items []*shop.ItemInfo //道具
}
func (this *ShopMgr) ModuleName() string {
@ -777,6 +778,13 @@ func (this *ShopMgr) GetExchangeData(platform string, id int32) *ExchangeShopInf
Url: info.Url,
})
}
var items []*shop.ItemInfo
for _, v := range data.GetItems() {
items = append(items, &shop.ItemInfo{
ItemId: v.GetItemId(),
ItemNum: v.GetItemNum(),
})
}
return &ExchangeShopInfo{
Id: data.Id,
Picture: data.Picture,
@ -788,6 +796,7 @@ func (this *ShopMgr) GetExchangeData(platform string, id int32) *ExchangeShopInf
TelCharge: data.TelCharge,
ShopType: data.ShopType,
TelData: telData,
Items: items,
}
}
}