去除登录验证码-JOY 10点52分

This commit is contained in:
JOY 2020-05-14 10:55:29 +08:00
parent ddcabaa6fb
commit 8bf9eed784
9 changed files with 20 additions and 36 deletions

View File

@ -1,18 +1,3 @@
## 平台简介
一直想做一款后台管理系统看了很多优秀的开源项目但是发现没有合适的。于是利用空闲休息时间开始自己写了一套后台系统。如此有了若依。她可以用于所有的Web应用程序如网站管理后台网站会员中心CMSCRMOA。所有前端后台代码封装过后十分精简易上手出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。
性别男,若依是给还没有出生女儿取的名字(寓意:你若不离不弃,我必生死相依)
参考后台模板[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)
> 阿里云服务器89元/年双12年末特惠爆款产品限时1折 [点我进入](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link)
> 如需不分离应用,请移步 [RuoYi](https://gitee.com/y_project/RuoYi) `(保持同步更新)`,如需其他版本,请移步 [项目扩展](http://doc.ruoyi.vip/ruoyi/document/xmkz.html) `(不定时更新)`
> 阿里云通用云产品1888优惠券 [点我领取](https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=brki8iof)    腾讯云通用云产品2860优惠券 [点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)  `(仅限新用户)`
> 阿里云Hi拼购 限量爆款 低至199元/年 [点我进入](https://www.aliyun.com/acts/hi-group-buying?userCode=brki8iof)  `(仅限新用户)`
## 内置功能 ## 内置功能

View File

@ -1,8 +1,8 @@
{ {
"name": "ruoyi", "name": "ruoyi",
"version": "2.2.0", "version": "2.2.0",
"description": "若依管理系统", "description": "AoLetter管理系统",
"author": "若依", "author": "AoLetter",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"dev": "vue-cli-service serve", "dev": "vue-cli-service serve",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 KiB

After

Width:  |  Height:  |  Size: 132 KiB

View File

@ -26,7 +26,7 @@ export default {
}, },
data() { data() {
return { return {
title: '若依管理系统', title: 'AoLetter管理系统',
logo: logoImg logo: logoImg
} }
} }

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
title: '若依管理系统', title: 'AoLetter管理系统',
/** /**
* 是否系统布局配置 * 是否系统布局配置

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="login"> <div class="login">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<h3 class="title">若依后台管理系统</h3> <h3 class="title">AoLetter管理系统</h3>
<el-form-item prop="username"> <el-form-item prop="username">
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号"> <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" /> <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
@ -18,7 +18,7 @@
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" /> <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="code"> <!-- <el-form-item prop="code">
<el-input <el-input
v-model="loginForm.code" v-model="loginForm.code"
auto-complete="off" auto-complete="off"
@ -31,7 +31,7 @@
<div class="login-code"> <div class="login-code">
<img :src="codeUrl" @click="getCode" /> <img :src="codeUrl" @click="getCode" />
</div> </div>
</el-form-item> </el-form-item> -->
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox> <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
<el-form-item style="width:100%;"> <el-form-item style="width:100%;">
<el-button <el-button
@ -48,7 +48,7 @@
</el-form> </el-form>
<!-- 底部 --> <!-- 底部 -->
<div class="el-login-footer"> <div class="el-login-footer">
<span>Copyright © 2018-2019 ruoyi.vip All Rights Reserved.</span> <span>Copyright © 2019-2020 AoLetter All Rights Reserved.</span>
</div> </div>
</div> </div>
</template> </template>
@ -77,8 +77,8 @@ export default {
], ],
password: [ password: [
{ required: true, trigger: "blur", message: "密码不能为空" } { required: true, trigger: "blur", message: "密码不能为空" }
], ]
code: [{ required: true, trigger: "change", message: "验证码不能为空" }] // code: [{ required: true, trigger: "change", message: "" }]
}, },
loading: false, loading: false,
redirect: undefined redirect: undefined

View File

@ -40,11 +40,11 @@ public class SysLoginService
* *
* @param username 用户名 * @param username 用户名
* @param password 密码 * @param password 密码
* @param captcha 验证码 * @param 验证码
* @param uuid 唯一标识 * @param uuid 唯一标识
* @return 结果 * @return 结果
*/ */
public String login(String username, String password, String code, String uuid) public String login(String username, String password, String uuid)
{ {
String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid; String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid;
String captcha = redisCache.getCacheObject(verifyKey); String captcha = redisCache.getCacheObject(verifyKey);
@ -54,11 +54,11 @@ public class SysLoginService
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire"))); AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire")));
throw new CaptchaExpireException(); throw new CaptchaExpireException();
} }
if (!code.equalsIgnoreCase(captcha)) // if (!code.equalsIgnoreCase(captcha))
{ // {
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error"))); // AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error")));
throw new CaptchaException(); // throw new CaptchaException();
} // }
// 用户验证 // 用户验证
Authentication authentication = null; Authentication authentication = null;
try try

View File

@ -53,8 +53,7 @@ public class SysLoginController
{ {
AjaxResult ajax = AjaxResult.success(); AjaxResult ajax = AjaxResult.success();
// 生成令牌 // 生成令牌
String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(), String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getUuid());
loginBody.getUuid());
ajax.put(Constants.TOKEN, token); ajax.put(Constants.TOKEN, token);
return ajax; return ajax;
} }

View File

@ -6,9 +6,9 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: master:
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://106.12.83.223:3306/aos-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root username: root
password: password password: nb666666
# 从库数据源 # 从库数据源
slave: slave:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