From e80fb1e51d652d0ccecc27688c72a168c8297075 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期四, 27 二月 2025 17:12:41 +0800
Subject: [PATCH] 表格优化lll
---
h5/pages/login/login.vue | 69 +++++++++++++++++++++-------------
1 files changed, 42 insertions(+), 27 deletions(-)
diff --git a/h5/pages/login/login.vue b/h5/pages/login/login.vue
index 6fb7207..53074fa 100644
--- a/h5/pages/login/login.vue
+++ b/h5/pages/login/login.vue
@@ -41,20 +41,33 @@
export default {
data() {
return {
- code: ''
+ code: '11'
}
- },
- onLoad(option) {
- if(option.type){
-
- }
+ },
+ onLoad(option) {
+ console.log('onLoad');
+ if (option.ywid) {
+ uni.setStorageSync('ywinfo', {
+ type: option.type,
+ yw: option.yw,
+ ywid: option.ywid
+ })
+ }
},
onShow() {
var that = this
let url = 'https://atwl.ahzyssl.com/zhyq_h5/#/'
let code = ''
if (window.location.href.indexOf('code=') !== -1 || this.code) {
-
+ // if(window.location.href.indexOf('wdata') !== -1){
+ // uni.redirectTo({
+ // url: '/pages/wdata/home?code=' +
+ // })
+ // }
+ const ywinfo = uni.getStorageSync('ywinfo') || {}
+ if (ywinfo.ywid && (ywinfo.type || ywinfo.type == 0)) {
+ this.userAuth(ywinfo.type)
+ }
} else {
// let url = window.location.href
const appID = 'wx173e6caf5abc718a'
@@ -119,27 +132,29 @@
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')
+ if (source == 0) {
+ if (res.data.token) {
+ that.$store.commit('setToken', res.data.token)
+ getUserInfo().then(ress => {
+ that.$store.commit('setDriverInfo', ress.data)
+ })
+ }
+ setTimeout(() => {
+ that.driverLogin(flag)
+ }, 200)
+ } else if (source == 2) {
+ if (res.data.token) {
+ that.$store.commit('setToken', res.data.token)
+ getUserInfo().then(ress => {
+ that.$store.commit('setUserInfo', ress.data)
+ })
}
- }, 300)
+ setTimeout(() => {
+ that.staffLogin(flag)
+ }, 200)
+ } else {
+ this.jump('/pages/index/index')
+ }
}
})
}
--
Gitblit v1.9.3