From 4baebbbd206599b036c304429fd29de00d98524a Mon Sep 17 00:00:00 2001
From: liutong <836164388@qq.com>
Date: Thu, 5 Jun 2025 10:59:09 +0800
Subject: [PATCH 1/8] =?UTF-8?q?feat(api):=20=E6=B7=BB=E5=8A=A0=E5=AD=A6?=
=?UTF-8?q?=E7=94=9F=E8=AF=A6=E6=83=85=E4=BF=AE=E6=94=B9=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?=E5=B9=B6=E4=BC=98=E5=8C=96=E4=B8=AA=E4=BA=BA=E4=BF=A1=E6=81=AF?=
=?UTF-8?q?=E6=8F=90=E4=BA=A4=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 在 apiRoute.js 中新增 xy_memberEdit 方法,用于修改学生详情
- 修改 personal_data.vue 中的表单提交逻辑:
- 更改电话号码字段名为 phone_number
- 优化头像上传逻辑 - 重构 submit 方法,使用新增的 xy_memberEdit 接口进行数据提交
- 优化提交成功后的提示信息
---
api/apiRoute.js | 7 +++++
pages/student/my/personal_data.vue | 49 +++++++++++++-----------------
2 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/api/apiRoute.js b/api/apiRoute.js
index 5f0f4a2..06904fa 100644
--- a/api/apiRoute.js
+++ b/api/apiRoute.js
@@ -417,6 +417,13 @@ export default {
return res;
})
},
+ //学生详情-修改
+ xy_memberEdit(data = {}) {
+ let url = '/customerResourcesAuth/edit'
+ return http.post(url, data).then(res => {
+ return res;
+ })
+ },
diff --git a/pages/student/my/personal_data.vue b/pages/student/my/personal_data.vue
index cfe9868..a525d0c 100644
--- a/pages/student/my/personal_data.vue
+++ b/pages/student/my/personal_data.vue
@@ -92,7 +92,7 @@
手机 *
-
+
@@ -294,7 +294,6 @@
if (extraData.input_name == 'headimg') {
console.log('收到的图片地址:', resData.url);
this.editHeadimg = resData.url;
- alert(this.formData.headimg)
}
},
@@ -307,32 +306,26 @@
},
//提交信息
- submit() {
- console.log(this.editHeadimg, '111')
- // if(this.editHeadimg == ''){
- // this.editHeadimg = this.formData.headimg
- // }
- member.member_edit({
- header: this.editHeadimg,
- name: this.formData.name,
- address: this.formData.address,
- gender: this.sex_name,
- birthday: this.formData.birthday,
- email: this.formData.email,
- phone: this.formData.phone,
- }).then(res => {
- if (res.code == 1) {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- })
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- })
- }
- })
+ async submit() {
+ if (this.editHeadimg) {
+ this.formData.headimg = this.editHeadimg
+ }
+ let params = {
+ ...this.formData
+ }
+
+ let res = await apiRoute.xy_memberEdit(params)
+ if(res.code != 1){
+ uni.showToast({
+ title: res.msg,
+ icon: 'none'
+ })
+ return
+ }
+ uni.showToast({
+ title: res.msg,
+ icon: 'success'
+ })
},
From c6ccc0c8e528b37a7b472a906d6142ab7aa04952 Mon Sep 17 00:00:00 2001
From: liutong <836164388@qq.com>
Date: Thu, 5 Jun 2025 14:51:23 +0800
Subject: [PATCH 2/8] =?UTF-8?q?feat(feedback):=20=E4=BC=98=E5=8C=96?=
=?UTF-8?q?=E5=AD=A6=E7=94=9F=E6=84=8F=E8=A7=81=E5=8F=8D=E9=A6=88=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 新增 xy_userFeedbackAdd 接口用于提交反馈信息
- 修改上传组件 AQUplodeImgMulti 的使用方式
- 更新反馈页面的表单结构和提交逻辑
- 优化反馈内容和图片的处理方式
---
api/apiRoute.js | 9 ++++
components/AQ/AQUplodeImgMulti.vue | 12 ++++--
pages/common/feedback.vue | 67 ++++++++++++++++++++++--------
3 files changed, 67 insertions(+), 21 deletions(-)
diff --git a/api/apiRoute.js b/api/apiRoute.js
index 06904fa..7c91198 100644
--- a/api/apiRoute.js
+++ b/api/apiRoute.js
@@ -425,6 +425,15 @@ export default {
})
},
+ //学生-意见反馈-添加
+ xy_userFeedbackAdd(data = {}) {
+ let url = '/userFeedback/add'
+ return http.post(url, data).then(res => {
+ return res;
+ })
+ },
+
+
diff --git a/components/AQ/AQUplodeImgMulti.vue b/components/AQ/AQUplodeImgMulti.vue
index eeef305..da3793e 100644
--- a/components/AQ/AQUplodeImgMulti.vue
+++ b/components/AQ/AQUplodeImgMulti.vue
@@ -27,6 +27,11 @@ import {Api_url} from "../../common/config";
},
props: {
//父组件参数
+ //上传文件接口的url
+ uploadApiUrl:{
+ type: String,
+ default: `${Api_url}/file/image`
+ },
//表单名称
inputName: {
type: String,
@@ -48,7 +53,8 @@ import {Api_url} from "../../common/config";
return {
inputName: this.inputName,
inputValue: this.inputValue,
- maxFileNum: this.maxFileNum
+ maxFileNum: this.maxFileNum,
+ uploadApiUrl: this.uploadApiUrl
};
}
},
@@ -99,7 +105,7 @@ import {Api_url} from "../../common/config";
},
//上传接口地址
- uploadApiUrl: `${Api_url}/file/image`,
+ // uploadApiUrl: `${Api_url}/file/image`,
// 上传图片的样式
imageStyles: {
@@ -168,7 +174,7 @@ import {Api_url} from "../../common/config";
console.log('xxx',_arr)
this.fileList.push(_arr)
console.log('上传成功2',_arr);
- this.filePathArr.push(res.data.path)
+ this.filePathArr.push(res.data.url)
//上传成功
this.emitUploadSuccess(this.filePathArr)
}else{
diff --git a/pages/common/feedback.vue b/pages/common/feedback.vue
index 7b07849..c66557d 100644
--- a/pages/common/feedback.vue
+++ b/pages/common/feedback.vue
@@ -5,28 +5,28 @@
-
+
上传图片
-
-
-
-
-
-
+
+
+
+
+
-
- 反馈的相关问题会第一时间通过邮箱解答。
-
+
+
+
提交
@@ -34,9 +34,13 @@
\ No newline at end of file
diff --git a/pages/coach/course/info_list.vue b/pages/coach/course/info_list.vue
index 56a325c..43886a4 100644
--- a/pages/coach/course/info_list.vue
+++ b/pages/coach/course/info_list.vue
@@ -11,11 +11,11 @@
添加学员
- 上课中
+ 上课中
- 已结束
+ 已结束
- 未开始
+ 未开始
@@ -189,6 +189,20 @@
async init() {
this.getCourseInfo()
},
+
+ isNowBetween(start_date, end_date) {
+ const now = new Date();
+ const start = new Date(start_date);
+ const end = new Date(end_date);
+
+ return now >= start && now <= end;
+ },
+
+ isCourseFuture(courseDate) {
+ const courseTime = new Date(courseDate).getTime();
+ const nowTime = new Date().getTime();
+ return courseTime > nowTime;
+ },
//教练端-课程详情
async getCourseInfo() {
diff --git a/pages/coach/student/info.vue b/pages/coach/student/info.vue
index 904152f..d8e314b 100644
--- a/pages/coach/student/info.vue
+++ b/pages/coach/student/info.vue
@@ -10,23 +10,24 @@
-
-
+
+
{{studentsInfo.name}}
- {{studentsInfo.age}}岁
+
+ {{studentsInfo.customerResources.age}}岁
- 电话:{{studentsInfo.phone}}
+ 电话:{{studentsInfo.customerResources.phone_number}}
@@ -111,10 +112,10 @@
:key="k" @click="openViewPhysicalExamination(v)"
>
- 综合评分:{{v.score}}
+ 综合评分:{{v.calculateChildHealthScore}}
- 测试时间:{{v.create_time}}
+ 测试时间:{{$util.formatToDateTime(v.created_at, 'Y-m-d')}}
@@ -133,7 +134,7 @@