This commit is contained in:
aihe 2024-07-11 22:33:38 +08:00
parent 62d69c142e
commit a869b04c3b
3 changed files with 5 additions and 2 deletions

View File

@ -245,7 +245,7 @@ const uniPromiseApi = (name, options = {}, extObj = { })=> {
}) })
} }
const promiseTimeout = (time) => { const promiseTimeout = (time = 300) => {
return new Promise((resolve, reject)=> { return new Promise((resolve, reject)=> {
setTimeout(()=> { setTimeout(()=> {
resolve() resolve()

View File

@ -3,7 +3,7 @@
"appid" : "__UNI__BCB0FB5", "appid" : "__UNI__BCB0FB5",
"description" : "探路国际速运", "description" : "探路国际速运",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : "1017", "versionCode" : "1018",
"transformPx" : false, "transformPx" : false,
/* 5+App特有相关 */ /* 5+App特有相关 */
"app-plus" : { "app-plus" : {

View File

@ -49,6 +49,7 @@
import { getSessionLoginInfo, setSessionLoginInfo, setSessionXToken } from "@/session" import { getSessionLoginInfo, setSessionLoginInfo, setSessionXToken } from "@/session"
import { encrypt } from "@/common/libs/jsencrypt_utils" import { encrypt } from "@/common/libs/jsencrypt_utils"
import { getSystemInfo } from "@/common/appUpdate" import { getSystemInfo } from "@/common/appUpdate"
import { promiseTimeout } from "@/common/untool"
export default { export default {
props: { props: {
@ -76,6 +77,7 @@
if(remberPassport[0]) { if(remberPassport[0]) {
Object.assign(this.submitParams, info) Object.assign(this.submitParams, info)
} }
setSessionXToken() // 登录前先清除xtoke
}, },
methods: { methods: {
async handleLogin() { async handleLogin() {
@ -90,6 +92,7 @@
username: encrypt(submitParams.username), username: encrypt(submitParams.username),
} : {}) } : {})
}) })
await promiseTimeout(300)
await this.$store.dispatch(USERKEY.GETUSERINFO) await this.$store.dispatch(USERKEY.GETUSERINFO)
setSessionLoginInfo(submitParams) setSessionLoginInfo(submitParams)
this.goto("tabBar/home/home") this.goto("tabBar/home/home")