【更新】修改登录相关代码格式
This commit is contained in:
parent
28b66269dd
commit
2518ebc4f6
@ -89,3 +89,31 @@ export function getCaptchaOpen (parameter) {
|
|||||||
params: parameter
|
params: parameter
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取验证图片 以及token
|
||||||
|
*
|
||||||
|
* @author Jax
|
||||||
|
* @date 2021/1/22 00:00
|
||||||
|
*/
|
||||||
|
export function reqGet(data) {
|
||||||
|
return axios({
|
||||||
|
url: '/captcha/get',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 滑动或者点选验证
|
||||||
|
*
|
||||||
|
* @author Jax
|
||||||
|
* @date 2021/1/22 00:00
|
||||||
|
*/
|
||||||
|
export function reqCheck(data) {
|
||||||
|
return axios({
|
||||||
|
url: '/captcha/check',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -58,10 +58,9 @@
|
|||||||
* VerifyPoints
|
* VerifyPoints
|
||||||
* @description 点选
|
* @description 点选
|
||||||
* */
|
* */
|
||||||
// _code_chars, _code_color1, _code_color2
|
|
||||||
import { resetSize } from './../utils/util'
|
import { resetSize } from './../utils/util'
|
||||||
import { aesEncrypt } from './../utils/ase'
|
import { aesEncrypt } from './../utils/ase'
|
||||||
import { reqGet, reqCheck } from './../api/index'
|
import { reqGet, reqCheck } from '@/api/modular/system/loginManage'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'VerifyPoints',
|
name: 'VerifyPoints',
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
* */
|
* */
|
||||||
import { aesEncrypt } from './../utils/ase'
|
import { aesEncrypt } from './../utils/ase'
|
||||||
import { resetSize } from './../utils/util'
|
import { resetSize } from './../utils/util'
|
||||||
import { reqGet, reqCheck } from './../api/index'
|
import { reqGet, reqCheck } from '@/api/modular/system/loginManage'
|
||||||
|
|
||||||
// "captchaType":"blockPuzzle",
|
// "captchaType":"blockPuzzle",
|
||||||
export default {
|
export default {
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
/**
|
|
||||||
* 此处可直接引用自己项目封装好的 axios 配合后端联调
|
|
||||||
*/
|
|
||||||
import { axios } from '@/utils/request'
|
|
||||||
|
|
||||||
// 获取验证图片 以及token
|
|
||||||
export function reqGet(data) {
|
|
||||||
return axios({
|
|
||||||
url: '/captcha/get',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 滑动或者点选验证
|
|
||||||
export function reqCheck(data) {
|
|
||||||
return axios({
|
|
||||||
url: '/captcha/check',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
@ -118,23 +118,22 @@ public class SysLoginController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description 获取验证码开关
|
* 获取验证码开关
|
||||||
* @author Jax
|
*
|
||||||
* @Date 2021/1/21 15:19
|
* @author Jax
|
||||||
* @return ResponseData
|
* @date 2021/1/21 15:27
|
||||||
**/
|
*/
|
||||||
@GetMapping("/getCaptchaOpen")
|
@GetMapping("/getCaptchaOpen")
|
||||||
public ResponseData getCaptchaOpen() {
|
public ResponseData getCaptchaOpen() {
|
||||||
return new SuccessResponseData(ConstantContextHolder.getCaptchaOpenFlag());
|
return new SuccessResponseData(ConstantContextHolder.getCaptchaOpenFlag());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description 校验验证码
|
* 校验验证码
|
||||||
* @Date 2021/1/21 15:27
|
*
|
||||||
* @author Jax
|
* @author Jax
|
||||||
* @param code
|
* @date 2021/1/21 15:27
|
||||||
* @return boolean
|
*/
|
||||||
**/
|
|
||||||
private boolean verificationCode(String code) {
|
private boolean verificationCode(String code) {
|
||||||
CaptchaVO vo = new CaptchaVO();
|
CaptchaVO vo = new CaptchaVO();
|
||||||
vo.setCaptchaVerification(code);
|
vo.setCaptchaVerification(code);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user