update vue3

This commit is contained in:
RuoYi
2025-05-19 12:05:06 +08:00
parent 8461a8c723
commit a0c493d05e
2 changed files with 4 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
import store from '@/store'
import { useUserStore } from '@/store'
import config from '@/config'
import { getToken } from '@/utils/auth'
import errorCode from '@/utils/errorCode'
@@ -35,7 +35,7 @@ const request = config => {
if (code === 401) {
showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
if (res.confirm) {
store.dispatch('LogOut').then(res => {
useUserStore().logOut().then(res => {
uni.reLaunch({ url: '/pages/login' })
})
}

View File

@@ -1,4 +1,4 @@
import store from '@/store'
import { useUserStore } from '@/store'
import config from '@/config'
import { getToken } from '@/utils/auth'
import errorCode from '@/utils/errorCode'
@@ -37,7 +37,7 @@ export default function upload(config) {
} else if (code == 401) {
showConfirm("登录状态已过期,您可以继续留在该页面,或者重新登录?").then(res => {
if (res.confirm) {
store.dispatch('LogOut').then(res => {
useUserStore().logOut().then(res => {
uni.reLaunch({ url: '/pages/login/login' })
})
}