From 3539d67072a5fd179bd44385ebefce0d1a6e8cb4 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期二, 21 四月 2026 16:03:06 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 small-program/pages/mine/mine.vue |   77 ++++++++++++++++++++++----------------
 1 files changed, 44 insertions(+), 33 deletions(-)

diff --git a/small-program/pages/mine/mine.vue b/small-program/pages/mine/mine.vue
index 9a29717..ea33c54 100644
--- a/small-program/pages/mine/mine.vue
+++ b/small-program/pages/mine/mine.vue
@@ -7,8 +7,7 @@
 		</view>
 		<view class="page-scroll">
 			<view class="page-content">
-				<view class="profile-card">
-					<button open-type="getPhoneNumber" @getphonenumber="getphonenumber">鎺堟潈鎵嬫満鍙�</button>
+				<view class="profile-card" @click="handleProfileClick">
 					<image class="avatar" :src="userInfo.fullCoverImage ? userInfo.fullCoverImage : '/static/image/tx@2x.png'" mode="widthFix"></image>
 					<view class="profile-copy">
 						<text class="login-text">{{ userInfo.nickName || '鐐瑰嚮鐧诲綍' }}</text>
@@ -58,18 +57,30 @@
 				</view>
 			</view>
 		</view>
+
+		<auth-login
+			:show="showAuthLogin"
+			:checked.sync="agreeChecked"
+			@close="showAuthLogin = false" />
+		<custom-tabbar></custom-tabbar>
 	</view>
 </template>
 
 <script>
-import { mapState } from 'vuex'
+	import { mapState } from 'vuex'
+	import CustomTabbar from '@/components/custom-tabbar/custom-tabbar.vue'
 
-export default {
-	computed: {
-		...mapState(['navHeight', 'statusbarHeight', 'openid', 'userInfo'])
+	export default {
+		components: {
+			CustomTabbar
+		},
+		computed: {
+		...mapState(['navHeight', 'statusbarHeight', 'openid', 'userInfo', 'token'])
 	},
 	data() {
 		return {
+			showAuthLogin: false,
+			agreeChecked: true,
 			userName: '',
 			orderMenus: [
 				{ label: '寰呮敮浠�', url: '/static/icon/mine_ic_daifukuan@2x.png', badge: 0 },
@@ -86,15 +97,29 @@
 		}
 	},
 	async onShow() {
-		await this.$onLaunched
+		await this.$onLaunched;
+		if (this.token) {
+			this.getOrderNum()
+		}
 		if (this.userInfo) {
 			if (this.userInfo.shopAuditStatus === 3) {
 				this.menuList[0].label = '闂ㄥ簵淇℃伅'
 			}
-			this.getOrderNum()
+		} else {
+			this.orderMenus = [
+				{ label: '寰呮敮浠�', url: '/static/icon/mine_ic_daifukuan@2x.png', badge: 0 },
+				{ label: '寰呮敹璐�', url: '/static/icon/mine_ic_daishouhuo@2x.png', badge: 0 },
+				{ label: '閫�娆�/鍞悗', url: '/static/icon/mine_ic_tuikuan@2x.png', badge: 0 }
+			]
 		}
 	},
 	methods: {
+		handleProfileClick() {
+			if (this.token) {
+				return
+			}
+			this.showAuthLogin = true
+		},
 		toAllOrders() {
 			uni.navigateTo({
 				url: '/pages/orders/orders'
@@ -103,7 +128,7 @@
 		handleMenuClick(item) {
 			const urlMap = {
 				'闂ㄥ簵鍏ラ┗': '/pages/store-apply/store-apply',
-				'鎴戠殑闂ㄥ簵': '/pages/store-home/store-home',
+				'鎴戠殑闂ㄥ簵': '/shop/pages/login/login',
 				'瑙勮寖椤荤煡': '/pages/rich-text/rich-text?type=serverIntroduce',
 				'鍏充簬鎴戜滑': '/pages/rich-text/rich-text?type=about'
 			}
@@ -129,6 +154,16 @@
 				url: '/pages/settings/settings'
 			})
 		},
+		goService() {
+			uni.navigateTo({
+				url: '/pages/rich-text/rich-text?type=userAgreement'
+			})
+		},
+		goPrivacy() {
+			uni.navigateTo({
+				url: '/pages/rich-text/rich-text?type=privacyPolicy'
+			})
+		},
 		getOrderNum() {
 			this.$u.api.getMemberInfo({}).then(res => {
 				if (res.code === 200) {
@@ -144,30 +179,6 @@
 					})
 				}
 			})
-		},
-		// 鎺堟潈鎵嬫満鍙�
-		getphonenumber(e) {
-			var that = this;
-			if (e.detail.errMsg === 'getPhoneNumber:ok') {
-				uni.login({
-					provider: 'weixin',
-					success: async function (loginRes) {
-						let { code } = loginRes;
-						let res = await that.$u.api.wxLogin({ code })
-						if (res.code === 200) {
-							that.$u.api.wxAuthPhone({
-								code: e.detail.code,
-								openid: res.data.openid
-							}).then(res => {
-								if (res.code === 200) {
-									that.$store.commit('setUserInfo', res.data.member)
-									that.$store.commit('setToken', res.data.token)
-								}
-							})
-						}
-					}
-				});
-			}
 		}
 	}
 }

--
Gitblit v1.9.3