|
@@ -4,6 +4,7 @@ import { useUserStore } from '../store/modules/users';
|
|
|
import router from '@/router';
|
|
|
import { eventGlobal } from '.';
|
|
|
import { storage } from './storage';
|
|
|
+import { ACCESS_TOKEN_ADMIN } from '../store/mutation-types';
|
|
|
|
|
|
export interface SearchInitParams {
|
|
|
rows?: string | number;
|
|
@@ -31,8 +32,8 @@ request.interceptors.request.use(
|
|
|
let Authorization = userStore.getToken || '';
|
|
|
// 为了处理课堂乐器后台预览课件的功能
|
|
|
const authSource = sessionStorage.getItem('authSource');
|
|
|
- if (authSource === 'admin' && storage.get('authorization')) {
|
|
|
- Authorization = storage.get('authorization');
|
|
|
+ if (authSource === 'admin' && storage.get(ACCESS_TOKEN_ADMIN)) {
|
|
|
+ Authorization = storage.get(ACCESS_TOKEN_ADMIN);
|
|
|
}
|
|
|
const authHeaders: any = {};
|
|
|
// if (
|