Browse Source

修改忽略文件

master
王泽彦 9 months ago
parent
commit
8028a91a19
  1. 54
      niucloud/app/api/controller/apiController/PersonCourseSchedule.php
  2. 7
      niucloud/app/api/route/route.php
  3. 176
      niucloud/app/service/api/apiService/PersonCourseScheduleService.php
  4. 14
      uniapp/api/apiRoute.js
  5. 8
      uniapp/pages.json
  6. 625
      uniapp/pages/market/clue/clue_info.vue
  7. 11
      uniapp/pages/student/login/login.vue

54
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']);
}
}

7
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');

176
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;
}
}

14
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);
}

8
uniapp/pages.json

@ -627,6 +627,14 @@
"navigationBarBackgroundColor": "#29d3b4",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/academic/home/index",
"style": {
"navigationBarTitleText": "教务首页",
"navigationBarBackgroundColor": "#007ACC",
"navigationBarTextStyle": "white"
}
}

625
uniapp/pages/market/clue/clue_info.vue

@ -49,9 +49,9 @@
<view :class="{'selected-text': switch_tags_type === 1, 'text': switch_tags_type !== 1}"
@click="switch_tags(1)">基本资料
</view>
<!-- <view :class="{'selected-text': switch_tags_type === 2, 'text': switch_tags_type !== 2}"
@click="switch_tags(2)">跟进记录
</view> -->
<view :class="{'selected-text': switch_tags_type === 2, 'text': switch_tags_type !== 2}"
@click="switch_tags(2)">课程信息
</view>
<view :class="{'selected-text': switch_tags_type === 3, 'text': switch_tags_type !== 3}"
@click="switch_tags(3)">通话记录
</view>
@ -102,8 +102,65 @@
<view style="height: 200rpx;"></view>
</view>
<!-- 课程信息-->
<view class="course-info" v-if="switch_tags_type == 2">
<view v-if="courseInfo && courseInfo.length > 0">
<view v-for="(course, index) in courseInfo" :key="index" class="course-item" @click="openCourseEditDialog(course)">
<view class="course-header">
<view class="course-title">{{ course.course_name || '未知课程' }}</view>
<view class="course-status" :class="'status-' + (course.status || 'default')">
{{ course.status === 'active' ? '进行中' : course.status === 'expired' ? '已过期' : course.status === 'completed' ? '已完成' : '未知状态' }}
</view>
</view>
<view class="course-progress">
<view class="progress-bar">
<view class="progress-fill" :style="{width: ((course.total_count > 0 ? Math.round((course.used_count / course.total_count) * 100) : 0)) + '%'}"></view>
</view>
<view class="progress-text">{{ course.used_count || 0 }}/{{ course.total_count || 0 }}</view>
</view>
<view class="course-details">
<view class="detail-row">
<view class="detail-label">剩余课时</view>
<view class="detail-value">{{ (course.total_count || 0) - (course.used_count || 0) }}</view>
</view>
<view class="detail-row">
<view class="detail-label">有效期至</view>
<view class="detail-value">{{ $util.formatToDateTime(course.expiry_date, 'Y-m-d') || '无限期' }}</view>
</view>
<view class="detail-row">
<view class="detail-label">请假次数</view>
<view class="detail-value">{{ course.leave_count || 0 }}</view>
</view>
<view class="detail-row">
<view class="detail-label">主教练</view>
<view class="detail-value">{{ course.main_coach_name || '未分配' }}</view>
</view>
<view class="detail-row">
<view class="detail-label">教务</view>
<view class="detail-value">{{ course.education_name || '未分配' }}</view>
</view>
<view class="detail-row">
<view class="detail-label">助教</view>
<view class="detail-value">{{ course.assistant_names || '无' }}</view>
</view>
</view>
<view class="course-actions">
<view class="action-btn">点击修改教练配置</view>
</view>
</view>
</view>
<view v-else class="empty-course">
<image src="/static/images/empty.png" mode="aspectFit" class="empty-img"></image>
<text class="empty-text">暂无课程信息</text>
</view>
<view style="height: 200rpx;"></view>
</view>
<!-- 跟进记录-->
<view class="follow-records" v-if="switch_tags_type == 2">
<view class="follow-records" v-if="switch_tags_type == 4">
<view v-for="(v,k) in followList" :key="k">
<view class="basic-message">{{$util.formatToDateTime(v.follow_up_time,'m-d')}}</view>
<view class="follow-records-list">
@ -174,6 +231,62 @@
</view>
</uni-popup-dialog>
</uni-popup>
<!-- 教练配置编辑弹窗 -->
<uni-popup ref="courseEditPopup" type="dialog">
<uni-popup-dialog
title="修改教练配置"
:before-close="true"
@confirm="confirmCourseEdit"
@close="closeCourseEdit">
<view class="course-edit-container">
<view class="edit-section">
<view class="section-title">主教练单选</view>
<view class="coach-list">
<view
v-for="coach in coachList"
:key="coach.id"
class="coach-item"
:class="{selected: selectedMainCoach === coach.id}"
@click="selectMainCoach(coach.id)">
<view class="coach-name">{{ coach.name }}</view>
<view class="coach-check" v-if="selectedMainCoach === coach.id"></view>
</view>
</view>
</view>
<view class="edit-section">
<view class="section-title">教务单选</view>
<view class="coach-list">
<view
v-for="education in educationList"
:key="education.id"
class="coach-item"
:class="{selected: selectedEducation === education.id}"
@click="selectEducation(education.id)">
<view class="coach-name">{{ education.name }}</view>
<view class="coach-check" v-if="selectedEducation === education.id"></view>
</view>
</view>
</view>
<view class="edit-section">
<view class="section-title">助教多选</view>
<view class="coach-list">
<view
v-for="assistant in assistantList"
:key="assistant.id"
class="coach-item"
:class="{selected: selectedAssistants.includes(assistant.id)}"
@click="toggleAssistant(assistant.id)">
<view class="coach-name">{{ assistant.name }}</view>
<view class="coach-check" v-if="selectedAssistants.includes(assistant.id)"></view>
</view>
</view>
</view>
</view>
</uni-popup-dialog>
</uni-popup>
</view>
</view>
</template>
@ -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;
}
</style>

11
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 : '未知类型';

Loading…
Cancel
Save