Răsfoiți Sursa

暂时处理登录本地存储信息,后续优化

congxuesong 3 săptămâni în urmă
părinte
comite
70bd71b205
1 a modificat fișierele cu 5 adăugiri și 1 ștergeri
  1. 5 1
      src/views/login/index.vue

+ 5 - 1
src/views/login/index.vue

@@ -850,9 +850,13 @@ const handleLogin = async () => {
       const res: any = await loginAccount(formData);
 
       if (res.data) {
-        console.log(res.data, "res.data");
         userStore.setToken(res.data.token);
         userStore.setUserInfo(res.data);
+        const userInfo = {
+          userInfo: res.data,
+          token: res.data.token
+        };
+        localSet("geeker-user", userInfo);
         if (localGet("geeker-user").userInfo.storeId) {
           localSet("createdId", localGet("geeker-user").userInfo.storeId);
         }