diff --git a/bookmark_front/src/views/public/register/index.vue b/bookmark_front/src/views/public/register/index.vue index 7ad8b20..619378c 100644 --- a/bookmark_front/src/views/public/register/index.vue +++ b/bookmark_front/src/views/public/register/index.vue @@ -81,12 +81,12 @@ export default { }; }, methods: { - submit() { + async submit() { let _this = this; this.$refs.registerForm.validate(async (status) => { if (status) { let res = await httpUtil.put("/user", null, _this.form); - this.$store.dispatch("globalConfig/setToken", res); + await this.$store.dispatch("globalConfig/setToken", res); this.$router.replace("/"); } });