class.vue 3.3 KB

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