|
@@ -6,6 +6,7 @@ import { tansParams, blobValidate } from '@/utils/ruoyi'
|
|
import cache from '@/plugins/cache'
|
|
import cache from '@/plugins/cache'
|
|
import { saveAs } from 'file-saver'
|
|
import { saveAs } from 'file-saver'
|
|
import useUserStore from '@/store/modules/user'
|
|
import useUserStore from '@/store/modules/user'
|
|
|
|
+import useVoiceStore from "@/store/modules/voice";
|
|
|
|
|
|
let downloadLoadingInstance;
|
|
let downloadLoadingInstance;
|
|
// 是否显示重新登录
|
|
// 是否显示重新登录
|
|
@@ -84,7 +85,11 @@ service.interceptors.response.use(res => {
|
|
if (code === 401) {
|
|
if (code === 401) {
|
|
if (!isRelogin.show) {
|
|
if (!isRelogin.show) {
|
|
isRelogin.show = true;
|
|
isRelogin.show = true;
|
|
- ElMessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
|
|
|
|
|
+ ElMessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(async () => {
|
|
|
|
+ const voiceStore = useVoiceStore();
|
|
|
|
+ if ( voiceStore.isAuthPane ) {
|
|
|
|
+ await voiceStore.unInit();
|
|
|
|
+ }
|
|
isRelogin.show = false;
|
|
isRelogin.show = false;
|
|
useUserStore().logOut().then(() => {
|
|
useUserStore().logOut().then(() => {
|
|
location.href = '/index';
|
|
location.href = '/index';
|