mirror of
https://github.com/talktao/Vue3-Vite-Vant-TS-H5.git
synced 2025-04-27 20:29:02 +08:00
add: 增加axios封装的注释
This commit is contained in:
parent
321109bbcf
commit
42065beebd
@ -16,12 +16,12 @@ class HttpRequest {
|
||||
private readonly withCredentials: boolean;
|
||||
private readonly timeout: number;
|
||||
constructor() {
|
||||
//获取当前环境的api地址
|
||||
this.baseURL = import.meta.env.VITE_BASE_URL as string;
|
||||
console.log(this.baseURL,'this.baseURL');
|
||||
|
||||
this.withCredentials = true;
|
||||
this.timeout = 1000 * 60;
|
||||
}
|
||||
//初始化get请求
|
||||
getInitConfig(): AxiosRequestConfig {
|
||||
return {
|
||||
baseURL: this.baseURL,
|
||||
|
Loading…
x
Reference in New Issue
Block a user