This commit is contained in:
xingyy 2023-12-07 11:18:53 +08:00
parent b2a0e35609
commit f7e76d780e
2 changed files with 9 additions and 9 deletions

View File

@ -1,10 +1,11 @@
import {uniFetch} from "@/http/main"; import {uniFetch} from "@/http/main";
const fetch = new uniFetch({ const fetch = new uniFetch({
baseUrl: 'https://warehouse.szjixun.cn', baseUrl: 'https://warehouse.szjixun.cn',
interceptors: { interceptors: {
//请求拦截器 //请求拦截器
request(config) { request(config) {
return config
}, },
//响应拦截器 //响应拦截器
response(response) { response(response) {
@ -17,6 +18,7 @@ const fetch=new uniFetch({
}); });
} }
} }
return response
} }
} }
}) })

View File

@ -141,6 +141,4 @@ class uniFetch {
return this.request(this.buildRequestOptions(options)); return this.request(this.buildRequestOptions(options));
} }
} }
export { uniFetch} export { uniFetch}