mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 11:26:43 +08:00
fix: 修复教师无法展示的问题
This commit is contained in:
@@ -160,14 +160,15 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- {{cinfo}}-->
|
||||||
<div class="couresstartTime">
|
<div class="couresstartTime">
|
||||||
<span v-if="cinfo.type == 30 && cinfo.startTime">开课时间:{{ cinfo.startTime }}</span>
|
<span v-if="cinfo.type == 30 && cinfo.startTime">开课时间:{{ cinfo.startTime }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="course-info">
|
<div class="course-info">
|
||||||
<div class="course-info-user" style="max-width: 100px;" v-if="cinfo.teacher">
|
<div class="course-info-user" style="max-width: 100px;" v-if="cinfo.teacherName">
|
||||||
<el-tooltip :content="cinfo.teacher" placement="bottom" effect="light">
|
<!-- todo: 后续优化 teacher name 形式-->
|
||||||
<span class="course-info-author">{{ cinfo.teacher }}</span>
|
<el-tooltip :content="cinfo.teacherName && cinfo.teacherName.split(',')[0]" placement="bottom" effect="light">
|
||||||
|
<span class="course-info-author">{{ cinfo.teacherName && cinfo.teacherName.split(',')[0] }}</span>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<div class="course-info-user">
|
<div class="course-info-user">
|
||||||
@@ -1227,7 +1228,20 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
|
|
||||||
this.courseList = res.data.result.records ?? []
|
const list = res.data.result.records ?? []
|
||||||
|
// list.forEach(course=>{
|
||||||
|
// const id = course.courseId
|
||||||
|
//
|
||||||
|
// apiCourse.getTeacherByCourseIDs([id]).then(res=>{
|
||||||
|
// console.log(res, "ids res")
|
||||||
|
// course.teacher = res.result[0].names[0]
|
||||||
|
// console.log(`course.teacher`, course.teacher)
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
|
||||||
|
this.courseList = list
|
||||||
|
// todo: 后续优化调用方式
|
||||||
|
|
||||||
if (this.newData) {
|
if (this.newData) {
|
||||||
this.courseList = [
|
this.courseList = [
|
||||||
{
|
{
|
||||||
@@ -1280,6 +1294,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.moreState = 2;
|
this.moreState = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
this.moreState = 2;
|
this.moreState = 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user