my_question.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <view style="padding: 30rpx;">
  3. <view v-for="(item, index) in list" :key="index" style="margin-bottom: 30rpx;">
  4. <navigator hover-class="none" :url="'/pages2/bank/question_detail?id='+item.goodsId">
  5. <!-- <navigator hover-class="none" url="/pages2/bank/detail"> -->
  6. <view class="class_item">
  7. <image class="img" :src="$method.splitImgHost(item.coverUrl, true)"></image>
  8. <view style="color: #333333;font-weight: bold;font-size: 32rpx;">
  9. {{item.goodsName}}
  10. </view>
  11. <view class=".content_box">
  12. <image src="/static/icon/wk_icon2.png" class="wk_icon"></image>
  13. 学习有效期:<text class="content"> {{$method.timestampToTime(item.studyStartTime)}} - {{$method.timestampToTime(item.studyEndTime)}} </text>
  14. </view>
  15. </view>
  16. <!-- </navigator> -->
  17. <view class="bottomBox">
  18. <view style="color: #999999;font-size: 24rpx;">刷题进度:{{item.doNum}}/{{item.totalNum}}</view>
  19. <view class="box_progress">
  20. <view style="width: 60%;">
  21. <u-line-progress :show-percent="false" height="22" active-color="#007AFF" :percent="(item.doNum/item.totalNum)*100"></u-line-progress>
  22. </view>
  23. <view>
  24. <!-- <navigator hover-class="none" :url="'/pages2/bank/question_detail?id='+item.goodsId"> -->
  25. <view class="btn">进入刷题</view>
  26. <!-- </navigator> -->
  27. </view>
  28. </view>
  29. </view>
  30. </navigator>
  31. </view>
  32. <view v-if="list.length==0">
  33. <u-empty text="暂无题库" margin-top="500" mode="list"></u-empty></view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. export default {
  39. data() {
  40. return {
  41. list:[]
  42. }
  43. },
  44. onLoad(option) {
  45. this.listGoodsUserQuestion();
  46. },
  47. onShow(){
  48. },
  49. methods: {
  50. listGoodsUserQuestion() {
  51. this.$api.listGoodsUserQuestion({
  52. }).then(res => {
  53. this.list = res.data.rows;
  54. })
  55. },
  56. studyIn(){
  57. this.$navTo.togo('/pages2/verify/input');
  58. },
  59. appointment(){
  60. this.$navTo.togo('/pages2/appointment/index');
  61. }
  62. },
  63. }
  64. </script>
  65. <style >
  66. page {
  67. background: #EAEEF1;
  68. }
  69. </style>
  70. <style lang="scss" scope>
  71. .box_progress{
  72. display: flex;
  73. justify-content:space-between;
  74. align-items: center;
  75. margin-top: 20rpx;
  76. .btn {
  77. width: 165rpx;
  78. height: 48rpx;
  79. background: #007AFF;
  80. border-radius: 16rpx;
  81. line-height: 48rpx;
  82. text-align: center;
  83. color:#fff;
  84. font-size: 30rpx;
  85. }
  86. }
  87. .bottomBox{
  88. background: #FFFFFF;
  89. width: 94%;
  90. border-bottom-left-radius: 24rpx;
  91. border-bottom-right-radius: 24rpx;
  92. margin: 0 auto;
  93. padding: 20rpx;
  94. }
  95. .content_box{
  96. display: flex;
  97. align-items: center;
  98. color: #999999;
  99. margin-top: 8rpx;
  100. }
  101. .content{
  102. color: #000000;
  103. margin: 0 8rpx;
  104. }
  105. .wk_icon{
  106. width: 24rpx;
  107. height: 24rpx;
  108. margin-right: 8rpx;
  109. }
  110. .class_item{
  111. width: 100%;
  112. height: 514rpx;
  113. background: #FFFFFF;
  114. box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
  115. border-radius: 24rpx;
  116. padding: 20rpx;
  117. z-index: 999;
  118. position: relative;
  119. .img {
  120. width:100%;
  121. border-radius: 24rpx;
  122. height: 316rpx;
  123. }
  124. }
  125. </style>