feat: 生成写手链接
This commit is contained in:
@ -10,6 +10,7 @@ import axios from 'axios';
|
||||
import type { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
|
||||
import { handleUserLogout, goUserLogin } from '@/utils/user';
|
||||
import { useEnterpriseStore } from '@/stores/modules/enterprise';
|
||||
import { glsWithCatch } from '@/utils/stroage';
|
||||
import pinia from '@/stores';
|
||||
|
||||
const contentType = 'application/json';
|
||||
@ -43,7 +44,7 @@ export class Request {
|
||||
(config: AxiosRequestConfig) => {
|
||||
const store = useEnterpriseStore(pinia);
|
||||
|
||||
const token = localStorage.getItem('accessToken') as string;
|
||||
const token = glsWithCatch('accessToken');
|
||||
config.headers!.Authorization = token;
|
||||
|
||||
if (store.enterpriseInfo) {
|
||||
|
||||
Reference in New Issue
Block a user