Fix(商品/订单):[#1021]商品详情页购买时选择优惠券,点击“立即购买”后已显示扣除优惠金额,但点开提交订单页面的优惠券时,优惠券未勾选
This commit is contained in:
+28
-9
@@ -1,18 +1,32 @@
|
||||
<template>
|
||||
<view class="components-coupons">
|
||||
<image class="coupons__cover" :src="data.image" mode="widthFix"/>
|
||||
|
||||
<image
|
||||
:src="data.image"
|
||||
class="coupons__cover"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<view class="coupons__section flex jc-between ai-center">
|
||||
<view>有效期至:
|
||||
<text>{{ data.endTime }}</text>
|
||||
</view>
|
||||
<view class="coupons__tag coupons__tag-expire" v-if="data.status===2">已到期</view>
|
||||
<view class="coupons__tag" @click="goGoods()" v-if="data.status===0 && !radioModel">去使用</view>
|
||||
<view
|
||||
v-if="data.status===2"
|
||||
class="coupons__tag coupons__tag-expire"
|
||||
>已到期</view>
|
||||
<view
|
||||
v-if="data.status === 0 && !radioModel"
|
||||
class="coupons__tag"
|
||||
@click="goGoods()"
|
||||
>去使用</view>
|
||||
<view @click="selectCoupon">
|
||||
<radio :value="data.id" :checked="data.checked" color="#FF564A" v-if="radioModel && data.status===0"/>
|
||||
<radio
|
||||
v-if="radioModel && data.status === 0"
|
||||
:value="data.id"
|
||||
:checked="data.checked"
|
||||
color="#FF564A"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="coupons__rules">
|
||||
<view class="coupons__rules-title" @click="changeRules()">使用规则
|
||||
<image :class="{'open':isOpen}" :src="webUrl+'/20231125220409665027.png'" mode="scaleToFill"/>
|
||||
@@ -31,7 +45,13 @@
|
||||
export default {
|
||||
name: "Coupons",
|
||||
props: {
|
||||
data: Object,
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
// 是否显示选择框
|
||||
radioModel: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
@@ -52,8 +72,7 @@ export default {
|
||||
this.isOpen = !this.isOpen
|
||||
},
|
||||
goGoods() {
|
||||
uni.switchTab({url: '/pages/home/landMark'})
|
||||
// this.$global.navToGoods(this.data.productId)
|
||||
uni.switchTab({ url: '/pages/home/landMark' })
|
||||
},
|
||||
selectCoupon() {
|
||||
if (!this.radioModel) return
|
||||
|
||||
Reference in New Issue
Block a user