From 0270abc763a1a2ca1162f2fd49b1734d6c5652b2 Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期三, 15 十月 2025 00:42:24 +0800
Subject: [PATCH] 首页视频优化
---
pages/cart/coupon/couponCenter.vue | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/pages/cart/coupon/couponCenter.vue b/pages/cart/coupon/couponCenter.vue
index 67cca9e..958c482 100644
--- a/pages/cart/coupon/couponCenter.vue
+++ b/pages/cart/coupon/couponCenter.vue
@@ -32,7 +32,7 @@
<view v-if="item.endTime">鏈夋晥鏈熻嚦锛歿{ item.endTime.split(" ")[0] }}</view>
</view>
<view class="receive" @click="receive(item)">
- <text>鐐瑰嚮</text><br />
+ <text>{{item.owned ? '宸�' : '鐐瑰嚮'}}</text><br />
<text>棰嗗彇</text>
</view>
<view class="bg-quan"> 鍒� </view>
@@ -50,6 +50,7 @@
import {
receiveCoupons
} from "@/api/members.js";
+ import { getMemberCoupons } from "@/api/members.js";
import {
getAllCoupons
} from "@/api/promotions.js";
@@ -116,6 +117,7 @@
.catch((err) => {
if (this.$store.state.isShowToast){ uni.hideLoading() };
});
+ console.log(this.couponList)
},
/**
* 棰嗗彇浼樻儬鍒�
@@ -124,12 +126,14 @@
this.$u.throttle(()=>{
this.fetchCoupon(val)
}, 1500)
-
},
fetchCoupon(val){
receiveCoupons(val.id).then((res) => {
if (res.data.code == 200) {
+ //淇敼鐐瑰嚮鐨勪紭鎯犲嵎褰撳墠鐨勯鍙栫姸鎬�
+ val.owned = res.data.result.owned;
+ console.log(res.data)
uni.showToast({
title: "棰嗗彇鎴愬姛",
icon: "none",
--
Gitblit v1.8.0