From 6577a7ad7f2044bcfe75601e0360e9172a7d2380 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期六, 28 二月 2026 15:07:23 +0800
Subject: [PATCH] 提交

---
 mini-program/pages/index/index.vue |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/mini-program/pages/index/index.vue b/mini-program/pages/index/index.vue
index 3b24c1f..a0f8866 100644
--- a/mini-program/pages/index/index.vue
+++ b/mini-program/pages/index/index.vue
@@ -6,7 +6,7 @@
 				<view :style="{ width: '100%', height: statusbarHeight + 'px' }"></view>
 				<view class="head-bar-nav" :style="{ height: navHeight + 'px' }" @click="openLoacing">
 					<image src="/static/icon/home_ic_location@2x.png" mode="widthFix"></image>
-					<text>{{position.formatted_addresses.recommend}}</text>
+					<text>{{position.formatted_addresses.recommend || '鐐瑰嚮瀹氫綅'}}</text>
 					<u-icon name="arrow-right" color="#222222" size="13"></u-icon>
 				</view>
 			</view>
@@ -92,7 +92,7 @@
 				</view>
 			</view>
 		</view>
-		<view class="dingwei" v-if="!position">
+		<view class="dingwei" v-if="isShow">
 			<view class="dingwei-left">
 				<text>鏈巿鏉冨畾浣�</text>
 				<text>鎴戜滑鏃犳硶鑾峰緱鎮ㄥ綋鍓嶄綅缃俊鎭负鎮ㄦ帹鑽愰檮杩戠粡閿�鍟�</text>
@@ -114,7 +114,7 @@
 			Login
 		},
 		computed: {
-			...mapState(['navHeight', 'statusbarHeight', 'position'])
+			...mapState(['navHeight', 'statusbarHeight', 'position', 'userInfo'])
 		},
 		data() {
 			return {
@@ -130,11 +130,15 @@
 				specialZone: [],
 				goodsList: [],
 				page: 1,
-				next: true
+				next: true,
+				isShow: false
 			}
 		},
 		async onLoad() {
 			await this.$onLaunched;
+			if (!this.position) {
+				this.isShow = true
+			}
 			this.getBanner()
 			this.getLabels()
 			this.getGoodsList()
@@ -149,6 +153,10 @@
 				})
 			},
 			addCard(e) {
+				if (!this.userInfo) {
+					this.$refs.loginRef.open()
+					return
+				}
 				this.$u.api.addCart({
 					goodsId: e.id,
 					goodsSkuId: e.goodsSkuResponseList[0].id,

--
Gitblit v1.9.3