File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 28
28
"pinia" : " ^2.0.27" ,
29
29
"print-js" : " ^1.6.0" ,
30
30
"qrcodejs2-fixes" : " ^0.0.2" ,
31
+ "qs" : " ^6.11.0" ,
31
32
"screenfull" : " ^6.0.2" ,
32
33
"sortablejs" : " ^1.15.0" ,
33
34
"splitpanes" : " ^3.1.5" ,
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ declare module 'splitpanes';
5
5
declare module 'js-cookie' ;
6
6
declare module '@wangeditor/editor-for-vue' ;
7
7
declare module 'js-table2excel' ;
8
+ declare module 'qs' ;
8
9
9
10
// 声明一个模块,防止引入文件时报错
10
11
declare module '*.json' ;
Original file line number Diff line number Diff line change 1
1
import axios , { AxiosInstance , AxiosRequestConfig } from 'axios' ;
2
2
import { ElMessage , ElMessageBox } from 'element-plus' ;
3
3
import { Session } from '/@/utils/storage' ;
4
+ import qs from 'qs' ;
4
5
5
6
// 配置新建一个 axios 实例
6
7
const service : AxiosInstance = axios . create ( {
7
8
baseURL : import . meta. env . VITE_API_URL ,
8
9
timeout : 50000 ,
9
10
headers : { 'Content-Type' : 'application/json' } ,
11
+ paramsSerializer : {
12
+ serialize : function ( params ) {
13
+ return qs . stringify ( params , { allowDots : true } ) ;
14
+ }
15
+ }
10
16
} ) ;
11
17
12
18
// 添加请求拦截器
You can’t perform that action at this time.
0 commit comments