class.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <template>
  2. <view style="padding: 30rpx;">
  3. <navigator :url="'/pages2/wd/course?id='+item.goodsId" v-for="(item, index) in goodsList" :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.goodsName}}
  8. </view>
  9. <view class=".content_box">
  10. <image src="/static/icon/wk_icon1.png" class="wk_icon"></image>
  11. 共<text class="content"> 3 </text>科<text class="content"> 120</text> 节
  12. <text class="content"> 60 </text>学时
  13. </view>
  14. <view class=".content_box">
  15. <image src="/static/icon/wk_icon2.png" class="wk_icon"></image>
  16. 学习有效期:<text class="content"> {{$method.timestampToTime(item.validityStartTime)}} - {{$method.timestampToTime(item.validityEndTime)}} </text>
  17. </view>
  18. </view>
  19. <view class="bottomBox">
  20. <view class=".content_box">
  21. <image src="/static/icon/wk_icon3.png" class="wk_icon"></image>
  22. 学习进度:26/120
  23. </view>
  24. <view class="box_progress">
  25. <view style="width: 60%;">
  26. <u-line-progress active-color="#ff9900" :percent="70"></u-line-progress>
  27. </view>
  28. <view>
  29. <u-button type="warning" size="mini" @click.stop="studyIn">进入学习</u-button>
  30. </view>
  31. </view>
  32. <view class="box_progress">
  33. <view style="width: 60%;">
  34. <text style="color: #333333;white-space: nowrap;text-overflow: ellipsis;">这是一个考试标题</text>
  35. </view>
  36. <view>
  37. <u-button :plain="true" type="primary" size="mini" @click.stop="appointment">预约考试</u-button>
  38. </view>
  39. </view>
  40. <view class="box_progress" v-if="false">
  41. <view style="width: 60%;">
  42. <text style="color: #2979ff;white-space: nowrap;text-overflow: ellipsis;">【机电全科】2021年一建黄金A</text>
  43. </view>
  44. <view>
  45. <u-button type="primary" size="mini">进入刷题</u-button>
  46. </view>
  47. </view>
  48. </view>
  49. </navigator>
  50. </view>
  51. </template>
  52. <script>
  53. export default {
  54. data() {
  55. return {
  56. goodsList:[]
  57. }
  58. },
  59. onLoad(option) {
  60. this.courseGoodsList()
  61. },
  62. onShow(){
  63. },
  64. methods: {
  65. courseGoodsList() {
  66. let self = this
  67. this.$api.courseGoodsList().then(res => {
  68. if(res.data.code==200){
  69. self.goodsList = res.data.rows
  70. }
  71. });
  72. },
  73. studyIn(){
  74. this.$navTo.togo('/pages2/verify/input');
  75. },
  76. appointment(){
  77. this.$navTo.togo('/pages2/appointment/index');
  78. }
  79. },
  80. }
  81. </script>
  82. <style >
  83. page {
  84. background: #EAEEF1;
  85. }
  86. </style>
  87. <style scope>
  88. .box_progress{
  89. display: flex;
  90. justify-content:space-between;
  91. align-items: center;
  92. margin-top: 20rpx;
  93. }
  94. .bottomBox{
  95. background: #FFFFFF;
  96. width: 94%;
  97. border-bottom-left-radius: 24rpx;
  98. border-bottom-right-radius: 24rpx;
  99. margin: 0 auto;
  100. padding: 20rpx;
  101. }
  102. .content_box{
  103. display: flex;
  104. align-items: center;
  105. color: #999999;
  106. margin-top: 8rpx;
  107. }
  108. .content{
  109. color: #000000;
  110. margin: 0 8rpx;
  111. }
  112. .wk_icon{
  113. width: 24rpx;
  114. height: 24rpx;
  115. margin-right: 8rpx;
  116. }
  117. .class_item{
  118. width: 100%;
  119. background: #FFFFFF;
  120. box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
  121. border-radius: 24rpx;
  122. padding: 20rpx;
  123. z-index: 999;
  124. position: relative;
  125. }
  126. </style>