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)=> {
setTimeout(()=> {
resolve()

View File

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

View File

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