refactor: axios methods and env

This commit is contained in:
xiaoxian521
2021-12-04 01:16:50 +08:00
parent a845d4f237
commit 11bf711838
25 changed files with 522 additions and 585 deletions

25
src/utils/http/README.md Normal file
View File

@@ -0,0 +1,25 @@
## 用法
### Get 请求
```
import { http } from "/@/utils/http";
// params传参
http.request('get', '/xxx', { params: param });
// url拼接传参
http.request('get', '/xxx?message=' + msg);
```
### Post 请求
```
import { http } from "/@/utils/http";
// params传参
http.request('get', '/xxx', { params: param });
// data传参
http.request('get', '/xxx', { data: param });
```