From b7d451c91ec40bee70f23b1e2cf6a8797643faef Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期六, 25 四月 2026 15:18:58 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 small-program/shop/pages/login/login.vue |   48 +++++++++++++++++++++++++++++++-----------------
 1 files changed, 31 insertions(+), 17 deletions(-)

diff --git a/small-program/shop/pages/login/login.vue b/small-program/shop/pages/login/login.vue
index a139eb9..79b3d35 100644
--- a/small-program/shop/pages/login/login.vue
+++ b/small-program/shop/pages/login/login.vue
@@ -39,7 +39,7 @@
 
 	export default {
 		computed: {
-			...mapState(['openid', 'userInfo'])
+			...mapState(['openid', 'userInfo','userType'])
 		},
 		data() {
 			return {
@@ -52,24 +52,38 @@
 		},
 		onLoad() {
 			// 闈欓粯鐧诲綍
+		
 			if (this.userInfo.bindShopId) {
-				this.$u.api.shopSilentLogin({})
-					.then(async res => {
-						if (res.code === 200) {
-							this.$store.commit('setUserType', 1)
-							this.$store.commit('setShopToken', res.data.token)
-							// 鑾峰彇闂ㄥ簵淇℃伅
-							const shopInfoRes = await this.$u.api.getShopInfo({})
-							if (shopInfoRes.code === 200) {
-								this.$store.commit('setShopInfo', shopInfoRes.data)
+				uni.showLoading({
+					title:'鐧诲綍涓�...'
+				})
+				try{
+					console.log(this.userType,"============================================")
+					this.$u.api.shopSilentLogin({})
+						.then( res => {
+							if (res.code === 200) {
+								this.$store.commit('setUserType', 1)
+								this.$store.commit('setShopToken', res.data.token)
+								// 鑾峰彇闂ㄥ簵淇℃伅
+								this.$u.api.getShopInfo({}).then( shopInfoRes => {
+									if (shopInfoRes.code === 200) {
+										this.$store.commit('setShopInfo', shopInfoRes.data)
+									}
+									uni.hideLoading();
+									// setTimeout(() => {
+										uni.reLaunch({
+											url: '/shop/pages/store-home/store-home'
+										});
+									// }, 1000)
+								})
 							}
-							setTimeout(() => {
-								uni.reLaunch({
-									url: '/shop/pages/store-home/store-home'
-								});
-							}, 1000)
-						}
-					})
+						})
+				}catch(e){
+					uni.hideLoading()
+				}
+				setTimeout(() => {
+					uni.hideLoading()
+				}, 10000)
 			}
 		},
 		methods: {

--
Gitblit v1.9.3