使用Pinia代替Vuex进行数据存储

This commit is contained in:
RuoYi
2022-05-29 21:40:32 +08:00
parent 6f359c1534
commit 44ad220cdd
30 changed files with 479 additions and 623 deletions

View File

@ -1,11 +1,11 @@
import axios from 'axios'
import { ElNotification , ElMessageBox, ElMessage, ElLoading } from 'element-plus'
import store from '@/store'
import { getToken } from '@/utils/auth'
import errorCode from '@/utils/errorCode'
import { tansParams, blobValidate } from '@/utils/ruoyi'
import cache from '@/plugins/cache'
import { saveAs } from 'file-saver'
import useUserStore from '@/store/modules/user'
let downloadLoadingInstance;
// 是否显示重新登录
@ -85,7 +85,7 @@ service.interceptors.response.use(res => {
}
).then(() => {
isRelogin.show = false;
store.dispatch('LogOut').then(() => {
useUserStore().logOut().then(() => {
location.href = '/index';
})
}).catch(() => {