将行业热门话题洞察的需要修改成columns

This commit is contained in:
lq
2025-06-21 16:57:01 +08:00
29 changed files with 1312 additions and 150 deletions

View File

@ -21,6 +21,11 @@ const HttpStatusCode = {
InternalServerError: 500,
};
import { useEnterpriseStore } from '@/stores/modules/enterprise';
import pinia from '@/stores';
const store = useEnterpriseStore(pinia);
const enterprise = store.getEnterpriseInfo();
//* 导出Request类可以用来自定义传递配置来创建实例
export class Request {
//* axios 实例
@ -41,6 +46,15 @@ export class Request {
(config: AxiosRequestConfig) => {
const token = localStorage.getItem('accessToken') as string;
config.headers!.Authorization = token;
if (token) {
config.headers!.Authorization = token;
} else {
config.headers!.satoken = '123';
}
if (enterprise) {
config.headers!['enterprise-id'] = enterprise.id;
}
return config;
},
(err: any) => {
@ -87,6 +101,10 @@ export class Request {
public delete<T = any>(url: string, config?: AxiosRequestConfig): Promise<T> {
return this.instance.delete(url, config);
}
public patch<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T> {
return this.instance.patch(url, data, config);
}
}
//* 默认导出Request实例