diff --git a/.env.development b/.env.development index 922164d..3c5fcd5 100644 --- a/.env.development +++ b/.env.development @@ -17,7 +17,9 @@ VITE_DROP_CONSOLE = false # 接口地址 # 如果没有跨域问题,直接在这里配置即可 -VITE_GLOB_API_URL=http://10.133.96.105:8077 +VITE_GLOB_API_URL=http://10.133.96.137:8090 +# VITE_GLOB_API_URL=http://10.4.126.67:30000 +# VITE_GLOB_API_URL=http://10.0.252.25:8090 #VITE_GLOB_REQUEST_TIMEOUT=20000 # 报表系统地址 VITE_GLOB_REPORT_URL=http://10.133.96.105:3100 @@ -38,8 +40,8 @@ VITE_GLOB_PRINT_BASE_URL = http://114.116.210.204:3300 VITE_GLOB_API_URL_PREFIX = #租户开关 -# VITE_TENANT_ENABLED = true +# VITE_GLOB_TENANT_ENABLED = true # 屏蔽通知消息的轮询 -VITE_DISABLE_NEWS=false +VITE_GLOB_DISABLE_NEWS=false # 禁用关闭页面提示 -# VITE_CLOSE_ALERT_DISABLED=true +# VITE_GLOB_CLOSE_ALERT_DISABLED=true diff --git a/.env.development.example b/.env.development.example index 2f8de6d..40cc05c 100644 --- a/.env.development.example +++ b/.env.development.example @@ -35,4 +35,4 @@ VITE_GLOB_PRINT_BASE_URL = http://114.116.210.204:3300 VITE_GLOB_API_URL_PREFIX = # 屏蔽通知消息的轮询 -VITE_DISABLE_NEWS = true +VITE_GLOB_DISABLE_NEWS = true diff --git a/.env.production b/.env.production index f0c9ac6..2867d21 100644 --- a/.env.production +++ b/.env.production @@ -37,4 +37,8 @@ VITE_GLOB_API_URL_PREFIX = # 打包是否开启pwa功能 VITE_USE_PWA = false #租户开关 -VITE_TENANT_ENABLED = true +VITE_GLOB_TENANT_ENABLED = true +# 屏蔽通知消息的轮询 +VITE_GLOB_DISABLE_NEWS=false +# 禁用关闭页面提示 +# VITE_GLOB_CLOSE_ALERT_DISABLED=true diff --git a/.vscode/settings.json b/.vscode/settings.json index 2dd8666..7f2af8d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,144 +1,142 @@ { - "typescript.tsdk": "./node_modules/typescript/lib", - "volar.tsPlugin": true, - "volar.tsPluginStatus": false, - "npm.packageManager": "pnpm", - "editor.tabSize": 2, - "editor.defaultFormatter": "esbenp.prettier-vscode", - "files.eol": "\n", - "search.exclude": { - "**/node_modules": true, - "**/*.log": true, - "**/*.log*": true, - "**/bower_components": true, - "**/dist": true, - "**/elehukouben": true, - "**/.git": true, - "**/.gitignore": true, - "**/.svn": true, - "**/.DS_Store": true, - "**/.idea": true, - "**/.vscode": false, - "**/yarn.lock": true, - "**/tmp": true, - "out": true, - "dist": true, - "node_modules": true, - "CHANGELOG.md": true, - "examples": true, - "res": true, - "screenshots": true, - "yarn-error.log": true, - "**/.yarn": true - }, - "files.exclude": { - "**/.cache": true, - "**/.editorconfig": true, - "**/.eslintcache": true, - "**/bower_components": true, - "**/.idea": true, - "**/tmp": true, - "**/.git": true, - "**/.svn": true, - "**/.hg": true, - "**/CVS": true, - "**/.DS_Store": true - }, - "files.watcherExclude": { - "**/.git/objects/**": true, - "**/.git/subtree-cache/**": true, - "**/.vscode/**": true, - "**/node_modules/**": true, - "**/tmp/**": true, - "**/bower_components/**": true, - "**/dist/**": true, - "**/yarn.lock": true - }, - "stylelint.enable": true, - "stylelint.validate": ["css", "less", "postcss", "scss", "vue", "sass"], - "path-intellisense.mappings": { - "/@/": "${workspaceRoot}/src" - }, - "[javascriptreact]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[typescriptreact]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[html]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[css]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[less]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[scss]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[markdown]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "editor.codeActionsOnSave": { - "source.fixAll.eslint": "explicit" - }, - "[vue]": { - "editor.codeActionsOnSave": { - "source.fixAll.eslint": "explicit", - "source.fixAll.stylelint": "explicit" + "typescript.tsdk": "./node_modules/typescript/lib", + "volar.tsPlugin": true, + "volar.tsPluginStatus": false, + "npm.packageManager": "pnpm", + "editor.tabSize": 2, + "editor.defaultFormatter": "esbenp.prettier-vscode", + "files.eol": "\n", + "search.exclude": { + "**/node_modules": true, + "**/*.log": true, + "**/*.log*": true, + "**/bower_components": true, + "**/dist": true, + "**/elehukouben": true, + "**/.git": true, + "**/.gitignore": true, + "**/.svn": true, + "**/.DS_Store": true, + "**/.idea": true, + "**/.vscode": false, + "**/yarn.lock": true, + "**/tmp": true, + "out": true, + "dist": true, + "node_modules": true, + "CHANGELOG.md": true, + "examples": true, + "res": true, + "screenshots": true, + "yarn-error.log": true, + "**/.yarn": true }, - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "i18n-ally.localesPaths": ["src/locales/lang"], - "i18n-ally.keystyle": "nested", - "i18n-ally.sortKeys": true, - "i18n-ally.namespace": true, - "i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}", - "i18n-ally.enabledParsers": ["ts"], - "i18n-ally.sourceLanguage": "en", - "i18n-ally.displayLanguage": "zh-CN", - "i18n-ally.enabledFrameworks": ["vue", "react"], - "cSpell.words": [ - "vben", - "windi", - "browserslist", - "tailwindcss", - "esnext", - "antv", - "tinymce", - "qrcode", - "sider", - "pinia", - "sider", - "nprogress", - "INTLIFY", - "stylelint", - "esno", - "vitejs", - "sortablejs", - "mockjs", - "codemirror", - "iconify", - "commitlint", - "vditor", - "echarts", - "cropperjs", - "logicflow", - "vueuse", - "zxcvbn", - "lintstagedrc", - "brotli", - "tailwindcss", - "sider", - "pnpm", - "antd" - ], - "files.autoSave": "onFocusChange", - "editor.formatOnSave": true, - "eslint.codeActionsOnSave.rules": null, - "vue3snippets.enable-compile-vue-file-on-did-save-code": false + "files.exclude": { + "**/.cache": true, + "**/.editorconfig": true, + "**/.eslintcache": true, + "**/bower_components": true, + "**/.idea": true, + "**/tmp": true, + "**/.git": true, + "**/.svn": true, + "**/.hg": true, + "**/CVS": true, + "**/.DS_Store": true + }, + "files.watcherExclude": { + "**/.git/objects/**": true, + "**/.git/subtree-cache/**": true, + "**/.vscode/**": true, + "**/node_modules/**": true, + "**/tmp/**": true, + "**/bower_components/**": true, + "**/dist/**": true, + "**/yarn.lock": true + }, + "stylelint.enable": true, + "stylelint.validate": ["css", "less", "postcss", "scss", "vue", "sass"], + "path-intellisense.mappings": { + "/@/": "${workspaceRoot}/src" + }, + "[javascriptreact]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[typescriptreact]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[html]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[css]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[less]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[scss]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[markdown]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit" + }, + "[vue]": { + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit" + }, + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "i18n-ally.localesPaths": ["src/locales/lang"], + "i18n-ally.keystyle": "nested", + "i18n-ally.sortKeys": true, + "i18n-ally.namespace": true, + "i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}", + "i18n-ally.enabledParsers": ["ts"], + "i18n-ally.sourceLanguage": "en", + "i18n-ally.displayLanguage": "zh-CN", + "i18n-ally.enabledFrameworks": ["vue", "react"], + "cSpell.words": [ + "vben", + "windi", + "browserslist", + "tailwindcss", + "esnext", + "antv", + "tinymce", + "qrcode", + "sider", + "pinia", + "sider", + "nprogress", + "INTLIFY", + "stylelint", + "esno", + "vitejs", + "sortablejs", + "mockjs", + "codemirror", + "iconify", + "commitlint", + "vditor", + "echarts", + "cropperjs", + "logicflow", + "vueuse", + "zxcvbn", + "lintstagedrc", + "brotli", + "tailwindcss", + "sider", + "pnpm", + "antd" + ], + "eslint.codeActionsOnSave.rules": null, + "vue3snippets.enable-compile-vue-file-on-did-save-code": false } diff --git a/src/App.vue b/src/App.vue index 377faad..81fc062 100644 --- a/src/App.vue +++ b/src/App.vue @@ -55,7 +55,7 @@ return '关闭提示'; }; - if(!getAppEnvConfig().VITE_CLOSE_ALERT_DISABLED){ + if(!getAppEnvConfig().VITE_GLOB_CLOSE_ALERT_DISABLED){ window.addEventListener('beforeunload', beforeUnloadHandler); } diff --git a/src/layouts/default/header/components/notify/index.vue b/src/layouts/default/header/components/notify/index.vue index 9dc9a98..a872809 100644 --- a/src/layouts/default/header/components/notify/index.vue +++ b/src/layouts/default/header/components/notify/index.vue @@ -196,7 +196,7 @@ if (o.read) o.read = []; }); try { - let res = import.meta.env.VITE_DISABLE_NEWS ? [] : await getOaNews(1); + let res = import.meta.env.VITE_GLOB_DISABLE_NEWS ? [] : await getOaNews(1); res.list.forEach((o) => { if (!o.readId) listData.value[0].unreadNum += 1; listData.value[0].list.push({ @@ -210,7 +210,7 @@ read: o.isRead, }); }); - let res1 = import.meta.env.VITE_DISABLE_NEWS ? [] : await getOaNews(2); + let res1 = import.meta.env.VITE_GLOB_DISABLE_NEWS ? [] : await getOaNews(2); res1.list.forEach((o) => { if (!o.readId) listData.value[1].unreadNum += 1; listData.value[1].list.push({ @@ -224,7 +224,7 @@ read: o.isRead, }); }); - let res2 = import.meta.env.VITE_DISABLE_NEWS ? [] : await getOaMessage(); + let res2 = import.meta.env.VITE_GLOB_DISABLE_NEWS ? [] : await getOaMessage(); res2.forEach((o) => { if (o.messageType === 0) { if (!o.isRead) listData.value[2].unreadNum += 1; diff --git a/src/layouts/default/header/index.vue b/src/layouts/default/header/index.vue index 6bd3edf..1808d29 100644 --- a/src/layouts/default/header/index.vue +++ b/src/layouts/default/header/index.vue @@ -25,7 +25,7 @@ - + diff --git a/src/utils/env.ts b/src/utils/env.ts index b5218cf..e6a512f 100644 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -22,7 +22,7 @@ export function getAppEnvConfig() { (import.meta.env as unknown as GlobEnvConfig) : window[ENV_NAME as any]) as unknown as GlobEnvConfig; - const { VITE_GLOB_APP_TITLE, VITE_GLOB_API_URL, VITE_GLOB_APP_SHORT_NAME, VITE_GLOB_API_URL_PREFIX, VITE_GLOB_REQUEST_TIMEOUT, VITE_GLOB_UPLOAD_URL, VITE_GLOB_UPLOAD_PREVIEW, VITE_GLOB_OUT_LINK_URL, VITE_GLOB_REPORT_URL, VITE_GLOB_PRINT_BASE_URL, VITE_TENANT_ENABLED } = ENV; + const { VITE_GLOB_APP_TITLE, VITE_GLOB_API_URL, VITE_GLOB_APP_SHORT_NAME, VITE_GLOB_API_URL_PREFIX, VITE_GLOB_REQUEST_TIMEOUT, VITE_GLOB_UPLOAD_URL, VITE_GLOB_UPLOAD_PREVIEW, VITE_GLOB_OUT_LINK_URL, VITE_GLOB_REPORT_URL, VITE_GLOB_PRINT_BASE_URL, VITE_GLOB_TENANT_ENABLED } = ENV; if (!/^[a-zA-Z\_]*$/.test(VITE_GLOB_APP_SHORT_NAME)) { warn(`VITE_GLOB_APP_SHORT_NAME Variables can only be characters/underscores, please modify in the environment variables and re-running.`); @@ -39,7 +39,7 @@ export function getAppEnvConfig() { VITE_GLOB_OUT_LINK_URL, VITE_GLOB_REPORT_URL, VITE_GLOB_PRINT_BASE_URL, - VITE_TENANT_ENABLED + VITE_GLOB_TENANT_ENABLED }; } diff --git a/src/views/secondDev/LoginForm.vue b/src/views/secondDev/LoginForm.vue index a1e3165..b5d1af0 100644 --- a/src/views/secondDev/LoginForm.vue +++ b/src/views/secondDev/LoginForm.vue @@ -34,7 +34,7 @@ - + - +