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/mine/mine.vue |   79 ++++++++++++++++++++++++++++++---------
 1 files changed, 61 insertions(+), 18 deletions(-)

diff --git a/mini-program/pages/mine/mine.vue b/mini-program/pages/mine/mine.vue
index d9778ad..a8ebe31 100644
--- a/mini-program/pages/mine/mine.vue
+++ b/mini-program/pages/mine/mine.vue
@@ -20,7 +20,7 @@
 						<image src="/static/icon/ic_option@2x.png" mode="widthFix"></image>
 					</view>
 					<view class="user-right-item" @click="jumpNotice">
-						<view class="user-right-item-tips" v-if="objNum && objNum.unRead === 1"></view>
+						<view class="user-right-item-tips" v-if="objNum && objNum.unRead === 0"></view>
 						<image src="/static/icon/ic_notice@2x.png" mode="widthFix"></image>
 					</view>
 				</view>
@@ -70,7 +70,7 @@
 				</view>
 			</view>
 			<view class="guanggao" @click="jumpShare()">
-				<image src="/static/images/share@2x.png"  mode="widthFix"></image>
+				<image :src="share"  mode="widthFix"></image>
 			</view>
 			<view class="gn">
 				<view class="gn-item" @click="jump()">
@@ -78,6 +78,7 @@
 					<image src="/static/icon/ic_ar2@2x.png" mode="widthFix"></image>
 				</view>
 				<view class="gn-item">
+					<button open-type="contact">瀹㈡湇</button>
 					<text>鍦ㄧ嚎瀹㈡湇</text>
 					<image src="/static/icon/ic_ar2@2x.png" mode="widthFix"></image>
 				</view>
@@ -87,28 +88,44 @@
 				</view>
 			</view>
 		</view>
+		<Login ref="login" />
 	</view>
 </template>
 
 <script>
 	import { mapState } from 'vuex'
+	import Login from '@/components/login/login.vue'
 	export default {
+		components: { Login },
 		computed: {
 			...mapState(['navHeight', 'statusbarHeight', 'openid', 'userInfo','recshopid','recuserid'])
 		},
 		data() {
 			return {
 				objNum: null,
-				orderNum: null
+				orderNum: null,
+				share: ''
 			};
 		},
 		async onLoad() {
 			await this.$onLaunched;
-			this.getMyInfo()
-			this.ordersStatistics()
+			if (uni.getStorageSync('backgroundImage')) {
+				this.share = uni.getStorageSync('backgroundImage').centerInviteBg
+			}
+		},
+		async onShow() {
+			await this.$onLaunched;
+			if (this.userInfo) {
+				this.getMyInfo()
+				this.ordersStatistics()
+			}
 		},
 		methods: {
 			jumpTo(type) {
+				if (!this.userInfo) {
+					this.$refs.login.open()
+					return
+				}
 				if (type === 1) {
 					uni.navigateTo({
 						url: '/pages/shopping-cart/shopping-cart'
@@ -151,19 +168,31 @@
 			},
 			// 鎺堟潈鎵嬫満鍙�
 			getphonenumber(e) {
-				this.$u.api.wxPhone({
-					code: e.detail.code,
-					shopId:this.recshopid,
-					recId:this.recuserid,
-					openid: this.openid
-				}).then(res => {
-					if (res.code === 200) {
-						this.$store.commit('setUserInfo', res.data.member)
-						this.$store.commit('setToken', res.data.token)
-						 this.$store.commit('setRecShopId','')
-						 this.$store.commit('setRecUserId','')
-					}
-				})
+				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.wxPhone({
+									code: e.detail.code,
+									shopId:that.recshopid,
+									recId:that.recuserid,
+									openid: res.data.openid
+								}).then(res => {
+									if (res.code === 200) {
+										that.$store.commit('setUserInfo', res.data.member)
+										that.$store.commit('setToken', res.data.token)
+										that.$store.commit('setRecShopId','')
+										that.$store.commit('setRecUserId','')
+									}
+								})
+							}
+						}
+					});
+				}
 			},
 			// 鑾峰彇鏀惰棌绛夋暟閲�
 			getMyInfo() {
@@ -185,6 +214,10 @@
 			},
 			// 璺宠浆璁㈠崟鍒楄〃
 			jumpOrder(status) {
+				if (!this.userInfo) {
+					this.$refs.login.open()
+					return
+				}
 				uni.navigateTo({
 					url: '/pagesA/pages/order/order?userType=0&status=' + status
 				})
@@ -242,9 +275,19 @@
 					align-items: center;
 					justify-content: space-between;
 					border-bottom: 1rpx solid #E5E5E5;
+					position: relative;
 					&:last-child {
 						border: none !important;
 					}
+					button {
+						position: absolute;
+						top: 0;
+						left: 0;
+						width: 100%;
+						height: 100%;
+						opacity: 0;
+						z-index: 99;
+					}
 					text {
 						font-weight: 400;
 						font-size: 30rpx;

--
Gitblit v1.9.3