From 496a293465bb802070e44ff741093a9578eb0e77 Mon Sep 17 00:00:00 2001 From: xiaowen <372193233@qq.com> Date: Fri, 23 Dec 2022 13:59:38 +0800 Subject: [PATCH] cxw-010203 --- src/request/index.js | 3 +- src/views/Login/loginForm/index.vue | 79 ++++++++++++++++------------- 2 files changed, 45 insertions(+), 37 deletions(-) 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 @@