From 229b607cc76ee8aead47e1ee7c53ed3fb2912f18 Mon Sep 17 00:00:00 2001 From: Xubx <1827135378@qq.com> Date: Thu, 24 Apr 2025 19:32:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/App.vue | 14 ++++++ src/api/index.ts | 16 +++++++ src/utils/request/index.ts | 2 +- src/views/home/index.vue | 30 ++++++++----- src/views/localStudent.vue | 5 ++- src/views/mainPage.vue | 89 ++++++++++++++++++++++++++++++++++--- src/views/waiTeacherTwo.vue | 2 +- types/components.d.ts | 16 ------- 9 files changed, 138 insertions(+), 38 deletions(-) diff --git a/package.json b/package.json index 99baf4f..e659515 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vue-h5-template", "version": "1.0.0", "scripts": { - "dev": "vite", + "dev": "vite --port 9999", "build": "vite build", "preview": "vite preview", "lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock}/**/*.{vue,ts,tsx}\" --fix", diff --git a/src/App.vue b/src/App.vue index a5c0e22..26d4825 100644 --- a/src/App.vue +++ b/src/App.vue @@ -10,4 +10,18 @@ -moz-osx-font-smoothing: grayscale; color: #2c3e50; } + /* 确保弹窗在最上层 */ + .van-overlay { + z-index: 2000 !important; + } + + .van-dialog { + z-index: 2001 !important; + } + + /* 修复可能被隐藏的问题 */ + .van-toast, + .van-notify { + z-index: 2002 !important; + } diff --git a/src/api/index.ts b/src/api/index.ts index a66d981..d250b10 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -56,6 +56,16 @@ export async function getGroupName(groupId) { return response; } +// 根据dormitoryId获取分组名 +export async function getDormitoryName(dormitoryId) { + const response = await http.get('/h5/cees/ceesWaiTeacher/getDormitoryName', { + params: { + dormitoryId: dormitoryId, + }, + }); + return response; +} + // 本校老师保存数据 export function localTeacherSave(data) { return http.post('/h5/cees/ceesLocalTeacher/save', { @@ -69,6 +79,12 @@ export function localTeacherSave(data) { // 外校老师保存数据 export function waiTeacherSave(data) { + if (data.sex == '男') { + data.sex = 0; + } + if (data.sex == '女') { + data.sex = 1; + } return http.post('/h5/cees/ceesWaiTeacher/save', { age: data.age, bankAddress: data.bankAddress, diff --git a/src/utils/request/index.ts b/src/utils/request/index.ts index 976aaef..50e2db5 100644 --- a/src/utils/request/index.ts +++ b/src/utils/request/index.ts @@ -3,7 +3,7 @@ import { showToast } from 'vant'; // 创建 axios 实例 const service: AxiosInstance = axios.create({ - baseURL: 'http://localhost:8091/jeecg-boot', // 基础 URL + baseURL: 'http://127.0.0.1:10001/jeecg-boot', // 基础 URL withCredentials: false, // 是否携带跨域凭证 timeout: 10000, // 请求超时时间 }); diff --git a/src/views/home/index.vue b/src/views/home/index.vue index e422740..926d051 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -39,7 +39,7 @@