From 908b9876dde97acbb09c53dc6debe3eecbb9d1b4 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期二, 28 四月 2026 22:10:32 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 small-program/pages/mine/mine.vue |  269 +++++++++++++++++++++++++++++++++++------------------
 1 files changed, 179 insertions(+), 90 deletions(-)

diff --git a/small-program/pages/mine/mine.vue b/small-program/pages/mine/mine.vue
index 2d37b3e..2ece09a 100644
--- a/small-program/pages/mine/mine.vue
+++ b/small-program/pages/mine/mine.vue
@@ -2,52 +2,39 @@
 	<view class="mine-page">
 		<view class="top-bg"></view>
 		<view class="nav-wrap">
-			<view :style="{ height: statusbarHeight + 'px' }"></view>
-			<view class="nav-bar" :style="{ height: navHeight + 'px' }">
-				<view class="nav-spacer"></view>
-				<view class="nav-actions">
-					<view class="nav-action-item">
-						<u-icon name="more-dot-fill" size="30" color="#222222"></u-icon>
-					</view>
-					<view class="nav-divider"></view>
-					<view class="nav-action-item">
-						<u-icon name="scan" size="24" color="#222222"></u-icon>
-					</view>
-				</view>
-			</view>
+			<view :style="{ width: '100%', height: statusbarHeight + 'px' }"></view>
+			<view :style="{ width: '100%', height: navHeight + 'px' }"></view>
 		</view>
-
 		<view class="page-scroll">
 			<view class="page-content">
-				<view class="profile-card">
-					<image class="avatar" src="/static/image/tx@2x.png" mode="widthFix"></image>
+				<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">{{ isLoggedIn ? maskedMobile : '鐐瑰嚮鐧诲綍' }}</text>
-						<text v-if="isLoggedIn" class="user-name">{{ userName }}</text>
+						<text class="login-text">{{ userInfo.nickName || '鐐瑰嚮鐧诲綍' }}</text>
 					</view>
-					<view v-if="isLoggedIn" class="profile-tools">
-						<view class="tool-item">
+					<view v-if="userInfo" class="profile-tools">
+						<view class="tool-item" @click="toSetting">
 							<image class="tool-icon" src="/static/icon/ic_option@2x.png" mode="aspectFit"></image>
 						</view>
-						<view class="tool-item has-badge">
+						<!-- <view class="tool-item has-badge">
 							<image class="tool-icon" src="/static/icon/ic_notice@2x.png" mode="aspectFit"></image>
-							<view class="tool-badge"></view>
-						</view>
+							<view class="tool-badge" v-if="userInfo.hasMessage"></view>
+						</view> -->
 					</view>
 				</view>
 
 				<view class="order-card section-card">
 					<view class="section-head">
 						<text class="section-title">鎴戠殑璁㈠崟</text>
-						<view class="more-wrap">
+						<view class="more-wrap" @click="toOrderDetail(-1)">
 							<text class="more-text">鍏ㄩ儴璁㈠崟</text>
 							<u-icon name="arrow-right" size="13" color="#999999"></u-icon>
 						</view>
 					</view>
 					<view class="order-grid">
-						<view v-for="item in orderMenus" :key="item.label" class="order-item">
+						<view v-for="(item, index) in orderMenus" :key="index" class="order-item" @click="toOrderDetail(item.status)">
 							<image class="order-icon" :src="item.url" mode="widthFix"></image>
-							<view v-if="item.badge && isLoggedIn" class="order-badge">{{ item.badge }}</view>
+							<view v-if="item.badge" class="order-badge">{{ item.badge }}</view>
 							<text class="order-label">{{ item.label }}</text>
 						</view>
 					</view>
@@ -58,49 +45,157 @@
 				</view>
 
 				<view class="menu-card section-card">
-					<view v-for="item in menuList" :key="item.label" class="menu-row">
+					<view v-for="item in menuList" :key="item.label" class="menu-row" @click="handleMenuClick(item)">
 						<text class="menu-label">{{ item.label }}</text>
