|
@@ -11,7 +11,7 @@ declare type NetResult = {
|
|
|
*/
|
|
*/
|
|
|
@injectable
|
|
@injectable
|
|
|
export default class NetService extends Service {
|
|
export default class NetService extends Service {
|
|
|
- protected url = import.meta.env.VITE_PROXY_URL
|
|
|
|
|
|
|
+ protected PROXY = '/api'
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* post方法请求接口
|
|
* post方法请求接口
|
|
@@ -100,7 +100,7 @@ export default class NetService extends Service {
|
|
|
controller.abort()
|
|
controller.abort()
|
|
|
}, timeout)
|
|
}, timeout)
|
|
|
}
|
|
}
|
|
|
- fetch(this.url + url, {
|
|
|
|
|
|
|
+ fetch(this.PROXY + url, {
|
|
|
signal,
|
|
signal,
|
|
|
...opt,
|
|
...opt,
|
|
|
headers: opt.headers || { 'Content-Type': 'application/json' }
|
|
headers: opt.headers || { 'Content-Type': 'application/json' }
|