weixin_52219567 hai 2 días
pai
achega
b61b0ddecd
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/permission.ts

+ 1 - 1
src/permission.ts

@@ -65,7 +65,7 @@ function getDomainHomePath(site: string, station: ReturnType<typeof stationStore
 
   // 新增:当 userSonType 为 '3' 时,优先跳转到 /indexEnterprise(如果允许)
   const userStore = useUserStore();
-  if (userStore.userInfo?.user.userSonType === '3' && allowedPaths.includes('/indexEnterprise')) {
+  if (userStore.userInfo?.user?.userSonType == '3' && allowedPaths.includes('/indexEnterprise')) {
     return '/indexEnterprise';
   }