Преглед на файлове

fix: 修复导入报错

wyf преди 9 месеца
родител
ревизия
d0bf7450ac
променени са 3 файла, в които са добавени 81 реда и са изтрити 60 реда
  1. 4 0
      tsconfig.json
  2. 3 0
      tsconfig.node.json
  3. 74 60
      types/config.d.ts

+ 4 - 0
tsconfig.json

@@ -10,6 +10,9 @@
       "@/*": [
         "src/*"
       ],
+      "/#/*": [
+        "types/*"
+      ],
       "assets/*": [
         "src/assets/*"
       ],
@@ -40,6 +43,7 @@
     "components.d.ts",
     "types/**/*.d.ts",
     "types/**/*.ts",
+    "utils/**/*.ts"
   ],
   "references": [
     {

+ 3 - 0
tsconfig.node.json

@@ -19,9 +19,12 @@
     "noUnusedParameters": true,
     "noFallthroughCasesInSwitch": true,
     "allowSyntheticDefaultImports": true,
+    "resolveJsonModule": true,
   },
   "include": [
     "vite.config.ts",
     "build/**/*.ts",
+    "utils/**/*.ts",
+    "src/utils/dateUtil.ts",
   ]
 }

+ 74 - 60
types/config.d.ts

@@ -50,74 +50,88 @@ export interface ImultiTabsSetting {
 export type NoticeChannelAppConfig = 'lanxin' | 'platform' | 'wecom';
 
 export interface GlobConfig {
+  // 标题
   title: string;
-  apiUrl: string;
-  shortName: string;
+  // api 接口前缀
   urlPrefix: string;
-  uploadUrl?: string;
-  prodMock: boolean;
-  imgUrl?: string;
-  appDownloadUrl?: string;
-  loginApp?: string;
-  appPCUrl?: string;
-  questionListVersion: string;
-  disableDepartmentEdit?: boolean;
-  hideReportMessageTabs?: boolean;
-  noticeChannel: NoticeChannelAppConfig[];
 }
 
 export interface GlobEnvConfig {
   // 标题
   VITE_GLOB_APP_TITLE: string;
-  // 接口地址
-  VITE_GLOB_API_URL: string;
   // 接口前缀
-  VITE_GLOB_API_URL_PREFIX?: string;
-  // 项目简称
-  VITE_GLOB_APP_SHORT_NAME: string;
-  // 图片上传地址
-  VITE_GLOB_UPLOAD_URL?: string;
-  //图片前缀地址
-  VITE_GLOB_IMG_URL?: string;
-  //生产环境开启mock
-  VITE_GLOB_PROD_MOCK: boolean;
-  /** 下载app的url */
-  VITE_GLOB_APP_DOWNLOAD_QRCODE: string;
-  /** 登录地址 */
-  VITE_GLOB_LOGIN_APP: string;
-  /** 地球模块登录地址 */
-  VITE_GLOB_SKYEYE_WORLD: string;
-  /** PC模块登录地址 */
-  VITE_GLOB_APP_PC: string;
-
-  VITE_GLOB_TENANT_CODE: string;
-
-  VITE_GLOB_QUESTION_LIST_VERSION: string;
-  VITE_GLOB_DISABLE_DEPARTMENT_EDIT: boolean;
-
-  // 是否隐藏掉平台违规报警 平台访问统计和人员访问数据的tab, 默认不隐藏
-  VITE_GLOB_HIDE_REPORT_MESSAGE_TABS: boolean;
-
-  // 消息管理可选择的推送渠道
-  VITE_GLOB_NOTICE_CHANNEL: NoticeChannelAppConfig[];
+  VITE_GLOB_API_URL_PREFIX: string;
 }
-export interface GlobConfig {
-  // 标题
-  title: string;
-  // 接口地址
-  apiUrl: string;
-  // 图片上传地址
-  uploadUrl?: string;
-  // api 接口前缀
-  urlPrefix: string;
-  // 项目简称
-  shortName: string;
-  // 生产环境开启 mock
-  prodMock: boolean;
-  // 图片访问地址
-  imgUrl: string | undefined;
 
-  tenantCode: string;
+// export interface GlobConfig {
+//   title: string;
+//   apiUrl: string;
+//   shortName: string;
+//   urlPrefix: string;
+//   uploadUrl?: string;
+//   prodMock: boolean;
+//   imgUrl?: string;
+//   appDownloadUrl?: string;
+//   loginApp?: string;
+//   appPCUrl?: string;
+//   questionListVersion: string;
+//   disableDepartmentEdit?: boolean;
+//   hideReportMessageTabs?: boolean;
+//   noticeChannel: NoticeChannelAppConfig[];
+// }
 
-  minifyImgUrl?: string;
-}
+// export interface GlobEnvConfig {
+//   // 标题
+//   VITE_GLOB_APP_TITLE: string;
+//   // 接口地址
+//   VITE_GLOB_API_URL: string;
+//   // 接口前缀
+//   VITE_GLOB_API_URL_PREFIX?: string;
+//   // 项目简称
+//   VITE_GLOB_APP_SHORT_NAME: string;
+//   // 图片上传地址
+//   VITE_GLOB_UPLOAD_URL?: string;
+//   //图片前缀地址
+//   VITE_GLOB_IMG_URL?: string;
+//   //生产环境开启mock
+//   VITE_GLOB_PROD_MOCK: boolean;
+//   /** 下载app的url */
+//   VITE_GLOB_APP_DOWNLOAD_QRCODE: string;
+//   /** 登录地址 */
+//   VITE_GLOB_LOGIN_APP: string;
+//   /** 地球模块登录地址 */
+//   VITE_GLOB_SKYEYE_WORLD: string;
+//   /** PC模块登录地址 */
+//   VITE_GLOB_APP_PC: string;
+
+//   VITE_GLOB_TENANT_CODE: string;
+
+//   VITE_GLOB_QUESTION_LIST_VERSION: string;
+//   VITE_GLOB_DISABLE_DEPARTMENT_EDIT: boolean;
+
+//   // 是否隐藏掉平台违规报警 平台访问统计和人员访问数据的tab, 默认不隐藏
+//   VITE_GLOB_HIDE_REPORT_MESSAGE_TABS: boolean;
+
+//   // 消息管理可选择的推送渠道
+//   VITE_GLOB_NOTICE_CHANNEL: NoticeChannelAppConfig[];
+// }
+// export interface GlobConfig {
+//   // 标题
+//   title: string;
+//   // 接口地址
+//   apiUrl: string;
+//   // 图片上传地址
+//   uploadUrl?: string;
+//   // api 接口前缀
+//   urlPrefix: string;
+//   // 项目简称
+//   shortName: string;
+//   // 生产环境开启 mock
+//   prodMock: boolean;
+//   // 图片访问地址
+//   imgUrl: string | undefined;
+
+//   tenantCode: string;
+
+//   minifyImgUrl?: string;
+// }