wujingjing
2025-03-14 863b5f27a3c9c89551b67569fd4e74e3ea8fb8e2
src/layout/component/login/login.ts
@@ -9,7 +9,6 @@
// export const ACCOUNT_EXPIRE_DAY = 10 / (24 * 60 * 60); // 10秒转换为天数
export const ACCOUNT_EXPIRE_DAY = 7; // 10秒转换为天数
export const createUserInfo = (res: any) => {
   return {
      id: res.id,
@@ -20,15 +19,18 @@
      userName: res.name,
      phoneNumber: res.phone,
      email: res.email,
      isBindWechat: res.weixin_openid ?? false,
   } as any;
};
export const handleAfterLogin = (res: any) => {
export const handleAfterLogin = (res: any, reload = true) => {
   const userInfo = createUserInfo(res);
   Local.set(userInfoKey, userInfo);
   LoginInfo.set(res.hswatersession, userInfo.userName);
   Local.set('isNewUser', !res?.web_login);
   isShowLogin.value = false;
   isLoginStatus.value = true;
   window.location.reload();
   if (reload) {
      window.location.reload();
   }
};