调整验证码校验规则保证前后端配置一致 #794
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
class="login_panle_form_title_logo"
|
||||
:src="$GIN_VUE_ADMIN.appLogo"
|
||||
alt
|
||||
/>
|
||||
>
|
||||
<p class="login_panle_form_title_p">{{ $GIN_VUE_ADMIN.appName }}</p>
|
||||
</div>
|
||||
<el-form
|
||||
@@ -50,19 +50,20 @@
|
||||
:src="picPath"
|
||||
alt="请输入验证码"
|
||||
@click="loginVerify()"
|
||||
/>
|
||||
>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" style="width: 46%" @click="checkInit"
|
||||
>前往初始化</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 46%"
|
||||
@click="checkInit"
|
||||
>前往初始化</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 46%; margin-left: 8%"
|
||||
@click="submitForm"
|
||||
>登 录</el-button
|
||||
>
|
||||
>登 录</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -70,16 +71,16 @@
|
||||
<div class="login_panle_foot">
|
||||
<div class="links">
|
||||
<a href="http://doc.henrongyi.top/">
|
||||
<img src="@/assets/docs.png" class="link-icon" />
|
||||
<img src="@/assets/docs.png" class="link-icon">
|
||||
</a>
|
||||
<a href="https://www.yuque.com/flipped-aurora/">
|
||||
<img src="@/assets/yuque.png" class="link-icon" />
|
||||
<img src="@/assets/yuque.png" class="link-icon">
|
||||
</a>
|
||||
<a href="https://github.com/flipped-aurora/gin-vue-admin">
|
||||
<img src="@/assets/github.png" class="link-icon" />
|
||||
<img src="@/assets/github.png" class="link-icon">
|
||||
</a>
|
||||
<a href="https://space.bilibili.com/322210472">
|
||||
<img src="@/assets/video.png" class="link-icon" />
|
||||
<img src="@/assets/video.png" class="link-icon">
|
||||
</a>
|
||||
</div>
|
||||
<div class="copyright">
|
||||
@@ -124,8 +125,6 @@ export default {
|
||||
password: [{ validator: checkPassword, trigger: 'blur' }],
|
||||
captcha: [{ required: true, message: '请输入验证码', trigger: 'blur' },
|
||||
{
|
||||
min: 5,
|
||||
max: 6,
|
||||
message: '验证码格式不正确',
|
||||
trigger: 'blur',
|
||||
}]
|
||||
@@ -180,6 +179,8 @@ export default {
|
||||
},
|
||||
loginVerify() {
|
||||
captcha({}).then((ele) => {
|
||||
this.rules.captcha[1].max = ele.data.captchaLength
|
||||
this.rules.captcha[1].min = ele.data.captchaLength
|
||||
this.picPath = ele.data.picPath
|
||||
this.loginForm.captchaId = ele.data.captchaId
|
||||
})
|
||||
@@ -189,9 +190,6 @@ export default {
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/style/newLogin.scss";
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user