From 2f59b9a618a50049352d75dffcdb3242bf5de22a Mon Sep 17 00:00:00 2001 From: "hongrui.an" <297504645@qq.com> Date: Wed, 4 Jun 2025 09:06:33 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90EQI=E6=8E=A5=E5=8F=A3=E3=80=91?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E6=8F=90=E5=87=BA=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/index.html | 1 + Web/public/config.js | 5 + Web/src/components/importPop/index.vue | 145 +++++++++++++++++++++++++ Web/src/settings.js | 4 +- Web/src/styles/element-ui.scss | 2 +- Web/src/utils/request.js | 6 +- Web/src/views/system/login/index.vue | 3 +- 7 files changed, 162 insertions(+), 4 deletions(-) create mode 100644 Web/public/config.js create mode 100644 Web/src/components/importPop/index.vue diff --git a/Web/index.html b/Web/index.html index e631329..bdb54d3 100644 --- a/Web/index.html +++ b/Web/index.html @@ -5,6 +5,7 @@ Vite App +
diff --git a/Web/public/config.js b/Web/public/config.js new file mode 100644 index 0000000..953ffb5 --- /dev/null +++ b/Web/public/config.js @@ -0,0 +1,5 @@ +let systemConfig = { + title:'EQI接口', + // 请求路径 + baseUrl: 'http://192.168.1.228:7629', +} \ No newline at end of file diff --git a/Web/src/components/importPop/index.vue b/Web/src/components/importPop/index.vue new file mode 100644 index 0000000..c675c1e --- /dev/null +++ b/Web/src/components/importPop/index.vue @@ -0,0 +1,145 @@ + + \ No newline at end of file diff --git a/Web/src/settings.js b/Web/src/settings.js index 6ffd73f..ddc5d6a 100644 --- a/Web/src/settings.js +++ b/Web/src/settings.js @@ -1,5 +1,7 @@ +const mode = import.meta.env.MODE +const _title = mode == 'prod' ? systemConfig.title : 'EQI接口' export default { - title: 'Vue Admin Template', + title: _title, /** * @type {boolean} true | false diff --git a/Web/src/styles/element-ui.scss b/Web/src/styles/element-ui.scss index 28faa8c..ffdd853 100644 --- a/Web/src/styles/element-ui.scss +++ b/Web/src/styles/element-ui.scss @@ -46,7 +46,7 @@ margin: var(--el-dialog-margin-top,15vh) auto 0px; header { - background: var(--el-color-primary); + // background: var(--el-color-primary); color: #fff; padding: 10px; diff --git a/Web/src/utils/request.js b/Web/src/utils/request.js index 44fa9df..f18e756 100644 --- a/Web/src/utils/request.js +++ b/Web/src/utils/request.js @@ -1,8 +1,12 @@ import axios from 'axios' import { ElMessage } from 'element-plus' import store from '@/stores' - +const mode = import.meta.env.MODE +console.log('mode',mode) const app_base_api = import.meta.env.VITE_API_BASE_URL +if(mode == 'prod'){ + app_base_api = systemConfig.baseUrl +} // create an axios instance const service = axios.create({ baseURL: app_base_api, // url = base url + request url diff --git a/Web/src/views/system/login/index.vue b/Web/src/views/system/login/index.vue index 068cc0f..eb3aabf 100644 --- a/Web/src/views/system/login/index.vue +++ b/Web/src/views/system/login/index.vue @@ -9,7 +9,7 @@ label-position="left" >
-

XXX 系统登录

+

{{defaultSettings.title}} 系统登录

@@ -106,6 +106,7 @@ const router = useRouter() import store from '@/stores' const userStore = store.userStore() import tenantDialog from './components/tenantDialog.vue' +import defaultSettings from '@/settings' const route = useRoute()