优化baseURL

This commit is contained in:
D 2024-01-03 16:31:53 +08:00
parent 596b647794
commit 2956c4fa90

View File

@ -25,7 +25,7 @@ const request = <T>(config:RequestConfig):Promise<ResponseData<T>> => {
uni.request({ uni.request({
method: config.method || 'GET', method: config.method || 'GET',
timeout: config.timeout || timeout, timeout: config.timeout || timeout,
url: config.baseUrl || baseUrl + config.url, url: (config.baseUrl || baseUrl) + config.url,
data: config.data, data: config.data,
header: config.header, header: config.header,
dataType: 'json' dataType: 'json'