增加注册

This commit is contained in:
gyq
2024-02-19 14:43:57 +08:00
parent b32c47c176
commit 786bceb7a4
9 changed files with 262 additions and 42 deletions

View File

@@ -30,9 +30,9 @@ export const useUser = defineStore("useUser", {
userlogin(param) {
return login(param).then((res) => {
// console.log(res);
this.userInfo = res;
this.userInfo = res.userinfo;
_hook.useLocalStorage.set("token", this.userInfo.token);
_hook.useLocalStorage.set("userInfo", this.userInfo.user);
_hook.useLocalStorage.set("userInfo", this.userInfo);
return this.userInfo;
});
},