问题修复
This commit is contained in:
@@ -5,28 +5,31 @@
|
||||
<view class="u-flex u-flex-between">
|
||||
<view class="">
|
||||
<text class="color-333 font-16">查看优惠券</text>
|
||||
<text class="color-666 font-14">({{list.length}})张</text>
|
||||
<text class="color-666 font-14">({{couponList }})张</text>
|
||||
</view>
|
||||
<up-icon name="close-circle" color="#666" size="28rpx" @click="close"></up-icon>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" class="u-m-t-42" style="max-height: 50vh;">
|
||||
<view class="list">
|
||||
<view class="item u-flex u-m-b-32 u-col-center" v-for="(item,index) in list" :key="index">
|
||||
<view class="left" style="min-width: 162rpx;">
|
||||
<couponIcon :item="item.coupon" />
|
||||
<!-- <view class="red font-16 font-700" style="width: 122rpx;">第二件半价券</view> -->
|
||||
<view></view>
|
||||
</view>
|
||||
|
||||
<view class="u-flex-1 u-p-l-26 ">
|
||||
<view class="color-333 font-16">
|
||||
{{item.coupon.title }}
|
||||
<view v-for="(item,index) in list" :key="index">
|
||||
<view class="item u-flex u-m-b-32 u-col-center" v-for="(item1,index1) in item.num">
|
||||
<view class="left" style="min-width: 162rpx;">
|
||||
<couponIcon :item="item.coupon" />
|
||||
<!-- <view class="red font-16 font-700" style="width: 122rpx;">第二件半价券</view> -->
|
||||
<view></view>
|
||||
</view>
|
||||
<view class="color-999 font-12 u-m-t-8">
|
||||
有效期至:{{item.coupon.validEndTime||''}}
|
||||
|
||||
<view class="u-flex-1 u-p-l-26 ">
|
||||
<view class="color-333 font-16">
|
||||
{{item.coupon.title }}
|
||||
</view>
|
||||
<view class="color-999 font-12 u-m-t-8">
|
||||
有效期至:{{item.coupon.validEndTime||''}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
@@ -38,6 +41,9 @@
|
||||
<script setup>
|
||||
import dayjs from 'dayjs';
|
||||
import couponIcon from './coupon-icon.vue'
|
||||
import {
|
||||
computed
|
||||
} from 'vue';
|
||||
const props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
@@ -51,6 +57,11 @@
|
||||
}
|
||||
})
|
||||
const show = defineModel(false)
|
||||
const couponList = computed(() => {
|
||||
return props.list.reduce((prve, cur) => {
|
||||
return prve + cur.num
|
||||
}, 0)
|
||||
})
|
||||
|
||||
function close() {
|
||||
show.value = false
|
||||
|
||||
Reference in New Issue
Block a user