class.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <view style="padding: 30rpx;">
  3. <navigator url="/pages2/class/detail" 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. list:[
  57. 1,2,3
  58. ],
  59. goodsList:[]
  60. }
  61. },
  62. onLoad(option) {
  63. this.courseGoodsList()
  64. },
  65. onShow(){
  66. },
  67. methods: {
  68. courseGoodsList() {
  69. let self = this
  70. this.$api.courseGoodsList().then(res => {
  71. if(res.data.code==200){
  72. self.goodsList = res.data.rows
  73. }
  74. });
  75. },
  76. studyIn(){
  77. this.$navTo.togo('/pages2/verify/input');
  78. },
  79. appointment(){
  80. this.$navTo.togo('/pages2/appointment/index');
  81. }
  82. },
  83. }
  84. </script>
  85. <style >
  86. page {
  87. background: #EAEEF1;
  88. }
  89. </style>
  90. <style scope>
  91. .box_progress{
  92. display: flex;
  93. justify-content:space-between;
  94. align-items: center;
  95. margin-top: 20rpx;
  96. }
  97. .bottomBox{
  98. background: #FFFFFF;
  99. width: 94%;
  100. border-bottom-left-radius: 24rpx;
  101. border-bottom-right-radius: 24rpx;
  102. margin: 0 auto;
  103. padding: 20rpx;
  104. }
  105. .content_box{
  106. display: flex;
  107. align-items: center;
  108. color: #999999;
  109. margin-top: 8rpx;
  110. }
  111. .content{
  112. color: #000000;
  113. margin: 0 8rpx;
  114. }
  115. .wk_icon{
  116. width: 24rpx;
  117. height: 24rpx;
  118. margin-right: 8rpx;
  119. }
  120. .class_item{
  121. width: 100%;
  122. background: #FFFFFF;
  123. box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
  124. border-radius: 24rpx;
  125. padding: 20rpx;
  126. z-index: 999;
  127. position: relative;
  128. }
  129. </style>