From 6c7fecf52405e132e3573b43a7206f99026a1fd8 Mon Sep 17 00:00:00 2001 From: zxl <763096477@qq.com> Date: 星期一, 04 八月 2025 18:13:05 +0800 Subject: [PATCH] 商家入驻同意协议,优惠卷领取状态 --- pages/cart/coupon/couponCenter.vue | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pages/cart/coupon/couponCenter.vue b/pages/cart/coupon/couponCenter.vue index 4b17115..dc45b67 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> @@ -46,15 +46,15 @@ </template> <script> - import UEmpty from '@/uview-components/uview-ui/components/u-empty/u-empty.vue'; + import '@/components/uview-components/uview-ui'; import { receiveCoupons } from "@/api/members.js"; + import { getMemberCoupons } from "@/api/members.js"; import { getAllCoupons } from "@/api/promotions.js"; export default { - components: {UEmpty}, data() { return { loadStatus: "more", //涓嬫媺鐘舵�� @@ -117,6 +117,7 @@ .catch((err) => { if (this.$store.state.isShowToast){ uni.hideLoading() }; }); + console.log(this.couponList) }, /** * 棰嗗彇浼樻儬鍒� @@ -125,12 +126,13 @@ this.$u.throttle(()=>{ this.fetchCoupon(val) }, 1500) - }, fetchCoupon(val){ receiveCoupons(val.id).then((res) => { if (res.data.code == 200) { + //淇敼鐐瑰嚮鐨勪紭鎯犲嵎褰撳墠鐨勯鍙栫姸鎬� + val.owned = true; uni.showToast({ title: "棰嗗彇鎴愬姛", icon: "none", -- Gitblit v1.8.0