瀏覽代碼

解决报错

weixin_52219567 1 天之前
父節點
當前提交
b61b0ddecd
共有 1 個文件被更改,包括 1 次插入1 次删除
  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';
   }