Skip to content

Commit

Permalink
Add email verification feature to login-register-dialog.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
luoyunchong committed May 19, 2024
1 parent 68cf404 commit 30569cc
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/view/account/login-register-dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
v-model="form.verification_code"
prefix-icon="HelpFilled"
placeholder="请输入验证码"
minlength="4"
maxlength="4"
minlength="6"
maxlength="6"
style="width: 165px"
clearable
></el-input>
Expand Down Expand Up @@ -255,7 +255,7 @@ export default {
},
async register() {
this.loading = true
await User.registerAccount(
var res = await User.registerAccount(
{
nickname: this.form.nickname,
password: this.form.password,
Expand All @@ -267,6 +267,10 @@ export default {
).finally(() => {
this.loading = false
})
if (res.code !== 0) {
this.$message.error(res.message)
return
}
this.form.username = this.form.email
this.$message.success('注册成功')
// // Show reCAPTCHA badge:
Expand Down

0 comments on commit 30569cc

Please sign in to comment.