diff --git a/src/utils/httpRequest.js b/src/utils/httpRequest.js index a79981f..72a0f98 100644 --- a/src/utils/httpRequest.js +++ b/src/utils/httpRequest.js @@ -22,7 +22,7 @@ const requestURl = "https://web-api.hnsiyao.cn/czg/";//测试 */ http.interceptors.request.use(config => { config.headers['token'] = Vue.cookie.get('token') // 请求头带上token - config.url=config.url.replace(/(?!https:\/\/)(\/+)/g, '/'); + config.url=config.url.replace('czg//','czg/') return config }, error => { return Promise.reject(error)