From 6b4590bbf6da74c607e13740337588d8b7773724 Mon Sep 17 00:00:00 2001 From: ltx <1006158920@qq.com> Date: Mon, 8 Jun 2026 17:38:27 +0800 Subject: [PATCH] =?UTF-8?q?update=EF=BC=9A=E8=BF=90=E5=8A=A8=E9=A6=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/http.js | 4 ++-- src/views/sportHallReport/index.vue | 2 +- src/views/studentsManage/index.vue | 17 +++++++++-------- vite.config.ts | 2 +- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/api/http.js b/src/api/http.js index dc0f590..741d11f 100644 --- a/src/api/http.js +++ b/src/api/http.js @@ -16,8 +16,8 @@ if (process.env.NODE_ENV == 'development') { // axios.defaults.baseURL = 'http://101.132.164.149:9991/'; // axios.defaults.baseURL = 'http://8.153.108.90:9991/'; //测试(直连会触发 CORS,改用 Vite proxy) // axios.defaults.baseURL = '/dev-api/'; //测试(通过 Vite 代理转发,避免 CORS) - // axios.defaults.baseURL = 'https://smartsports.yuedongsports.com/'; //正式 - axios.defaults.baseURL = 'http://172.17.30.204:9991/'; //汤龙本地 + axios.defaults.baseURL = 'https://smartsports.yuedongsports.com/'; //正式 + // axios.defaults.baseURL = 'http://172.17.30.204:9991/'; //汤龙本地 // axios.defaults.baseURL = 'http://47.101.60.251:9991/'; // axios.defaults.baseURL = 'http://localhost:9991/'; // axios.defaults.baseURL = 'http://120.48.130.27:14102/'; diff --git a/src/views/sportHallReport/index.vue b/src/views/sportHallReport/index.vue index 32e5fe1..51dbf7a 100644 --- a/src/views/sportHallReport/index.vue +++ b/src/views/sportHallReport/index.vue @@ -272,7 +272,7 @@ const fetchList = async () => { ...item, scoreTime: item.scoreTime ? item.scoreTime.replace('T', ' ').substring(0, 16) : '' })) - pagination.total = res.total || 0 + pagination.total = res.data.total || 0 } } catch (e) { ElMessage.error('获取数据失败') diff --git a/src/views/studentsManage/index.vue b/src/views/studentsManage/index.vue index 42ff87e..452df76 100644 --- a/src/views/studentsManage/index.vue +++ b/src/views/studentsManage/index.vue @@ -504,11 +504,11 @@ const data = ref({ label: '全部', }, { - id: 1, + id: '1', label: '男', }, { - id: 2, + id: '2', label: '女', } ], @@ -769,6 +769,7 @@ const submitForm = async (formEl) => { break case false: // ruleForm.value.sex = '1' + console.log(ruleForm1.value, 'ruleForm11111111111111111111') ModifyTeachers(ruleForm1.value) break } @@ -836,7 +837,7 @@ const editTable = (e) => { studentName: e.studentName, classId: k, age: e.age, - sex: e.sex, + sex: e.sex == '男' ? '1' : '2', photo: e.photo, birthday: '', heartRateFrontNo: e.heartRateFrontNo, @@ -1115,7 +1116,6 @@ async function AddStudents(val) { } //编辑 async function ModifyTeachers(val) { - val.sex = val.sex == '男' ? "1" : "2" // const path = val.photo.match(/(?:\/\/[^\/]+)?\/(.*)/)[1]; // val.photo = path val.classId = val.classId ? val.classId[1] : null @@ -1317,6 +1317,7 @@ function exportData(val) { }) } +