You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
392 B

4 years ago
4 years ago
  1. ## 用法
  2. ### Get 请求
  3. ```
  4. import { http } from "@/utils/http";
  5. // params传参
  6. http.request('get', '/xxx', { params: param });
  7. // url拼接传参
  8. http.request('get', '/xxx?message=' + msg);
  9. ```
  10. ### Post 请求
  11. ```
  12. import { http } from "@/utils/http";
  13. // params传参
  14. http.request('post', '/xxx', { params: param });
  15. // data传参
  16. http.request('post', '/xxx', { data: param });
  17. ```