Commit 27bf4fae authored by linlinjava's avatar linlinjava
Browse files

feat[litemall-admin, litemal-admin-api]: 取消验证码相关逻辑。

parent bdb7b983
...@@ -88,20 +88,20 @@ public class AdminAuthController { ...@@ -88,20 +88,20 @@ public class AdminAuthController {
public Object login(@RequestBody String body, HttpServletRequest request) { public Object login(@RequestBody String body, HttpServletRequest request) {
String username = JacksonUtil.parseString(body, "username"); String username = JacksonUtil.parseString(body, "username");
String password = JacksonUtil.parseString(body, "password"); String password = JacksonUtil.parseString(body, "password");
String code = JacksonUtil.parseString(body, "code"); // String code = JacksonUtil.parseString(body, "code");
if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) { if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) {
return ResponseUtil.badArgument(); return ResponseUtil.badArgument();
} }
if (StringUtils.isEmpty(code)) { // if (StringUtils.isEmpty(code)) {
return ResponseUtil.fail(ADMIN_INVALID_KAPTCHA_REQUIRED, "验证码不能空"); // return ResponseUtil.fail(ADMIN_INVALID_KAPTCHA_REQUIRED, "验证码不能空");
} // }
HttpSession session = request.getSession(); // HttpSession session = request.getSession();
String kaptcha = (String)session.getAttribute("kaptcha"); // String kaptcha = (String)session.getAttribute("kaptcha");
if (Objects.requireNonNull(code).compareToIgnoreCase(kaptcha) != 0) { // if (Objects.requireNonNull(code).compareToIgnoreCase(kaptcha) != 0) {
return ResponseUtil.fail(ADMIN_INVALID_KAPTCHA, "验证码不正确", doKaptcha(request)); // return ResponseUtil.fail(ADMIN_INVALID_KAPTCHA, "验证码不正确", doKaptcha(request));
} // }
Subject currentUser = SecurityUtils.getSubject(); Subject currentUser = SecurityUtils.getSubject();
try { try {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<el-input v-model="loginForm.password" :type="passwordType" name="password" auto-complete="on" tabindex="2" show-password placeholder="管理员密码" @keyup.enter.native="handleLogin" /> <el-input v-model="loginForm.password" :type="passwordType" name="password" auto-complete="on" tabindex="2" show-password placeholder="管理员密码" @keyup.enter.native="handleLogin" />
</el-form-item> </el-form-item>
<el-form-item prop="code"> <!-- <el-form-item prop="code">
<span class="svg-container"> <span class="svg-container">
<svg-icon icon-class="lock" /> <svg-icon icon-class="lock" />
</span> </span>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<div class="login-code"> <div class="login-code">
<img :src="codeImg" @click="getCode"> <img :src="codeImg" @click="getCode">
</div> </div>
</el-form-item> </el-form-item> -->
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="handleLogin">登录</el-button> <el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="handleLogin">登录</el-button>
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</el-form> </el-form>
<div class="copyright"> <div class="copyright">
Copyright © 2020 xxx.com 版权所有 <a href="http://www.example.com/">沪ICP备xxx号</a> Copyright © 2021 xxx.com 版权所有 <a href="https://github.com/linlinjava/litemall">沪ICP备xxx号</a>
</div> </div>
</div> </div>
</template> </template>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment