From ebf7a029c270a728c7578870d6d60a5762f0d1f2 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期一, 16 十二月 2024 19:35:07 +0800
Subject: [PATCH] ll
---
h5/pages/login/login.vue | 44 +++++++++++++++++++++-----------------------
1 files changed, 21 insertions(+), 23 deletions(-)
diff --git a/h5/pages/login/login.vue b/h5/pages/login/login.vue
index cb05f32..67da103 100644
--- a/h5/pages/login/login.vue
+++ b/h5/pages/login/login.vue
@@ -41,7 +41,7 @@
export default {
data() {
return {
- code: ''
+ code: 'qwe'
}
},
onLoad(option) {
@@ -59,7 +59,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 +126,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