From a997c45ed4675d2eb045090fddb933235f4279cd Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期六, 28 二月 2026 14:21:57 +0800
Subject: [PATCH] 经销商管理

---
 mini-program/components/login/login.vue |   27 +++++++++++++++++++++++++--
 1 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/mini-program/components/login/login.vue b/mini-program/components/login/login.vue
index 876992d..18a3807 100644
--- a/mini-program/components/login/login.vue
+++ b/mini-program/components/login/login.vue
@@ -5,7 +5,7 @@
 			<view class="login-info">
 				<image src="/static/icon/ic_agree@2x.png" mode="widthFix"></image>
 				<view class="login-info-text">
-					鎴戝凡闃呰骞跺悓鎰�<text>銆婇紟鍏冪鎶�鐢ㄦ埛鏈嶅姟鍗忚銆�</text>鍙�<text>銆婇紟鍏冪鎶�鐢ㄦ埛闅愮鏀跨瓥銆�</text>
+					鎴戝凡闃呰骞跺悓鎰�<text @click="jumpService(4)">銆婇紟鍏冪鎶�鐢ㄦ埛鏈嶅姟鍗忚銆�</text>鍙�<text @click="jumpService(5)">銆婇紟鍏冪鎶�鐢ㄦ埛闅愮鏀跨瓥銆�</text>
 				</view>
 			</view>
 			<button class="login-btn" open-type="getPhoneNumber" @getphonenumber="getphonenumber">鎵嬫満鍙峰揩鎹风櫥褰�</button>
@@ -14,6 +14,7 @@
 </template>
 
 <script>
+	import { mapState } from 'vuex'
 	export default {
 		name: "login",
 		data() {
@@ -21,7 +22,15 @@
 				show: false
 			};
 		},
+		computed: {
+			...mapState(['openid', 'recshopid', 'recuserid'])
+		},
 		methods: {
+			jumpService(flag) {
+				uni.navigateTo({
+					url: '/pagesA/pages/rich-text-page/rich-text-page?flag='+flag
+				})
+			},
 			open() {
 				this.show = true
 			},
@@ -29,7 +38,21 @@
 				this.show = false
 			},
 			getphonenumber(e) {
-				console.log(e)
+				if (e.detail.errMsg === 'getPhoneNumber:ok') {
+					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','')
+						}
+					})
+				}
 			}
 		}
 	}

--
Gitblit v1.9.3