course.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <template>
  2. <view style="padding: 30rpx;">
  3. <navigator :url="'/pages2/class/detail?id='+item.courseId" v-for="(item, index) in courseList" :key="index" style="margin-bottom: 30rpx;">
  4. <view class="class_item">
  5. <image :src="$method.splitImgHost(item.coverUrl, true)" style="height: 316rpx;width: 100%;border-radius: 24rpx;"></image>
  6. <view style="color: #333333;font-weight: bold;font-size: 32rpx;">
  7. {{item.courseName}}
  8. </view>
  9. </view>
  10. <view class="bottomBox">
  11. <view class=".content_box">
  12. <image src="/static/icon/wk_icon3.png" class="wk_icon"></image>
  13. 学习进度:26/120
  14. </view>
  15. <view class="box_progress">
  16. <view style="width: 60%;">
  17. <u-line-progress active-color="#ff9900" :percent="70"></u-line-progress>
  18. </view>
  19. <view>
  20. <u-button type="warning" size="mini" @click.stop="studyIn(item)">进入学习</u-button>
  21. </view>
  22. </view>
  23. </view>
  24. </navigator>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. data() {
  30. return {
  31. goodsId:0,
  32. courseList:[]
  33. }
  34. },
  35. onLoad(option) {
  36. this.goodsId = option.id
  37. this.courseCourseList()
  38. },
  39. onShow(){
  40. },
  41. methods: {
  42. courseCourseList() {
  43. let self = this
  44. this.$api.courseCourseList({goodsId:this.goodsId}).then(res => {
  45. if(res.data.code==200){
  46. self.courseList = res.data.rows
  47. }
  48. });
  49. },
  50. studyIn(item){
  51. this.$navTo.togo('/pages2/course/detail',{
  52. id:item.courseId
  53. });
  54. },
  55. appointment(){
  56. this.$navTo.togo('/pages2/appointment/index');
  57. }
  58. },
  59. }
  60. </script>
  61. <style >
  62. page {
  63. background: #EAEEF1;
  64. }
  65. </style>
  66. <style scope>
  67. .box_progress{
  68. display: flex;
  69. justify-content:space-between;
  70. align-items: center;
  71. margin-top: 20rpx;
  72. }
  73. .bottomBox{
  74. background: #FFFFFF;
  75. width: 94%;
  76. border-bottom-left-radius: 24rpx;
  77. border-bottom-right-radius: 24rpx;
  78. margin: 0 auto;
  79. padding: 20rpx;
  80. }
  81. .content_box{
  82. display: flex;
  83. align-items: center;
  84. color: #999999;
  85. margin-top: 8rpx;
  86. }
  87. .content{
  88. color: #000000;
  89. margin: 0 8rpx;
  90. }
  91. .wk_icon{
  92. width: 24rpx;
  93. height: 24rpx;
  94. margin-right: 8rpx;
  95. }
  96. .class_item{
  97. width: 100%;
  98. background: #FFFFFF;
  99. box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
  100. border-radius: 24rpx;
  101. padding: 20rpx;
  102. z-index: 999;
  103. position: relative;
  104. }
  105. </style>