处理双//请求问题
This commit is contained in:
parent
8e1c9d8e1d
commit
830991def7
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue