Merge remote-tracking branch 'origin/dev-nx' into dev-nx
This commit is contained in:
commit
86419027c1
|
|
@ -57,10 +57,10 @@ public class TokenController {
|
|||
|
||||
//web端登录
|
||||
@PostMapping("login")
|
||||
public R<?> login(@RequestBody LoginBody form) {
|
||||
//String decryptedData = RsaUtil.decryptByPrivateKey(form.getPassword(), privateKey);
|
||||
public R<?> login(@RequestBody LoginBody form) throws Exception {
|
||||
String decryptedData = RsaUtil.decryptByPrivateKey(form.getPassword(), privateKey);
|
||||
// 用户登录
|
||||
LoginUser userInfo = sysLoginService.login(form.getUsername(), form.getPassword());
|
||||
LoginUser userInfo = sysLoginService.login(form.getUsername(), decryptedData);
|
||||
String uuid = form.getUuid();
|
||||
String captcha = redisService.getCacheObject(CacheConstants.CAPTCHA_CODE_KEY + uuid).toString();
|
||||
if (StringUtils.isBlank(captcha)) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { login, logout, getInfo, refreshToken, checkCode, loginByMall } from '@/api/login'
|
||||
import { getToken, setToken, setExpiresIn, removeToken } from '@/utils/auth'
|
||||
import { Notification, MessageBox, Message, Loading } from 'element-ui'
|
||||
import { encrypt} from '@/utils/jsencrypt'
|
||||
import { encrypt } from '@/utils/jsencrypt'
|
||||
|
||||
const user = {
|
||||
state: {
|
||||
|
|
@ -41,7 +41,8 @@ const user = {
|
|||
// 登录
|
||||
Login({ commit }, userInfo) {
|
||||
const username = userInfo.username.trim()
|
||||
const password = encrypt(userInfo.password)
|
||||
// const password = encrypt(userInfo.password)
|
||||
const password = userInfo.password
|
||||
const code = userInfo.code
|
||||
const uuid = userInfo.uuid
|
||||
return new Promise((resolve, reject) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue