去除请求里的//
This commit is contained in:
parent
9b24bee14e
commit
8e1c9d8e1d
|
|
@ -14,15 +14,15 @@ const http = axios.create({
|
|||
})
|
||||
|
||||
// const requestURl = "http://localhost:8100/czg/";
|
||||
const requestURl = "https://web-api.hnsiyao.cn/czg/";
|
||||
// const requestURl = "https://web.hnsiyao.cn/czg/";
|
||||
const requestURl = "https://web-api.hnsiyao.cn/czg/";//测试
|
||||
// const requestURl = "https://web.hnsiyao.cn/czg/";//正式
|
||||
|
||||
/**
|
||||
* 请求拦截
|
||||
*/
|
||||
http.interceptors.request.use(config => {
|
||||
console.log(Vue.cookie.get('token'))
|
||||
config.headers['token'] = Vue.cookie.get('token') // 请求头带上token
|
||||
config.url=config.url.replace(/(?!https:\/\/)(\/+)/g, '/');
|
||||
return config
|
||||
}, error => {
|
||||
return Promise.reject(error)
|
||||
|
|
|
|||
Loading…
Reference in New Issue