fix:修复注册进入主页后显示未登录

This commit is contained in:
fanxb 2022-03-30 14:19:38 +08:00
parent c467970e93
commit f048496d73

View File

@ -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("/");
}
});