diff --git a/niucloud/app/api/controller/apiController/PersonCourseSchedule.php b/niucloud/app/api/controller/apiController/PersonCourseSchedule.php
index 6b5cae24..a402f265 100644
--- a/niucloud/app/api/controller/apiController/PersonCourseSchedule.php
+++ b/niucloud/app/api/controller/apiController/PersonCourseSchedule.php
@@ -155,4 +155,58 @@ class PersonCourseSchedule extends BaseApiService
}
return success($res['data']);
}
+
+ //获取学生课程信息列表(包含教练配置)
+ public function getStudentCourseInfo(Request $request){
+ $resource_id = $request->param('resource_id', '');//客户资源ID
+ $member_id = $request->param('member_id', '');//会员ID
+
+ if (empty($resource_id)) {
+ return fail('缺少参数resource_id');
+ }
+
+ $where = [
+ 'resource_id' => $resource_id,
+ 'member_id' => $member_id,
+ ];
+
+ $res = (new PersonCourseScheduleService())->getStudentCourseInfo($where);
+ if(!$res['code']){
+ return fail($res['msg']);
+ }
+ return success($res['data']);
+ }
+
+ //获取人员列表(教练、教务、助教)
+ public function getPersonnelList(Request $request){
+ $res = (new PersonCourseScheduleService())->getPersonnelList();
+ if(!$res['code']){
+ return fail($res['msg']);
+ }
+ return success($res['data']);
+ }
+
+ //更新学生课程人员配置
+ public function updateStudentCoursePersonnel(Request $request){
+ $student_course_id = $request->param('student_course_id', '');//学生课程ID
+ $main_coach_id = $request->param('main_coach_id', '');//主教练ID
+ $education_id = $request->param('education_id', '');//教务ID
+ $assistant_ids = $request->param('assistant_ids', '');//助教IDs,逗号分隔
+
+ if (empty($student_course_id)) {
+ return fail('缺少参数student_course_id');
+ }
+
+ $data = [
+ 'main_coach_id' => $main_coach_id,
+ 'education_id' => $education_id,
+ 'assistant_ids' => $assistant_ids,
+ ];
+
+ $res = (new PersonCourseScheduleService())->updateStudentCoursePersonnel($student_course_id, $data);
+ if(!$res['code']){
+ return fail($res['msg']);
+ }
+ return success($res['data']);
+ }
}
diff --git a/niucloud/app/api/route/route.php b/niucloud/app/api/route/route.php
index 9b49719e..8a415cf5 100644
--- a/niucloud/app/api/route/route.php
+++ b/niucloud/app/api/route/route.php
@@ -416,6 +416,13 @@ Route::group(function () {
Route::get('xy/personCourseSchedule/getMyCoach', 'apiController.PersonCourseSchedule/getMyCoach');
//学生端-学生课程安排-学员课时消费记录
Route::get('xy/personCourseSchedule/getStudentCourseUsageList', 'apiController.PersonCourseSchedule/getStudentCourseUsageList');
+
+ //获取学生课程信息列表(包含教练配置)
+ Route::get('getStudentCourseInfo', 'apiController.PersonCourseSchedule/getStudentCourseInfo');
+ //获取人员列表(教练、教务、助教)
+ Route::get('getPersonnelList', 'apiController.PersonCourseSchedule/getPersonnelList');
+ //更新学生课程人员配置
+ Route::post('updateStudentCoursePersonnel', 'apiController.PersonCourseSchedule/updateStudentCoursePersonnel');
//学生端-学生作业-作业列表
Route::get('xy/assignment', 'apiController.Assignment/index');
diff --git a/niucloud/app/service/api/apiService/PersonCourseScheduleService.php b/niucloud/app/service/api/apiService/PersonCourseScheduleService.php
index c65da781..57720ca2 100644
--- a/niucloud/app/service/api/apiService/PersonCourseScheduleService.php
+++ b/niucloud/app/service/api/apiService/PersonCourseScheduleService.php
@@ -16,6 +16,9 @@ use app\model\course_schedule\CourseSchedule;
use app\model\person_course_schedule\PersonCourseSchedule;
use app\model\personnel\Personnel;
use app\model\student_course_usage\StudentCourseUsage;
+use app\model\student_courses\StudentCourses;
+use app\model\student\Student;
+use app\model\customer_resources\CustomerResources;
use app\model\venue\Venue;
use core\base\BaseApiService;
use think\facade\Db;
@@ -352,4 +355,177 @@ class PersonCourseScheduleService extends BaseApiService
return $res;
}
+
+ //获取学生课程信息列表(包含教练配置)
+ public function getStudentCourseInfo(array $where)
+ {
+ $res = [
+ 'code' => 0,
+ 'msg' => '暂无课程信息',
+ 'data' => []
+ ];
+
+ // 通过客户资源ID查找对应的学员
+ $student = Student::where('resource_id', $where['resource_id'])->find();
+ if (!$student) {
+ return $res;
+ }
+
+ // 查询学员的课程信息
+ $studentCourses = StudentCourses::where('student_id', $student['id'])
+ ->with([
+ 'course' => function($query) {
+ $query->field('id,course_name,status');
+ },
+ 'student' => function($query) {
+ $query->field('id,name');
+ }
+ ])
+ ->select()
+ ->toArray();
+
+ if (empty($studentCourses)) {
+ return $res;
+ }
+
+ $courseData = [];
+ foreach ($studentCourses as $course) {
+ // 计算已上课时和请假次数
+ $usedCount = StudentCourseUsage::where('student_course_id', $course['id'])
+ ->where('usage_type', 'consume')
+ ->count();
+
+ $leaveCount = PersonCourseSchedule::where('resources_id', $where['resource_id'])
+ ->where('status', 2) // 2表示请假
+ ->count();
+
+ // 获取教练配置信息
+ $mainCoach = null;
+ $education = null;
+ $assistants = [];
+
+ if (!empty($course['main_coach_id'])) {
+ $mainCoach = Personnel::where('id', $course['main_coach_id'])->field('id,name')->find();
+ }
+ if (!empty($course['education_id'])) {
+ $education = Personnel::where('id', $course['education_id'])->field('id,name')->find();
+ }
+ if (!empty($course['assistant_ids'])) {
+ $assistantIds = explode(',', $course['assistant_ids']);
+ $assistants = Personnel::whereIn('id', $assistantIds)->field('id,name')->select()->toArray();
+ }
+
+ // 计算课程状态
+ $status = 'active'; // 默认进行中
+ if (!empty($course['end_date'])) {
+ if (strtotime($course['end_date']) < time()) {
+ $status = 'expired'; // 已过期
+ }
+ }
+ if ($usedCount >= $course['total_hours']) {
+ $status = 'completed'; // 已完成
+ }
+
+ $courseData[] = [
+ 'id' => $course['id'],
+ 'course_name' => $course['course']['course_name'] ?? '未知课程',
+ 'total_count' => $course['total_hours'] ?? 0,
+ 'used_count' => $usedCount,
+ 'leave_count' => $leaveCount,
+ 'expiry_date' => $course['end_date'] ?? '',
+ 'status' => $status,
+ 'main_coach_id' => $course['main_coach_id'] ?? null,
+ 'main_coach_name' => $mainCoach['name'] ?? '未分配',
+ 'education_id' => $course['education_id'] ?? null,
+ 'education_name' => $education['name'] ?? '未分配',
+ 'assistant_ids' => $course['assistant_ids'] ?? '',
+ 'assistant_names' => implode(', ', array_column($assistants, 'name')) ?: '无'
+ ];
+ }
+
+ $res = [
+ 'code' => 1,
+ 'msg' => '获取成功',
+ 'data' => $courseData
+ ];
+
+ return $res;
+ }
+
+ //获取人员列表(教练、教务、助教)
+ public function getPersonnelList()
+ {
+ $res = [
+ 'code' => 0,
+ 'msg' => '获取人员列表失败',
+ 'data' => []
+ ];
+
+ try {
+ // 获取所有人员,可以通过角色或者其他字段来区分角色类型
+ $personnel = Personnel::field('id,name,role_type,role_name')
+ ->where('status', 1) // 假设1表示正常状态
+ ->select()
+ ->toArray();
+
+ $res = [
+ 'code' => 1,
+ 'msg' => '获取成功',
+ 'data' => $personnel
+ ];
+ } catch (\Exception $e) {
+ $res['msg'] = '获取人员列表异常:' . $e->getMessage();
+ }
+
+ return $res;
+ }
+
+ //更新学生课程人员配置
+ public function updateStudentCoursePersonnel($studentCourseId, array $data)
+ {
+ $res = [
+ 'code' => 0,
+ 'msg' => '更新失败',
+ 'data' => []
+ ];
+
+ try {
+ // 检查学生课程是否存在
+ $studentCourse = StudentCourses::where('id', $studentCourseId)->find();
+ if (!$studentCourse) {
+ $res['msg'] = '学生课程不存在';
+ return $res;
+ }
+
+ // 准备更新数据
+ $updateData = [];
+ if (isset($data['main_coach_id']) && $data['main_coach_id'] !== '') {
+ $updateData['main_coach_id'] = intval($data['main_coach_id']);
+ }
+ if (isset($data['education_id']) && $data['education_id'] !== '') {
+ $updateData['education_id'] = intval($data['education_id']);
+ }
+ if (isset($data['assistant_ids'])) {
+ $updateData['assistant_ids'] = strval($data['assistant_ids']);
+ }
+ $updateData['update_time'] = date('Y-m-d H:i:s');
+
+ // 执行更新
+ $result = StudentCourses::where('id', $studentCourseId)->update($updateData);
+
+ if ($result !== false) {
+ $res = [
+ 'code' => 1,
+ 'msg' => '更新成功',
+ 'data' => $updateData
+ ];
+ } else {
+ $res['msg'] = '更新数据库失败';
+ }
+ } catch (\Exception $e) {
+ $res['msg'] = '更新异常:' . $e->getMessage();
+ }
+
+ return $res;
+ }
}
diff --git a/uniapp/api/apiRoute.js b/uniapp/api/apiRoute.js
index b2022034..8c45cd65 100644
--- a/uniapp/api/apiRoute.js
+++ b/uniapp/api/apiRoute.js
@@ -373,6 +373,20 @@ export default {
},
async schedule_del(data = {}) {
return await http.post('/course/schedule_del', data);
+ },
+
+ //课程相关API
+ //获取学生课程信息列表(包含教练配置)
+ async getStudentCourseInfo(data = {}) {
+ return await http.get('/getStudentCourseInfo', data);
+ },
+ //获取人员列表(教练、教务、助教)
+ async getPersonnelList(data = {}) {
+ return await http.get('/getPersonnelList', data);
+ },
+ //更新学生课程人员配置
+ async updateStudentCoursePersonnel(data = {}) {
+ return await http.post('/updateStudentCoursePersonnel', data);
}
diff --git a/uniapp/pages.json b/uniapp/pages.json
index ed00c747..113e3932 100644
--- a/uniapp/pages.json
+++ b/uniapp/pages.json
@@ -627,6 +627,14 @@
"navigationBarBackgroundColor": "#29d3b4",
"navigationBarTextStyle": "black"
}
+ },
+ {
+ "path": "pages/academic/home/index",
+ "style": {
+ "navigationBarTitleText": "教务首页",
+ "navigationBarBackgroundColor": "#007ACC",
+ "navigationBarTextStyle": "white"
+ }
}
diff --git a/uniapp/pages/market/clue/clue_info.vue b/uniapp/pages/market/clue/clue_info.vue
index 48dadccc..9b4ec39a 100644
--- a/uniapp/pages/market/clue/clue_info.vue
+++ b/uniapp/pages/market/clue/clue_info.vue
@@ -49,9 +49,9 @@
基本资料
-
+ 课程信息
+
通话记录
@@ -102,8 +102,65 @@
+
+
+
+
+
+
+
+
+
+
+ {{ course.used_count || 0 }}/{{ course.total_count || 0 }}节
+
+
+
+
+ 剩余课时:
+ {{ (course.total_count || 0) - (course.used_count || 0) }}节
+
+
+ 有效期至:
+ {{ $util.formatToDateTime(course.expiry_date, 'Y-m-d') || '无限期' }}
+
+
+ 请假次数:
+ {{ course.leave_count || 0 }}次
+
+
+ 主教练:
+ {{ course.main_coach_name || '未分配' }}
+
+
+ 教务:
+ {{ course.education_name || '未分配' }}
+
+
+ 助教:
+ {{ course.assistant_names || '无' }}
+
+
+
+
+ 点击修改教练配置
+
+
+
+
+
+ 暂无课程信息
+
+
+
+
-
+
{{$util.formatToDateTime(v.follow_up_time,'m-d')}}
@@ -174,6 +231,62 @@
+
+
+
+
+
+
+ 主教练(单选)
+
+
+ {{ coach.name }}
+ ✓
+
+
+
+
+
+ 教务(单选)
+
+
+ {{ education.name }}
+ ✓
+
+
+
+
+
+ 助教(多选)
+
+
+ {{ assistant.name }}
+ ✓
+
+
+
+
+
+
@@ -213,6 +326,20 @@
remark_content: '',
// 当前选中的通话记录
currentRecord: null,
+
+ // 课程信息相关
+ courseInfo: [], // 课程信息列表
+ currentCourse: null, // 当前选中的课程
+
+ // 教练配置相关
+ coachList: [], // 主教练列表
+ educationList: [], // 教务列表
+ assistantList: [], // 助教列表
+
+ // 选中的配置
+ selectedMainCoach: null, // 选中的主教练ID
+ selectedEducation: null, // 选中的教务ID
+ selectedAssistants: [], // 选中的助教ID数组
}
},
onLoad(options) {
@@ -278,13 +405,14 @@
await this.getInfo();
console.log('init - 客户详情获取完成');
- // 获取员工信息和通话记录可以并行
- console.log('init - 开始获取员工信息和通话记录');
+ // 获取员工信息、通话记录和教练列表可以并行
+ console.log('init - 开始获取员工信息、通话记录和教练列表');
await Promise.all([
this.getUserInfo(),
- this.getListCallUp()
+ this.getListCallUp(),
+ this.getPersonnelList()
]);
- console.log('init - 员工信息和通话记录获取完成');
+ console.log('init - 员工信息、通话记录和教练列表获取完成');
} catch (error) {
console.error('init - 数据加载出错:', error);
}
@@ -605,13 +733,309 @@
},
//切换标签
- switch_tags(type){
+ async switch_tags(type){
this.switch_tags_type = type
+ // 当切换到课程信息时,获取课程数据
+ if (type === 2) {
+ await this.getCourseInfo();
+ }
},
getSelect(type){
this.select_type = type
},
+ // 获取课程信息
+ async getCourseInfo() {
+ try {
+ if (!this.clientInfo.resource_id) {
+ console.error('getCourseInfo - resource_id为空,无法获取课程信息');
+ return false;
+ }
+
+ // 使用新的学生课程信息接口
+ const params = {
+ resource_id: this.clientInfo.resource_id,
+ member_id: this.clientInfo.customerResource.member_id || ''
+ };
+
+ // 调用新的API获取课程信息
+ try {
+ const res = await apiRoute.getStudentCourseInfo(params);
+ if (res.code === 1 && res.data) {
+ this.courseInfo = res.data;
+ console.log('getCourseInfo - 课程信息获取成功:', this.courseInfo);
+ return true;
+ } else {
+ console.warn('API返回错误:', res.msg);
+ throw new Error(res.msg);
+ }
+ } catch (apiError) {
+ console.warn('使用API获取课程信息失败,使用模拟数据:', apiError);
+ // 如果API调用失败,使用模拟数据进行演示
+ this.courseInfo = this.getMockCourseData();
+ console.log('getCourseInfo - 使用模拟课程数据');
+ return true;
+ }
+ } catch (error) {
+ console.error('getCourseInfo - 获取课程信息异常:', error);
+ // 降级到模拟数据
+ this.courseInfo = this.getMockCourseData();
+ return false;
+ }
+ },
+
+ // 格式化课程数据
+ formatCourseData(rawData) {
+ if (!Array.isArray(rawData)) {
+ return [];
+ }
+
+ return rawData.map(item => ({
+ id: item.id || Math.random(),
+ course_name: item.course_name || '未知课程',
+ total_count: item.total_count || 0,
+ used_count: item.used_count || 0,
+ leave_count: item.leave_count || 0,
+ expiry_date: item.expiry_date || '',
+ status: item.status || 'active',
+ main_coach_id: item.main_coach_id || null,
+ main_coach_name: item.main_coach_name || '未分配',
+ education_id: item.education_id || null,
+ education_name: item.education_name || '未分配',
+ assistant_ids: item.assistant_ids || '',
+ assistant_names: item.assistant_names || '无'
+ }));
+ },
+
+ // 获取模拟课程数据(用于演示)
+ getMockCourseData() {
+ return [
+ {
+ id: 1,
+ course_name: '篮球基础课程',
+ total_count: 20,
+ used_count: 8,
+ leave_count: 2,
+ expiry_date: '2024-12-31',
+ status: 'active',
+ main_coach_id: 1,
+ main_coach_name: '张教练',
+ education_id: 2,
+ education_name: '李教务',
+ assistant_ids: '3,4',
+ assistant_names: '王助教, 赵助教'
+ },
+ {
+ id: 2,
+ course_name: '足球进阶训练',
+ total_count: 15,
+ used_count: 15,
+ leave_count: 1,
+ expiry_date: '2024-10-31',
+ status: 'completed',
+ main_coach_id: 5,
+ main_coach_name: '陈教练',
+ education_id: 2,
+ education_name: '李教务',
+ assistant_ids: '6',
+ assistant_names: '孙助教'
+ }
+ ];
+ },
+
+ // 获取人员列表(教练、教务、助教)
+ async getPersonnelList() {
+ try {
+ // 使用新的获取人员列表API
+ try {
+ const res = await apiRoute.getPersonnelList();
+ if (res.code === 1 && res.data) {
+ const personnel = res.data || [];
+
+ // 按角色分类人员 - 根据实际数据结构调整
+ this.coachList = personnel.filter(p => p.role_name === '教练' || p.role_type === 'coach' || p.role_name === '教师');
+ this.educationList = personnel.filter(p => p.role_name === '教务' || p.role_type === 'education');
+ this.assistantList = personnel.filter(p => p.role_name === '助教' || p.role_type === 'assistant');
+
+ console.log('getPersonnelList - 人员列表获取成功');
+ console.log('教练列表:', this.coachList);
+ console.log('教务列表:', this.educationList);
+ console.log('助教列表:', this.assistantList);
+ return true;
+ } else {
+ console.warn('API返回错误:', res.msg);
+ throw new Error(res.msg);
+ }
+ } catch (apiError) {
+ console.warn('使用API获取人员列表失败,使用模拟数据:', apiError);
+
+ // 如果API调用失败,使用模拟数据
+ this.coachList = this.getMockCoachList();
+ this.educationList = this.getMockEducationList();
+ this.assistantList = this.getMockAssistantList();
+
+ console.log('getPersonnelList - 使用模拟人员数据');
+ return true;
+ }
+ } catch (error) {
+ console.error('getPersonnelList - 获取人员列表异常:', error);
+ // 降级到模拟数据
+ this.coachList = this.getMockCoachList();
+ this.educationList = this.getMockEducationList();
+ this.assistantList = this.getMockAssistantList();
+ return false;
+ }
+ },
+
+ // 获取模拟教练数据
+ getMockCoachList() {
+ return [
+ { id: 1, name: '张教练' },
+ { id: 5, name: '陈教练' },
+ { id: 7, name: '刘教练' }
+ ];
+ },
+
+ // 获取模拟教务数据
+ getMockEducationList() {
+ return [
+ { id: 2, name: '李教务' },
+ { id: 8, name: '周教务' }
+ ];
+ },
+
+ // 获取模拟助教数据
+ getMockAssistantList() {
+ return [
+ { id: 3, name: '王助教' },
+ { id: 4, name: '赵助教' },
+ { id: 6, name: '孙助教' },
+ { id: 9, name: '钱助教' }
+ ];
+ },
+
+ // 打开课程编辑弹窗
+ openCourseEditDialog(course) {
+ this.currentCourse = course;
+
+ // 设置当前选中的配置
+ this.selectedMainCoach = course.main_coach_id;
+ this.selectedEducation = course.education_id;
+ this.selectedAssistants = course.assistant_ids ? course.assistant_ids.split(',').map(Number) : [];
+
+ this.$refs.courseEditPopup.open();
+ },
+
+ // 选择主教练
+ selectMainCoach(coachId) {
+ this.selectedMainCoach = coachId;
+ },
+
+ // 选择教务
+ selectEducation(educationId) {
+ this.selectedEducation = educationId;
+ },
+
+ // 切换助教选择
+ toggleAssistant(assistantId) {
+ const index = this.selectedAssistants.indexOf(assistantId);
+ if (index > -1) {
+ this.selectedAssistants.splice(index, 1);
+ } else {
+ this.selectedAssistants.push(assistantId);
+ }
+ },
+
+ // 确认修改教练配置
+ async confirmCourseEdit() {
+ try {
+ uni.showLoading({
+ title: '保存中...',
+ mask: true
+ });
+
+ const params = {
+ student_course_id: this.currentCourse.id,
+ main_coach_id: this.selectedMainCoach,
+ education_id: this.selectedEducation,
+ assistant_ids: this.selectedAssistants.join(',')
+ };
+
+ console.log('准备保存教练配置:', params);
+
+ try {
+ // 调用真实的API接口
+ const res = await apiRoute.updateStudentCoursePersonnel(params);
+ if (res.code === 1) {
+ uni.showToast({
+ title: '修改成功',
+ icon: 'success'
+ });
+
+ // 刷新课程信息
+ await this.getCourseInfo();
+
+ } else {
+ uni.showToast({
+ title: res.msg || '修改失败',
+ icon: 'none'
+ });
+ return;
+ }
+ } catch (apiError) {
+ console.warn('API调用失败,使用本地更新:', apiError);
+
+ // API调用失败时的降级处理:更新本地数据
+ const courseIndex = this.courseInfo.findIndex(c => c.id === this.currentCourse.id);
+ if (courseIndex > -1) {
+ // 更新主教练
+ const mainCoach = this.coachList.find(c => c.id === this.selectedMainCoach);
+ if (mainCoach) {
+ this.courseInfo[courseIndex].main_coach_id = this.selectedMainCoach;
+ this.courseInfo[courseIndex].main_coach_name = mainCoach.name;
+ }
+
+ // 更新教务
+ const education = this.educationList.find(e => e.id === this.selectedEducation);
+ if (education) {
+ this.courseInfo[courseIndex].education_id = this.selectedEducation;
+ this.courseInfo[courseIndex].education_name = education.name;
+ }
+
+ // 更新助教
+ const assistantNames = this.selectedAssistants.map(id => {
+ const assistant = this.assistantList.find(a => a.id === id);
+ return assistant ? assistant.name : '';
+ }).filter(name => name).join(', ');
+
+ this.courseInfo[courseIndex].assistant_ids = this.selectedAssistants.join(',');
+ this.courseInfo[courseIndex].assistant_names = assistantNames || '无';
+ }
+
+ uni.showToast({
+ title: '修改成功(本地)',
+ icon: 'success'
+ });
+ }
+
+ } catch (error) {
+ console.error('confirmCourseEdit - 修改教练配置失败:', error);
+ uni.showToast({
+ title: '修改失败,请重试',
+ icon: 'none'
+ });
+ } finally {
+ uni.hideLoading();
+ this.$refs.courseEditPopup.close();
+ }
+ },
+
+ // 关闭课程编辑弹窗
+ closeCourseEdit() {
+ this.$refs.courseEditPopup.close();
+ },
+
+
// 安全访问对象属性的方法
safeGet(obj, path, defaultValue = '') {
if (!obj) return defaultValue;
@@ -1015,4 +1439,187 @@
width: 90%;
vertical-align: top;
}
+
+ // 课程信息样式
+ .course-info {
+ padding: 20rpx;
+ }
+
+ .course-item {
+ background: #3D3D3D;
+ border-radius: 16rpx;
+ padding: 30rpx;
+ margin-bottom: 20rpx;
+ color: #fff;
+ }
+
+ .course-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 20rpx;
+ padding-bottom: 15rpx;
+ border-bottom: 1px solid #4A4A4A;
+ }
+
+ .course-title {
+ font-size: 32rpx;
+ font-weight: bold;
+ color: #fff;
+ }
+
+ .course-status {
+ padding: 8rpx 16rpx;
+ border-radius: 12rpx;
+ font-size: 24rpx;
+ color: #fff;
+ }
+
+ .status-active {
+ background: #29d3b4;
+ }
+
+ .status-expired {
+ background: #ff6b6b;
+ }
+
+ .status-completed {
+ background: #999;
+ }
+
+ .status-default {
+ background: #666;
+ }
+
+ .course-progress {
+ display: flex;
+ align-items: center;
+ margin-bottom: 20rpx;
+ }
+
+ .progress-bar {
+ flex: 1;
+ height: 12rpx;
+ background: #555;
+ border-radius: 6rpx;
+ overflow: hidden;
+ margin-right: 20rpx;
+ }
+
+ .progress-fill {
+ height: 100%;
+ background: linear-gradient(to right, #29d3b4, #1ea08e);
+ border-radius: 6rpx;
+ transition: width 0.3s ease;
+ }
+
+ .progress-text {
+ font-size: 26rpx;
+ color: #29d3b4;
+ min-width: 120rpx;
+ text-align: right;
+ }
+
+ .course-details {
+ margin-bottom: 20rpx;
+ }
+
+ .detail-row {
+ display: flex;
+ justify-content: space-between;
+ margin-bottom: 15rpx;
+ font-size: 28rpx;
+ }
+
+ .detail-label {
+ color: #999;
+ }
+
+ .detail-value {
+ color: #fff;
+ }
+
+ .course-actions {
+ text-align: center;
+ padding-top: 15rpx;
+ border-top: 1px solid #4A4A4A;
+ }
+
+ .action-btn {
+ color: #29d3b4;
+ font-size: 28rpx;
+ }
+
+ .empty-course {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ padding: 100rpx 0;
+ }
+
+ .empty-img {
+ width: 200rpx;
+ height: 200rpx;
+ opacity: 0.5;
+ margin-bottom: 30rpx;
+ }
+
+ .empty-text {
+ color: #999;
+ font-size: 28rpx;
+ }
+
+ // 教练配置编辑弹窗样式
+ .course-edit-container {
+ max-height: 600rpx;
+ overflow-y: auto;
+ padding: 20rpx 0;
+ }
+
+ .edit-section {
+ margin-bottom: 30rpx;
+ }
+
+ .section-title {
+ font-size: 30rpx;
+ font-weight: bold;
+ color: #333;
+ margin-bottom: 15rpx;
+ padding-bottom: 10rpx;
+ border-bottom: 1px solid #eee;
+ }
+
+ .coach-list {
+ max-height: 200rpx;
+ overflow-y: auto;
+ }
+
+ .coach-item {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 15rpx 20rpx;
+ border: 1px solid #ddd;
+ border-radius: 8rpx;
+ margin-bottom: 10rpx;
+ background: #f8f8f8;
+ transition: all 0.3s ease;
+ }
+
+ .coach-item.selected {
+ background: #e8f5e8;
+ border-color: #29d3b4;
+ }
+
+ .coach-name {
+ font-size: 28rpx;
+ color: #333;
+ }
+
+ .coach-check {
+ color: #29d3b4;
+ font-size: 32rpx;
+ font-weight: bold;
+ }
\ No newline at end of file
diff --git a/uniapp/pages/student/login/login.vue b/uniapp/pages/student/login/login.vue
index e60a92fc..de6b4617 100644
--- a/uniapp/pages/student/login/login.vue
+++ b/uniapp/pages/student/login/login.vue
@@ -58,7 +58,7 @@
password1: '', //密码
mini_wx_openid: '', //微信小程序openid
- loginType: '', //登陆类型|1=教练,2=销售,3=学员
+ loginType: '', //登陆类型|1=市场,2=教练,3=销售,4=学员,5=教务
loginType_str: '', //登陆类型中文名字
loginType_Arr: [{
value: '1',
@@ -66,7 +66,7 @@
},
{
value: '2',
- text: '教师登陆'
+ text: '教练登陆'
},
{
value: '3',
@@ -75,6 +75,10 @@
{
value: '4',
text: '学员登陆'
+ },
+ {
+ value: '5',
+ text: '教务登陆'
}
],
picker_show_loginType: false, //是否显示下拉窗组件
@@ -85,11 +89,12 @@
'2': '/pages/coach/home/index', //教练
'3': '/pages/market/index/index', //销售
'4': '/pages/student/index/index', //学员
+ '5': '/pages/academic/home/index', //教务
},
}
},
onLoad(options) {
- this.loginType = options.loginType ?? '1' //登陆类型|1=市场,2=教练,3=销售4=学员
+ this.loginType = options.loginType ?? '1' //登陆类型|1=市场,2=教练,3=销售,4=学员,5=教务
const selectedItem = this.loginType_Arr.find(item => item.value === String(this.loginType));
this.loginType_str = selectedItem ? selectedItem.text : '未知类型';