(#48) Core Api baseUrl param can be overridden

This commit is contained in:
2022-01-20 16:10:55 +08:00
parent 63300f68f8
commit 14d0c9c123
+8 -7
View File
@@ -168,17 +168,18 @@ class API<
> {
/**
* 基础 URL
* TODO: 这里可能涉及负载均衡
* 默认调试标签
*/
public static get baseUrl():string {
return "https://jwc.nogg.cn";
}
public static defaultLogLabel:LogLabel = new LogLabel(
`API:API`, colorRadio(200, 120, 222)
);
/**
* 基础 URL
* TODO: 这里可能涉及负载均衡
*/
public baseUrl: string = "https://jwc.nogg.cn";
/**
* Logger 使用的标签
*/
@@ -319,7 +320,7 @@ class API<
// 重置请求数据
const requestData:IWxRequestOption<O> = this.requestData = {
url: API.baseUrl + this.url,
url: this.baseUrl + this.url,
data: {}, header: {},
timeout: this.timeout,
method: this.method,