wdxuexi.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <view class="ayuu">
  3. <view class="xuehhbfr">
  4. <view class="indhuyr">
  5. <view class="indjbrr"></view>
  6. <text>今天</text>
  7. </view>
  8. <view>
  9. <view v-if="today.length==0" style="text-align: center; width: 100%;">暂无数据</view>
  10. <view v-for="(item,index) in today" :key="index" class="fzctob xiekkt">
  11. <view class="sckjert" style="overflow: hidden;">
  12. <image :src="item.img" mode="aspectFill" style="width: 100%; height: 100%;"></image>
  13. </view>
  14. <view class="fsxto" style="width: 100%;margin-left: 24rpx;">
  15. <view class="cphrry"><text>{{item.title}}</text></view>
  16. <view class="cptxtyra" style="margin-top: 4rpx;margin-bottom: 0;"><text>观看至{{item.catalog_title}}</text></view>
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="xuehhbfr">
  22. <view class="indhuyr">
  23. <view class="indjbrr"></view>
  24. <text>昨天</text>
  25. </view>
  26. <view>
  27. <view v-if="yesterday.length==0" style="text-align: center; width: 100%;">暂无数据</view>
  28. <view v-for="(item,index) in yesterday" :key="index" class="fzctob xiekkt">
  29. <view class="sckjert" style="overflow: hidden;">
  30. <image :src="item.img" mode="aspectFill" style="width: 100%; height: 100%;"></image>
  31. </view>
  32. <view class="fsxto" style="width: 100%;margin-left: 24rpx;">
  33. <view class="cphrry"><text>{{item.title}}</text></view>
  34. <view class="cptxtyra" style="margin-top: 4rpx;margin-bottom: 0;"><text>观看至{{item.catalog_title}}</text></view>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. <view class="xuehhbfr">
  40. <view class="indhuyr">
  41. <view class="indjbrr"></view>
  42. <text>更早</text>
  43. </view>
  44. <view>
  45. <view v-if="earlier.length==0" style="text-align: center; width: 100%;">暂无数据</view>
  46. <view v-for="(item,index) in earlier" :key="index" class="fzctob xiekkt">
  47. <view class="sckjert" style="overflow: hidden;">
  48. <image :src="item.img" mode="aspectFill" style="width: 100%; height: 100%;"></image>
  49. </view>
  50. <view class="fsxto" style="width: 100%;margin-left: 24rpx;">
  51. <view class="cphrry"><text>{{item.title}}</text></view>
  52. <view class="cptxtyra" style="margin-top: 4rpx;margin-bottom: 0;"><text>观看至{{item.catalog_title}}</text></view>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </template>
  59. <style>
  60. page {
  61. background: #FAFAFA;
  62. }
  63. </style>
  64. <script>
  65. export default {
  66. data() {
  67. return {
  68. page:1,
  69. num:20,
  70. total:0,
  71. today:[],
  72. yesterday:[],
  73. earlier:[],
  74. }
  75. },
  76. onLoad() {
  77. this.getlist()
  78. },
  79. methods:{
  80. getlist(){
  81. this.$post({
  82. data:{
  83. do:'MyCourse',
  84. data:{
  85. user_id:uni.getStorageSync('id'),
  86. }
  87. }
  88. }).then(res=>{
  89. console.log(res)
  90. this.today = res.data.today
  91. this.yesterday = res.data.yesterday
  92. this.earlier = res.data.earlier
  93. })
  94. }
  95. }
  96. }
  97. </script>
  98. <style lang="scss" scoped>
  99. </style>