Commit 9d3b772272d1b7563cff4a37c24f2ab2b375fe36
1 parent
d9059fcc
密码加密传递暂时注释掉
Showing
2 changed files
with
14 additions
and
15 deletions
ant-design-vue-jeecg/src/views/user/Login.vue
@@ -227,17 +227,9 @@ | @@ -227,17 +227,9 @@ | ||
227 | created () { | 227 | created () { |
228 | Vue.ls.remove(ACCESS_TOKEN) | 228 | Vue.ls.remove(ACCESS_TOKEN) |
229 | this.getRouterData(); | 229 | this.getRouterData(); |
230 | - this.getEncrypte(); | ||
231 | - // update-begin- --- author:scott ------ date:20190225 ---- for:暂时注释,未实现登录验证码功能 | ||
232 | -// this.$http.get('/auth/2step-code') | ||
233 | -// .then(res => { | ||
234 | -// this.requiredTwoStepCaptcha = res.result.stepCode | ||
235 | -// }).catch(err => { | ||
236 | -// console.log('2step-code:', err) | ||
237 | -// }) | ||
238 | - // update-end- --- author:scott ------ date:20190225 ---- for:暂时注释,未实现登录验证码功能 | ||
239 | - // this.requiredTwoStepCaptcha = true | ||
240 | - | 230 | + // update-begin- --- author:scott ------ date:20190805 ---- for:密码加密逻辑暂时注释掉,有点问题 |
231 | + //this.getEncrypte(); | ||
232 | + // update-end- --- author:scott ------ date:20190805 ---- for:密码加密逻辑暂时注释掉,有点问题 | ||
241 | }, | 233 | }, |
242 | methods: { | 234 | methods: { |
243 | ...mapActions([ "Login", "Logout","PhoneLogin" ]), | 235 | ...mapActions([ "Login", "Logout","PhoneLogin" ]), |
@@ -266,8 +258,12 @@ | @@ -266,8 +258,12 @@ | ||
266 | that.form.validateFields([ 'username', 'password','inputCode' ], { force: true }, (err, values) => { | 258 | that.form.validateFields([ 'username', 'password','inputCode' ], { force: true }, (err, values) => { |
267 | if (!err) { | 259 | if (!err) { |
268 | loginParams.username = values.username | 260 | loginParams.username = values.username |
261 | + // update-begin- --- author:scott ------ date:20190805 ---- for:密码加密逻辑暂时注释掉,有点问题 | ||
269 | //loginParams.password = md5(values.password) | 262 | //loginParams.password = md5(values.password) |
270 | - loginParams.password = encryption(values.password,that.encryptedString.key,that.encryptedString.iv).replace(/\+/g,"%2B"); | 263 | + //loginParams.password = encryption(values.password,that.encryptedString.key,that.encryptedString.iv) |
264 | + loginParams.password = values.password | ||
265 | + // update-begin- --- author:scott ------ date:20190805 ---- for:密码加密逻辑暂时注释掉,有点问题 | ||
266 | + | ||
271 | that.Login(loginParams).then((res) => { | 267 | that.Login(loginParams).then((res) => { |
272 | this.departConfirm(res) | 268 | this.departConfirm(res) |
273 | }).catch((err) => { | 269 | }).catch((err) => { |
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/LoginController.java
@@ -67,8 +67,11 @@ public class LoginController { | @@ -67,8 +67,11 @@ public class LoginController { | ||
67 | Result<JSONObject> result = new Result<JSONObject>(); | 67 | Result<JSONObject> result = new Result<JSONObject>(); |
68 | String username = sysLoginModel.getUsername(); | 68 | String username = sysLoginModel.getUsername(); |
69 | String password = sysLoginModel.getPassword(); | 69 | String password = sysLoginModel.getPassword(); |
70 | - //步骤1:TODO 前端密码加密,后端进行密码解密,防止传输密码篡改等问题,不配就直接提示密码错误,并记录日志后期进行统计分析是否锁定 | ||
71 | - password = AesEncryptUtil.desEncrypt(sysLoginModel.getPassword().replaceAll("%2B", "\\+")).trim();//密码解密 | 70 | + //update-begin--Author:scott Date:20190805 for:暂时注释掉密码加密逻辑,有点问题 |
71 | + //前端密码加密,后端进行密码解密 | ||
72 | + //password = AesEncryptUtil.desEncrypt(sysLoginModel.getPassword().replaceAll("%2B", "\\+")).trim();//密码解密 | ||
73 | + //update-begin--Author:scott Date:20190805 for:暂时注释掉密码加密逻辑,有点问题 | ||
74 | + | ||
72 | //1. 校验用户是否有效 | 75 | //1. 校验用户是否有效 |
73 | SysUser sysUser = sysUserService.getUserByName(username); | 76 | SysUser sysUser = sysUserService.getUserByName(username); |
74 | result = sysUserService.checkUserIsEffective(sysUser); | 77 | result = sysUserService.checkUserIsEffective(sysUser); |
@@ -263,7 +266,7 @@ public class LoginController { | @@ -263,7 +266,7 @@ public class LoginController { | ||
263 | * @return | 266 | * @return |
264 | */ | 267 | */ |
265 | @PostMapping("/phoneLogin") | 268 | @PostMapping("/phoneLogin") |
266 | - public Result<JSONObject> login(@RequestBody JSONObject jsonObject) { | 269 | + public Result<JSONObject> phoneLogin(@RequestBody JSONObject jsonObject) { |
267 | Result<JSONObject> result = new Result<JSONObject>(); | 270 | Result<JSONObject> result = new Result<JSONObject>(); |
268 | String phone = jsonObject.getString("mobile"); | 271 | String phone = jsonObject.getString("mobile"); |
269 | 272 |