diff --git a/src/request/index.js b/src/request/index.js index 2704455..872c18e 100644 --- a/src/request/index.js +++ b/src/request/index.js @@ -21,6 +21,7 @@ function filterRequestData(obj) { } return o; } +axios.defaults.withCredentials = true; //创建axios的实例 const httpService = axios.create({ baseURL: 'http://cloud.sws010.com',// TODO:具体的配置可以根据项目情况而来 @@ -34,7 +35,7 @@ httpService.interceptors.request.use(config => { // if(localStorage.getItem('token')){//判断浏览器中的cookie中是否存在项目的token // config.headers.token = localStorage.getItem('token') // }\ - config.withCredentials = true; + // config.withCredentials = true; const rqParams = filterRequestData(config.params); const rqData = filterRequestData(config.data); // post 'Content-Type' === 'application/x-www-form-urlencoded' diff --git a/src/views/Login/loginForm/index.vue b/src/views/Login/loginForm/index.vue index 1e5606a..1606b66 100644 --- a/src/views/Login/loginForm/index.vue +++ b/src/views/Login/loginForm/index.vue @@ -10,18 +10,21 @@
- + - + - 获取验证码 - + 获取验证码 + @@ -38,7 +41,7 @@