fix:修复注册进入主页后显示未登录
This commit is contained in:
parent
c467970e93
commit
f048496d73
@ -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("/");
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user