-						<u-icon name="arrow-right" size="18" color="#B5BBC5"></u-icon>
+						<view class="right-icon">
+							<text v-if="['闂ㄥ簵鍏ラ┗','闂ㄥ簵淇℃伅'].includes(item.label)" :class="{ 'status-red': userInfo.shopAuditStatus === 1 || userInfo.shopAuditStatus === 2 }">
+								{{userInfo.shopAuditStatus === 0 ? '瀹℃牳涓�' : userInfo.shopAuditStatus === 1 ? '瀹℃牳閫氳繃锛岃鏀粯鎶奸噾' : userInfo.shopAuditStatus === 2 ? '瀹℃牳鏈�氳繃' : userInfo.shopAuditStatus === 3 ? '闂ㄥ簵宸插叆椹�' : '' }}
+							</text>
+							<button  v-if="item.label === '鍦ㄧ嚎瀹㈡湇'" open-type="contact" type="default">    </button>
+							<u-icon   name="arrow-right" size="18" color="#B5BBC5"></u-icon>
+						</view>
 					</view>
 				</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 CustomTabbar from '@/components/custom-tabbar/custom-tabbar.vue'
 
 	export default {
+		components: {
+			CustomTabbar
+		},
 		computed: {
-			...mapState(['navHeight', 'statusbarHeight']),
-			maskedMobile() {
-				if (!this.isLoggedIn || !this.mobile) {
-					return '鐐瑰嚮鐧诲綍'
+		...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,status:0 },
+				{ label: '寰呮敹璐�', url: '/static/icon/mine_ic_daishouhuo@2x.png', badge: 0,status:3 },
+				{ label: '閫�娆�/鍞悗', url: '/static/icon/mine_ic_tuikuan@2x.png', badge: 0 ,status:5}
+			],
+			menuList: [
+				{ label: '闂ㄥ簵鍏ラ┗' },
+				{ label: '鎴戠殑闂ㄥ簵' },
+				{ label: '鐢ㄦ埛鏈嶅姟鍗忚' },
+				{ label: '鐢ㄦ埛闅愮鏀跨瓥' },
+				{ label: '鍦ㄧ嚎瀹㈡湇' },
+				{ label: '鍏充簬鎴戜滑' }
+			]
+		}
+	},
+	async onShow() {
+		await this.$onLaunched;
+		if (this.token) {
+			this.getOrderNum()
+		}
+		if (this.userInfo) {
+			if (this.userInfo.shopAuditStatus === 3) {
+				this.menuList[0].label = '闂ㄥ簵淇℃伅'
+			}
+		} 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.switchTab({
+				url: '/pages/itinerary/itinerary'
+			})
+		},
+		handleMenuClick(item) {
+			const urlMap = {
+				'闂ㄥ簵鍏ラ┗': '/pages/store-apply/store-apply',
+				'鎴戠殑闂ㄥ簵': '/shop/pages/login/login',
+				'鐢ㄦ埛鏈嶅姟鍗忚': '/pages/rich-text/rich-text?type=0',
+				'鐢ㄦ埛闅愮鏀跨瓥': '/pages/rich-text/rich-text?type=1',
+				'鍏充簬鎴戜滑': '/pages/rich-text/rich-text?type=5' 
+			}
+			if (['闂ㄥ簵鍏ラ┗', '鎴戠殑闂ㄥ簵'].includes(item.label)) {
+				if (!this.token) {
+					this.showAuthLogin = true
+					return
 				}
-				return `${this.mobile.slice(0, 3)}****${this.mobile.slice(-4)}`
+			}
+			if (['闂ㄥ簵鍏ラ┗','闂ㄥ簵淇℃伅'].includes(item.label) && [0,1,2,3].includes(this.userInfo.shopAuditStatus)) {
+				uni.navigateTo({
+					url: '/pages/details-entry/details-entry'
+				})
+				return
+			}
+			if (item.label!=='鍦ㄧ嚎瀹㈡湇' && urlMap[item.label]) {
+				uni.navigateTo({
+					url: urlMap[item.label]
+				})
 			}
 		},
