From b05a84f9178894b40a1d6a601b577403d7d93c46 Mon Sep 17 00:00:00 2001
From: 陶杰 <1378534974@qq.com>
Date: 星期三, 08 一月 2025 09:09:20 +0800
Subject: [PATCH] 1.运费配置说明修改

---
 sub_pages/customer/coupon/coupon-all.vue |   59 +++++++++++++++++++++++------------------------------------
 1 files changed, 23 insertions(+), 36 deletions(-)

diff --git a/sub_pages/customer/coupon/coupon-all.vue b/sub_pages/customer/coupon/coupon-all.vue
index 0b09762..02616b6 100644
--- a/sub_pages/customer/coupon/coupon-all.vue
+++ b/sub_pages/customer/coupon/coupon-all.vue
@@ -1,26 +1,33 @@
 <template>
 	<view class="coupon-container">
 		<view class="">
-			<view v-for="(item,index) of list" :key="index" class="coupont-item all">
+			<no-data v-if="!list||list.length==0" style="width: 100%;"></no-data>
+
+			<view v-for="(item,index) of list" :key="index" class="coupont-item all" :class="[item.getYetFlag]">
 				<view class="flex container img100">
 					<view class="info-price">
-						<view class="price1">¥7.70</view>
-						<view class="price2">满¥100可用</view>
+						<view class="price1">
+							{{item.maxDiscountAmount?(`${item.maxDiscountAmount}折`):(`¥${item.couponDiscountValue}`)}}
+						</view>
+						<view class="price2">{{item.minOrderAmount?(`满¥${item.minOrderAmount}可用`):'无门槛'}}</view>
 					</view>
 					<view class="info flex1">
 						<view class="title">
-							七夕专属福利券
+							{{item.couponName||'-'}}
 						</view>
 						<view class="time">
-							有效期至2024-07-26 09:58:30
+							领取后{{item.usageTimeNum||''}}{{item.usageTimeTypeName||''}}有效
 						</view>
-						<view class="button" @click="getCoupon(item)">
+						<view v-if="!item.getYetFlag" class="button" @click="getCoupon(item)">
 							立即领取
+						</view>
+						<view v-else class="button" >
+							已领取
 						</view>
 					</view>
 				</view>
 				<view class="tip">
-					<span class="t-red">*</span>此券每人限领1张。仅限用于花满芜鲜花交易平台鲜切花花款满额使用,不可与其他优惠同享、不可叠加使用
+					<span class="t-red">*</span>{{item.couponDescription || '此券每人限领1张。仅限用于花满芫鲜花交易平台鲜切花花款满额使用,不可与其他优惠同享、不可叠加使用'}}
 				</view>
 			</view>
 		</view>
@@ -35,13 +42,13 @@
 				query: {
 					status: ''
 				},
-				list: [{}]
+				list: []
 			}
 		},
 		async onLoad() {
 			this.listApi = '/api/v2/coupon/app' + `/center/list`
 
-			// this.getList()
+			this.getList()
 		},
 
 		methods: {
@@ -50,9 +57,10 @@
 				const {
 					code,
 					data
-				} = await this.$http.request('post', '/api/v2/coupon/point/exchange', {
+				} = await this.$http.request('post', '/api/v2/coupon/app/receive', {
 					data: {
-						couponId: item.id
+						couponId: item.id,
+						num: 1
 					}
 				})
 				if (code == 0) {
@@ -76,33 +84,12 @@
 
 	.coupon-container {
 
-		.coupont-item.all {
-			margin-top: 20rpx;
+		.coupont-item.true {
+			filter: grayscale(100%);
 
-			.container {
-				.info {
-					.time {
-						margin-top: 0rpx;
-					}
-
-					.button {
-						width: 150rpx;
-						height: 46rpx;
-						// box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(0,0,0,0.14);
-						border-radius: 24rpx;
-						border: 2rpx solid rgba(68, 119, 90, 1);
-						font-weight: 400;
-						font-size: 24rpx;
-						color: rgba(68, 119, 90, 1);
-						line-height: 46rpx;
-						text-align: center;
-						margin-top: 10rpx;
-					}
-				}
+			.img-has {
+				display: unset;
 			}
 		}
-
-
-
 	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3