From 6c5165f73c90fbd4e22e4f9a39497b5a25ee37f9 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 26 十二月 2024 09:53:38 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 h5/pages/login/login.vue |   43 +++++++++++++++++++++----------------------
 1 files changed, 21 insertions(+), 22 deletions(-)

diff --git a/h5/pages/login/login.vue b/h5/pages/login/login.vue
index cb05f32..7ea600a 100644
--- a/h5/pages/login/login.vue
+++ b/h5/pages/login/login.vue
@@ -45,6 +45,7 @@
 			}
 		},
 		onLoad(option) {
+			console.log('onLoad');
 			if(option.ywid){
 				uni.setStorageSync('ywinfo', {
 					type: option.type,
@@ -59,7 +60,7 @@
 			let code = ''
 			if (window.location.href.indexOf('code=') !== -1 || this.code) {
 				const ywinfo = uni.getStorageSync('ywinfo') || {}
-				 if(ywinfo.ywid){
+				 if(ywinfo.ywid && (ywinfo.type || ywinfo.type == 0)){
 					 this.userAuth(ywinfo.type)
 				 }
 			} else {
@@ -126,27 +127,25 @@
 								that.$store.commit('setMember', res.data.member)
 							}
 							let flag = res.data.member && res.data.member.id
-							setTimeout(() => {
-								if (source == 0) {
-									if (res.data.token) {
-										that.$store.commit('setToken', res.data.token)
-										getUserInfo().then(ress => {
-											that.$store.commit('setDriverInfo', ress.data)
-										})
-									}
-									this.driverLogin(flag)
-								} else if (source == 2) {
-									if (res.data.token) {
-										that.$store.commit('setToken', res.data.token)
-										getUserInfo().then(ress => {
-											that.$store.commit('setUserInfo', ress.data)
-										})
-									}
-									this.staffLogin(flag)
-								} else {
-									this.jump('/pages/index/index')
-								}
-							}, 300)
+							if (source == 0) {
+								if (res.data.token) {
+									that.$store.commit('setToken', res.data.token)
+									getUserInfo().then(ress => {
+										that.$store.commit('setDriverInfo', ress.data)
+									})
+								}
+								this.driverLogin(flag)
+							} else if (source == 2) {
+								if (res.data.token) {
+									that.$store.commit('setToken', res.data.token)
+									getUserInfo().then(ress => {
+										that.$store.commit('setUserInfo', ress.data)
+									})
+								}
+								this.staffLogin(flag)
+							} else {
+								this.jump('/pages/index/index')
+							}
 						}
 					})
 				}

--
Gitblit v1.9.3