-		data() {
-			return {
-				isLoggedIn: true,
-				mobile: '18166669990',
-				userName: '钄″瓙鐟�',
-				orderMenus: [
-					{ label: '寰呮敮浠�', url: '/static/icon/mine_ic_daifukuan@2x.png', badge: 12 },
-					{ label: '寰呮敹璐�', url: '/static/icon/mine_ic_daishouhuo@2x.png', badge: 2 },
-					{ label: '閫�娆�/鍞悗', url: '/static/icon/mine_ic_tuikuan@2x.png' }
-				],
-				menuList: [
-					{ label: '闂ㄥ簵鍏ラ┗' },
-					{ label: '鎴戠殑闂ㄥ簵' },
-					{ label: '瑙勮寖椤荤煡' },
-					{ label: '鍦ㄧ嚎瀹㈡湇' },
-					{ label: '鍏充簬鎴戜滑' }
-				]
+		toOrderDetail(label) {
+			uni.setStorageSync("orderStatus",label===0?-2:label)
+			uni.switchTab({
+				url: '/pages/itinerary/itinerary'
+			})
+		},
+		toSetting() {
+			if (!this.token) {
+				this.showAuthLogin = true
+				return
 			}
+			uni.navigateTo({
+				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) {
+					this.$store.commit('setUserInfo', res.data)
+					this.orderMenus.forEach(item => {
+						if (item.label === '寰呮敮浠�') {
+							item.badge = res.data.waitPayCount
+						} else if (item.label === '寰呮敹璐�') {
+							item.badge = res.data.waitReceiveCount
+						} else if (item.label === '閫�娆�/鍞悗') {
+							item.badge = res.data.refundingCount
+						}
+					})
+				}
+			})
 		}
 	}
+}
 </script>
 
 <style lang="scss" scoped>
@@ -120,49 +215,9 @@
 		z-index: 0;
 	}
 
-	.nav-wrap,
 	.page-scroll {
 		position: relative;
 		z-index: 1;
-	}
-
-	.nav-bar {
-		padding: 0 16rpx;
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		box-sizing: border-box;
-	}
-
-	.nav-spacer {
-		width: 52rpx;
-		height: 52rpx;
-	}
-
-	.nav-actions {
-		min-width: 112rpx;
-		height: 52rpx;
-		padding: 0 10rpx;
-		background: rgba(255, 255, 255, 0.86);
-		border-radius: 26rpx;
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		box-sizing: border-box;
-	}
-
-	.nav-action-item {
-		width: 38rpx;
-		height: 38rpx;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-	}
-
-	.nav-divider {
-		width: 1rpx;
-		height: 24rpx;
-		background: #e5e7eb;
 	}
 
 	.page-content {
@@ -174,6 +229,15 @@
 		display: flex;
 		align-items: center;
 		margin-bottom: 30rpx;
+		position: relative;
+		button {
+			position: absolute;
+			bottom: 0;
+			left: 0;
+			width: 100%;
+			height: 100%;
+			opacity: 0;
+		}
 	}
 
 	.avatar {
@@ -344,4 +408,29 @@
 		font-size: 30rpx;
 		color: #222222;
 	}
+
+	.right-icon {
+		display: flex;
+		align-items: center;
+		gap: 4rpx;
+		text {
+			font-weight: 400;
+			font-size: 24rpx;
+			color: #10B2FA;
+			margin-right: 20rpx;
+		}
+		.status-red {
+			color: #FF0000;
+		}
+		button {
+			position: relative;
+			top: 0;
+			float:right;
+			right:  0;
+			width: 200rpx;
+			height: 48rpx;
+			opacity: 0;
+			z-index: 9999;
+		}
+	}
 </style>

--
Gitblit v1.9.3