去除请求中的//
This commit is contained in:
parent
757a97d254
commit
697436ee71
|
|
@ -35,6 +35,8 @@ http.interceptors.request.use(config => {
|
|||
// config.baseURL = $urlMap[$env]
|
||||
const arr = config.url.split('czg/')
|
||||
config.url = baseUrl + (arr.length >= 2 ? arr[1] : arr[0])
|
||||
config.url=config.url.replace(/(?!https:\/\/)(\/+)/g, '/');
|
||||
console.log(config.url)
|
||||
// config.url = "https://dj-api.hnsiyao.cn/czg/"
|
||||
return config
|
||||
}, error => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue