Commit 110a1488 authored by spc's avatar spc

fixed

parent f27bd1d3
...@@ -285,22 +285,22 @@ export default { ...@@ -285,22 +285,22 @@ export default {
exchangeCount: data.stock || 0, exchangeCount: data.stock || 0,
memberLevel: this.getMemberLevel(data.state), memberLevel: this.getMemberLevel(data.state),
limit: data.groupCount ? data.groupCount.toString() : '1', limit: data.groupCount ? data.groupCount.toString() : '1',
name: data.name || '', name: data.goodsName || data.name || '',
couponName: data.name || '', couponName: data.goodsName || data.name || '',
expireDate: data.expireTime && data.expireTime.length > 0 ? data.expireTime[0] : '', expireDate: data.expireTime && data.expireTime.length > 0 ? data.expireTime[0] : '',
remainDays: this.calculateRemainDays(data.expireTime), remainDays: this.calculateRemainDays(data.expireTime),
isSoldOut: data.stock <= 0, isSoldOut: data.stock <= 0,
isInsufficientCredits: data.button_text.includes('积分不足'), isInsufficientCredits: data.buttonText && data.buttonText.includes('积分不足'),
goodsType: data.type || '', goodsType: data.goodsType || data.type || '',
goodsContent: data.content || '', goodsContent: data.goodsContent || data.content || '',
goodsDeclare: data.goodsDeclare || '', goodsDeclare: data.goodsDeclare || '',
goodsIcon: data.icon || '', goodsIcon: data.goodsIcon || data.icon || '',
goodsImage: data.image || [], goodsImage: data.goodsImage || data.image || [],
creditsType: data.creditsType || '', creditsType: data.creditsType || '',
creditsTypeName: data.creditsTypeName || '', creditsTypeName: data.creditsTypeName || '',
priceMarket: data.price_market || '', priceMarket: data.priceMarket || data.price_market || '',
priceSale: data.price_sale || '', priceSale: data.priceSale || data.price_sale || '',
buttonText: data.button_text || '立即兑换', buttonText: data.buttonText || data.button_text || '立即兑换',
address: data.address || null, address: data.address || null,
phone: data.phone || '', phone: data.phone || '',
stores: data.stores || [], stores: data.stores || [],
...@@ -435,6 +435,12 @@ export default { ...@@ -435,6 +435,12 @@ export default {
// 获取按钮文本 // 获取按钮文本
getButtonText() { getButtonText() {
// 优先使用API返回的按钮文本
if (this.goodsData.buttonText && this.goodsData.buttonText !== '立即兑换') {
return this.goodsData.buttonText;
}
// 根据状态返回对应文本
switch (this.exchangeStatus) { switch (this.exchangeStatus) {
case 'soldOut': case 'soldOut':
return '已抢完'; return '已抢完';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment