Skip to content

Commit 92821dd

Browse files
committed
make captcha refresh when err
Signed-off-by: zhangtianli2006 <49156174+zhangtianli2006@users.noreply.github.com>
1 parent 965e5f8 commit 92821dd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/user/register.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<el-input type="email" v-model="ldata.email"></el-input>
2020
</el-form-item>
2121
<div class="icon-lable form-required"><i class="el-icon-check" /> Captcha</div>
22-
<captcha class="margin-bottom" />
22+
<captcha ref="captchaElement" class="margin-bottom" />
2323
<el-form-item>
2424
<el-button type="primary" v-on:click="onSubmit();" :loading="buttonLoading">Register</el-button>
2525
<el-button v-on:click="$store.state.user.showregister = false;">Cancel</el-button>
@@ -96,6 +96,9 @@ export default {
9696
};
9797
},
9898
methods: {
99+
refresh_captcha() {
100+
this.$refs.captchaElement.refresh_captcha();
101+
},
99102
submit() {
100103
this.buttonLoading = true;
101104
this.$axios
@@ -130,6 +133,7 @@ export default {
130133
// Unknown error
131134
this.$SegmentMessage.error(this, 'Unknown error');
132135
}
136+
this.refresh_captcha();
133137
this.buttonLoading = false;
134138
});
135139
},

0 commit comments

Comments
 (0)