From 5dbd5bdfc1a4de43722485b728f7d27f9b369eb9 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期一, 02 三月 2026 15:38:19 +0800
Subject: [PATCH] 经销商管理

---
 mini-program/pages/special-zone/special-zone.vue |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/mini-program/pages/special-zone/special-zone.vue b/mini-program/pages/special-zone/special-zone.vue
index f9dfd9a..20b4514 100644
--- a/mini-program/pages/special-zone/special-zone.vue
+++ b/mini-program/pages/special-zone/special-zone.vue
@@ -6,7 +6,7 @@
 				<view :style="{ width: '100%', height: statusbarHeight + 'px' }"></view>
 				<view class="head-bar-nav" :style="{ height: navHeight + 'px' }">
 					<image src="/static/icon/nav_ic_bac@2x.png" mode="widthFix" @click="fanhui"></image>
-					<text>鍟嗗搧涓撳尯</text>
+					<text>{{title}}</text>
 					<image src="/static/icon/nav_ic_bac@2x.png" style="opacity: 0;" mode="widthFix"></image>
 				</view>
 			</view>
@@ -48,6 +48,7 @@
 				<view class="cart-num" v-if="cardObj && cardObj.cartTypeNum > 0">{{cardObj.cartTypeNum}}</view>
 			</view>
 		</view>
+		<Login ref="login" />
 	</view>
 </template>
 
@@ -55,12 +56,15 @@
 	import {
 		mapState
 	} from 'vuex'
+	import Login from '@/components/login/login.vue'
 	export default {
+		components: {Login},
 		computed: {
-			...mapState(['navHeight', 'statusbarHeight'])
+			...mapState(['navHeight', 'statusbarHeight', 'userInfo'])
 		},
 		data() {
 			return {
+				title:'鍟嗗搧涓撳尯',
 				goodsName: '',
 				next: true,
 				page: 1,
@@ -70,9 +74,13 @@
 			};
 		},
 		onLoad(options) {
+			console.log(options)
 			this.qualityId = options.qualityId
+			this.title = options.title || '鍟嗗搧涓撳尯'
 			this.getGoodsList()
-			this.cardNum()
+			if (this.userInfo) {
+				this.cardNum()
+			}
 		},
 		onReachBottom() {
 			this.getGoodsList()
@@ -84,6 +92,10 @@
 				})
 			},
 			addCard(e) {
+				if (!this.userInfo) {
+					this.$refs.login.open()
+					return;
+				}
 				this.$u.api.addCart({
 					goodsId: e.id,
 					goodsSkuId: e.skuResponsesList[0].id,
@@ -96,6 +108,10 @@
 				})
 			},
 			jumpCard() {
+				if (!this.userInfo) {
+					this.$refs.login.open()
+					return;
+				}
 				uni.navigateTo({
 					url: '/pages/shopping-cart/shopping-cart'
 				})

--
Gitblit v1.9.3