去除请求中的//

This commit is contained in:
YeMingfei666 2024-12-30 18:23:10 +08:00
parent 757a97d254
commit 697436ee71
1 changed files with 2 additions and 0 deletions

View File

@ -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 => {