From 6c7fecf52405e132e3573b43a7206f99026a1fd8 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期一, 04 八月 2025 18:13:05 +0800
Subject: [PATCH] 商家入驻同意协议,优惠卷领取状态

---
 api/promotions.js                      |    2 ++
 pages/cart/coupon/couponCenter.vue     |    7 +++++--
 pages/passport/entry/seller/entry.scss |    1 +
 pages/mine/help/tips.vue               |   12 +++++++++++-
 pages/passport/entry/seller/index.vue  |   35 +++++++++++++++++++++++++++++++++--
 pages/cart/coupon/myCoupon.vue         |    1 +
 6 files changed, 53 insertions(+), 5 deletions(-)

diff --git a/api/promotions.js b/api/promotions.js
index e7d5eae..059003f 100644
--- a/api/promotions.js
+++ b/api/promotions.js
@@ -104,6 +104,8 @@
   });
 }
 
+
+
 /**
  * 鍒嗛〉鑾峰彇鐮嶄环鍟嗗搧
  * @param params
diff --git a/pages/cart/coupon/couponCenter.vue b/pages/cart/coupon/couponCenter.vue
index 67cca9e..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>
@@ -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,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",
diff --git a/pages/cart/coupon/myCoupon.vue b/pages/cart/coupon/myCoupon.vue
index 30dfac2..afacc3b 100644
--- a/pages/cart/coupon/myCoupon.vue
+++ b/pages/cart/coupon/myCoupon.vue
@@ -204,6 +204,7 @@
         title: "鍔犺浇涓�",
       });
       let index = this.tabCurrentIndex;
+	  console.log(this.navList[index].params)
       getMemberCoupons(this.navList[index].params).then((res) => {
         uni.stopPullDownRefresh();
         if (res.data.success) {
diff --git a/pages/mine/help/tips.vue b/pages/mine/help/tips.vue
index 0c12192..7f9c911 100644
--- a/pages/mine/help/tips.vue
+++ b/pages/mine/help/tips.vue
@@ -1,7 +1,7 @@
 <template>
   <div class="wrapper">
     <u-parse :show-with-animation="true" :lazy-load="true" :selectable="true" :html="res.content" v-if="res"></u-parse>
-
+	<button class="submit" @click="agreed()">鍚屾剰鍗忚</button>
   </div>
 </template>
 <script>
@@ -44,9 +44,14 @@
       title: this.way[option.type].title,
     });
     this.init(option);
+	
   },
 
   methods: {
+	  agreed(){
+		  uni.setStorageSync('agreed', true); // 瀛樺偍鍚屾剰鐘舵��
+		uni.navigateBack(); // 杩斿洖鍘熼〉闈�
+	  },
     init(option) {
       getArticleDetailByType(this.way[option.type].type).then((res) => {
         if (res.data.success) {
@@ -59,6 +64,11 @@
 };
 </script>
 <style lang="scss" scoped>
+	.submit {
+	  color: #fff;
+	  margin-top: 120rpx;
+	  background: rgba($light-color, 0.8);
+	}
 .wrapper {
   padding: 16rpx;
 }
diff --git a/pages/passport/entry/seller/entry.scss b/pages/passport/entry/seller/entry.scss
index 01d8c6c..155da64 100644
--- a/pages/passport/entry/seller/entry.scss
+++ b/pages/passport/entry/seller/entry.scss
@@ -3,6 +3,7 @@
     font-weight: bold;
 }
 .submit,
+.noSubmit,
 .notice {
   font-weight: bold;
   font-size: 28rpx;
diff --git a/pages/passport/entry/seller/index.vue b/pages/passport/entry/seller/index.vue
index 2a904c0..a9eebe7 100644
--- a/pages/passport/entry/seller/index.vue
+++ b/pages/passport/entry/seller/index.vue
@@ -13,8 +13,16 @@
           {{ item.title }}
         </div>
       </div>
-      <div class="submit" @click="keepOn()">寮�濮嬪~鍐�</div>
-      <div class="notice" @click="getEntryNotice">鏌ョ湅搴楅摵鍏ラ┗鍗忚</div>
+      <div :class="isAgreed ? 'submit' : 'noSubmit'" @click="keepOn()" :disabled="!isAgreed">寮�濮嬪~鍐�</div>
+	  <div class="agreement-container"  >
+	    <label class="agreement-label">
+	      <checkbox :checked="isAgreed" class="agreement-checkbox" :disabled="isDisabled" />
+	      <text class="agreement-text" @click="getEntryNotice">
+	        鏌ョ湅搴楅摵<text class="agreement-link">銆婂叆椹诲崗璁��</text>
+	      </text>
+	    </label>
+	  </div>
+		  
     </div>
   </div>
 </template>
@@ -27,6 +35,8 @@
 
   data() {
     return {
+		isDisabled:true,
+		isAgreed:false,
       current: 999,
       entrySteps: [
         {
@@ -60,6 +70,10 @@
   onShow() {
     if(this.$options.filters.tipsToLogin()){
         this.init();
+    }
+	if (uni.getStorageSync('agreed')) {
+      this.isAgreed = true; // 鑷姩鍕鹃��
+      uni.removeStorageSync('agreed'); // 娓呴櫎鏍囪
     }
   },
 
@@ -96,7 +110,9 @@
         },
       ];
       const res = await getCompanyDetail();
+	  console.log(res)
       if (res.data.success) {
+		  
         this.companyData = res.data.result;
 
         if (this.companyData) {
@@ -124,6 +140,16 @@
 }
 </style>
 <style lang="scss" scoped>
+	.agreement-container {
+	  display: flex;
+	  justify-content: center;
+	  margin-top: 20rpx;
+	}
+	/* 鍕鹃�夋鍜屾枃瀛楀榻� */
+	.agreement-label {
+	  display: flex;
+	  align-items: center;
+	}
 @import url("./entry.scss");
 .wrapper {
   padding: 0 80rpx;
@@ -153,6 +179,11 @@
   background: rgba($color: $light-color, $alpha: 0.1);
   border-radius: 20rpx;
 }
+.noSubmit{
+	color: #fff;
+	margin-top: 120rpx;
+	background: rgba(204, 204, 204, 0.8);;
+}
 .submit {
   color: #fff;
   margin-top: 120rpx;

--
Gitblit v1.8.0