From 43c2c2c68546975682f8173d8fa4194b720cf31a Mon Sep 17 00:00:00 2001 From: zhoulexin Date: Fri, 15 May 2026 17:09:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 ++ .env.production | 2 ++ src/utils/request.js | 2 +- src/views/admin/DashboardPage.vue | 8 +++++++- src/views/client/FormPage.vue | 5 +++-- vite.config.js | 4 +++- 6 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 .env.development create mode 100644 .env.production diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..eef3f9b --- /dev/null +++ b/.env.development @@ -0,0 +1,2 @@ +# 开发环境 +VITE_API_BASE_URL=http://10.23.22.43:8099 diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..fd265a9 --- /dev/null +++ b/.env.production @@ -0,0 +1,2 @@ +# 生产环境 +VITE_API_BASE_URL= diff --git a/src/utils/request.js b/src/utils/request.js index 5eefe64..f9ccd11 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -2,7 +2,7 @@ import axios from 'axios' import { ElMessage } from 'element-plus' const request = axios.create({ - baseURL: 'http://10.23.22.43:8099', + baseURL: import.meta.env.VITE_API_BASE_URL, timeout: 15000 }) diff --git a/src/views/admin/DashboardPage.vue b/src/views/admin/DashboardPage.vue index 10ea4c6..75a03c0 100644 --- a/src/views/admin/DashboardPage.vue +++ b/src/views/admin/DashboardPage.vue @@ -104,6 +104,8 @@ + + @@ -167,6 +169,8 @@ {{ currentDetail.name }} {{ currentDetail.organization }} {{ currentDetail.department || '-' }} + {{ currentDetail.referrer }} + {{ currentDetail.referrerCompany }} {{ currentDetail.title }} {{ currentDetail.phone }} {{ currentDetail.email }} @@ -264,7 +268,9 @@ const loadData = async () => { email: item.email, idCard: item.idCard, remark: item.remark, - randomCode: item.randomCode + randomCode: item.randomCode, + referrer: item.referrer, + referrerCompany: item.referrerCompany })) total.value = res.data.total diff --git a/src/views/client/FormPage.vue b/src/views/client/FormPage.vue index 32ee0f2..7869fb3 100644 --- a/src/views/client/FormPage.vue +++ b/src/views/client/FormPage.vue @@ -96,10 +96,10 @@ - + @@ -374,6 +374,7 @@ const submitForm = async () => { company: formData.organization, department: formData.department, email: formData.email, + smsCode: formData.smsCode, fee: 2680, idCard: formData.idCard, name: formData.name, diff --git a/vite.config.js b/vite.config.js index bbe9e00..7039d1d 100644 --- a/vite.config.js +++ b/vite.config.js @@ -5,6 +5,8 @@ export default defineConfig({ plugins: [vue()], server: { host: '0.0.0.0', - port: 3000 + port: 3000, + // 允许特定的主机名访问 + allowedHosts: ['robotclass.ngsk.tech'], } })