Fix(商品详情):[#1930优惠券换行问题
This commit is contained in:
@@ -59,6 +59,9 @@
|
|||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
.value2 {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.red {
|
.red {
|
||||||
color: #FF564A;
|
color: #FF564A;
|
||||||
|
|||||||
@@ -154,19 +154,20 @@
|
|||||||
|
|
||||||
<!-- v6服务项目开始 -->
|
<!-- v6服务项目开始 -->
|
||||||
<view class="service-section goods-section" v-if="storeInfo && storeInfo.isTickets!=1">
|
<view class="service-section goods-section" v-if="storeInfo && storeInfo.isTickets!=1">
|
||||||
<view class="cell flex jc-between ai-center" @click="changeCoupons()" v-if="couponList['usable'].length>0">
|
<view
|
||||||
<view>
|
v-if="couponListLimit2ToShow.length > 0"
|
||||||
<template v-for="(item, index) in couponList.usable">
|
class="cell flex jc-between ai-center"
|
||||||
<text
|
@click="changeCoupons()"
|
||||||
v-if="index < 2"
|
>
|
||||||
:key="index"
|
<view
|
||||||
class="coupon-label tc"
|
v-for="(item, index) in couponListLimit2ToShow"
|
||||||
>
|
:key="index"
|
||||||
{{ item.couponTitle }}
|
class="coupon-label tc"
|
||||||
</text>
|
>
|
||||||
</template>
|
{{ item.couponTitle }}
|
||||||
</view>
|
</view>
|
||||||
<view class="value">优惠详情
|
<view class="value value2">
|
||||||
|
优惠详情
|
||||||
<uni-icons type="right" size="13" color="#707070"></uni-icons>
|
<uni-icons type="right" size="13" color="#707070"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -507,8 +508,9 @@ export default {
|
|||||||
show: false,
|
show: false,
|
||||||
uniqueId: null,
|
uniqueId: null,
|
||||||
isFavorite: false,
|
isFavorite: false,
|
||||||
pageKeyId: ''
|
pageKeyId: '',
|
||||||
};
|
couponListLimit2ToShow: []
|
||||||
|
}
|
||||||
},
|
},
|
||||||
computed: mapGetters(["isLogin", "location", "userInfo"]),
|
computed: mapGetters(["isLogin", "location", "userInfo"]),
|
||||||
onShareAppMessage() {
|
onShareAppMessage() {
|
||||||
@@ -917,6 +919,22 @@ export default {
|
|||||||
|
|
||||||
// data.couponList['unusable']?.map(item => item.status = 2)
|
// data.couponList['unusable']?.map(item => item.status = 2)
|
||||||
this.$set(this, 'couponList', data.couponList)
|
this.$set(this, 'couponList', data.couponList)
|
||||||
|
const usableList = data.couponList.usable
|
||||||
|
if (usableList.length > 0) {
|
||||||
|
const tempType = {}
|
||||||
|
const tempTypeArr = []
|
||||||
|
usableList.map(usableItem => {
|
||||||
|
if (!tempType[usableItem.type + '']) {
|
||||||
|
tempType[usableItem.type + ''] = 1
|
||||||
|
tempTypeArr.push(usableItem)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (tempTypeArr.length >= 2) {
|
||||||
|
this.couponListLimit2ToShow = [tempTypeArr[0], tempTypeArr[1]]
|
||||||
|
} else {
|
||||||
|
this.couponListLimit2ToShow = [tempTypeArr[0]]
|
||||||
|
}
|
||||||
|
}
|
||||||
this.$set(this, 'replyCount', data.replyCount)
|
this.$set(this, 'replyCount', data.replyCount)
|
||||||
this.$set(this, 'replyChance', data.replyChance)
|
this.$set(this, 'replyChance', data.replyChance)
|
||||||
this.reply = data.reply ? [data.reply] : []
|
this.reply = data.reply ? [data.reply] : []
|
||||||
|
|||||||
Reference in New Issue
Block a user