currentCourse.wxml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <wxs src='../../../utils/format.wxs' module="utils"></wxs>
  2. <wxs src='../../../utils/formatFuc.wxs' module="format"></wxs>
  3. <view>
  4. <!-- 课程 -->
  5. <van-sticky>
  6. <view class="tabs-wrapper">
  7. <van-tabs active="{{currentTab}}" bind:change="switchTab" color="#426D3B" id="tabs">
  8. <van-tab title="全 部" name="4"></van-tab>
  9. <van-tab title="公开课程" name="1"></van-tab>
  10. <van-tab title="培训课程" name="2"></van-tab>
  11. </van-tabs>
  12. </view>
  13. <view class="drop-block">
  14. <van-dropdown-menu active-color="#09afff">
  15. <van-dropdown-item value="{{ type }}" options="{{ typeList }}" bind:change="dropdownChange"/>
  16. </van-dropdown-menu>
  17. <view class="after-wrapper">
  18. <view class="arrow after-arrow"></view>
  19. <view class="date-wrapper" bindtap="dateSelect">
  20. <view>{{date}}
  21. </view>
  22. <view class="arrow"></view>
  23. </view>
  24. </view>
  25. </view>
  26. </van-sticky>
  27. <view class="course-list">
  28. <view class="course-item" wx:for="{{courseList}}" wx:key="index">
  29. <image src="{{item.course.courseBackimg}}" class="video-cover" mode="aspectFill"></image>
  30. <view class="course-info">
  31. <view class="course-title" >
  32. <view class="title-left">
  33. {{item.course.courseName}}
  34. </view>
  35. <view class="title-right"
  36. >
  37. <van-icon name="clock-o" size="20px" color="#666666"/>
  38. <view class="hour">{{utils.learnTime(item.course.courseDuration)}}</view>
  39. </view>
  40. </view>
  41. <view class="course-time">
  42. 培训时间: {{format.formatDate(item.studyStart)}}
  43. </view>
  44. <view class="finish-time">
  45. 完成时间: {{format.formatDate(item.studyEnd)}}
  46. </view>
  47. <view class="course-operate" >
  48. <view class="course-btn" bindtap="goLearn" wx:if="{{currentTab!='3'&&item.id==''}}" data-id="{{item.id}}" data-courseid="{{item.course.id}}"> 开始学习</view>
  49. <view class="course-btn" bindtap="continueLearn" wx:if="{{currentTab!='3'&&item.id!=''}}" data-id="{{item.id}}" data-courseid="{{item.course.id}}"> 继续学习</view>
  50. <view class="course-btn" bindtap="goStar" wx:if="{{currentTab=='3'}}" data-id="{{item.id}}"> 评价课程</view>
  51. <view class="course-btn" bindtap="goLearn" wx:if="{{currentTab=='3'}}"> 再次学习</view>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. <view class="no-msg" wx:if="{{courseList.length==0}}">暂无内容~</view>
  57. </view>
  58. <van-popup
  59. show="{{ pickerShow }}"
  60. position="bottom"
  61. >
  62. <van-datetime-picker
  63. type="year-month"
  64. value="{{ currentDate }}"
  65. min-date="{{ minDate }}"
  66. bind:confirm="onConfirm"
  67. bind:cancel="onCancel"
  68. />
  69. </van-popup>
  70. <!-- 课程评价 -->
  71. <van-overlay show="{{evalShow}}" custom-style="background: rgba(194,191,191,0.61); z-index:999;"bind:click="onClickShow">
  72. <view class="overlay-wrapper" >
  73. <view class="star-wrapper" catchtap="stop">
  74. <view class="title">
  75. 课程评价
  76. </view>
  77. <view class="van-rate-wrapper">
  78. <van-rate value="{{ star }}" bind:change="onChange" size="{{ 36 }}"/>
  79. </view>
  80. </view>
  81. <view class="submit-eval" catchtap="submitEval">立即提交</view>
  82. </view>
  83. </van-overlay>