CourseDetails.vue 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <view>
  3. <u-navbar :title="detail.className"></u-navbar>
  4. <view class="main">
  5. <u-cell-group>
  6. <u-cell-item title="校区" :value="detail.schoolName" :arrow="false"></u-cell-item>
  7. <!-- <u-cell-item title="课程状态" value="进行中" :arrow="false"></u-cell-item>
  8. <u-cell-item title="学年" value="2023年" :arrow="false"></u-cell-item>
  9. <u-cell-item title="学期" value="春" :arrow="false"></u-cell-item>
  10. <u-cell-item title="学部" value="文艺部 - 中国舞" :arrow="false"></u-cell-item> -->
  11. <u-cell-item title="开课/结课日期" :value="detail.classStart+'至'+detail.classEnd" :arrow="false"></u-cell-item>
  12. <!-- <u-cell-item title="课次" value="36次" :arrow="false"></u-cell-item>
  13. <u-cell-item title="总费用" value="1000元" :arrow="false"></u-cell-item> -->
  14. <u-cell-item title="上课时间" :value="detail.courseDate+' '+detail.coursePeriods" :arrow="false"></u-cell-item>
  15. <u-cell-item title="上课教室" :value="detail.classroomName" :arrow="false"></u-cell-item>
  16. <u-cell-item class="teacher" title="任课老师" :value="detail.teacherNames"
  17. @click="gotoUrl('pages/teacher/myCourse/teacherHomepage?id=' + detail.courseTeachers)"></u-cell-item>
  18. <u-cell-item title="学员总数" :value="detail.studentCount+'人'" :arrow="false"></u-cell-item>
  19. </u-cell-group>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. import * as myCourseApi from '@/apis/teacher/myCourse.js'
  25. export default {
  26. data() {
  27. return {
  28. scheduleId: '',
  29. detail: {},
  30. }
  31. },
  32. onLoad(op) {
  33. if (op.id) {
  34. this.scheduleId = op.id;
  35. this.getCourseDetail();
  36. }
  37. },
  38. methods: {
  39. getCourseDetail() {
  40. uni.showLoading({
  41. title: "加载中",
  42. mask: true,
  43. })
  44. myCourseApi.getScheduleDtl({
  45. scheduleId: this.scheduleId
  46. }).then((response) => {
  47. uni.hideLoading();
  48. this.detail = response.data.scheduleDtl;
  49. }).catch(error => {
  50. uni.showToast({
  51. title: error,
  52. icon: "none"
  53. })
  54. })
  55. }
  56. }
  57. }
  58. </script>
  59. <style lang="scss" scoped>
  60. .main{
  61. background-color: #fff;
  62. }
  63. ::v-deep.u-cell_title{
  64. color: rgba(119, 119, 119, 1);
  65. }
  66. ::v-deep.u-cell__value{
  67. color: #333333;
  68. }
  69. .teacher{
  70. ::v-deep.u-cell__value{
  71. color: #00BAC8;
  72. }
  73. }
  74. </style>