course.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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">进入学习</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(){
  51. this.$navTo.togo('/pages2/verify/input');
  52. },
  53. appointment(){
  54. this.$navTo.togo('/pages2/appointment/index');
  55. }
  56. },
  57. }
  58. </script>
  59. <style >
  60. page {
  61. background: #EAEEF1;
  62. }
  63. </style>
  64. <style scope>
  65. .box_progress{
  66. display: flex;
  67. justify-content:space-between;
  68. align-items: center;
  69. margin-top: 20rpx;
  70. }
  71. .bottomBox{
  72. background: #FFFFFF;
  73. width: 94%;
  74. border-bottom-left-radius: 24rpx;
  75. border-bottom-right-radius: 24rpx;
  76. margin: 0 auto;
  77. padding: 20rpx;
  78. }
  79. .content_box{
  80. display: flex;
  81. align-items: center;
  82. color: #999999;
  83. margin-top: 8rpx;
  84. }
  85. .content{
  86. color: #000000;
  87. margin: 0 8rpx;
  88. }
  89. .wk_icon{
  90. width: 24rpx;
  91. height: 24rpx;
  92. margin-right: 8rpx;
  93. }
  94. .class_item{
  95. width: 100%;
  96. background: #FFFFFF;
  97. box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
  98. border-radius: 24rpx;
  99. padding: 20rpx;
  100. z-index: 999;
  101. position: relative;
  102. }
  103. </style>