添加了登录后刷新页面

This commit is contained in:
luyuan 2020-11-09 09:21:54 +08:00
parent 945a99d4ab
commit 244011e3e4
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3

View File

@ -33,6 +33,9 @@ export async function loginpass(phone: string, password: string,type?: number,sm
store.commit("login", true); store.commit("login", true);
store.dispatch("setUserInfo"); store.dispatch("setUserInfo");
router.push("/mine/archives") router.push("/mine/archives")
setTimeout(()=>{
location.reload();
}, 1000)
} }
} }
} }
@ -636,9 +639,9 @@ export async function editsystemsetting(e?: any): Promise<boolean> {
const res = await put(`member/${store.state.userinfo.memberid}`,newdata); const res = await put(`member/${store.state.userinfo.memberid}`,newdata);
console.log(res) console.log(res)
if(res.code == 0){ if(res.code == 0){
location.reload();
message.success("修改成功") message.success("修改成功")
store.dispatch("setUserInfo"); store.dispatch("setUserInfo");
location.reload();
return true; return true;
}else{ }else{
message.error(res.msg); message.error(res.msg);