healthCourse.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <view class="column " style="height: 100%;">
  3. <view class="justify-center bgf" >
  4. <u-tabs :list="list1" lineWidth='30' lineColor="#018C39"
  5. @click="acttab"></u-tabs>
  6. </view>
  7. <view v-if="acttabs==0" class="list-img flex-1 scrolly p20" >
  8. <view class="bgf radius20 list mtb10" v-for="item in 9" >
  9. <view class="posimg">
  10. <image src="https://beiliyo-2025.obs.cn-north-4.myhuaweicloud.com/fs/20250116/1737005549926.png" mode="aspectFill" class="img"></image>
  11. <image src="../../static/images/common/video_icon.png" class="ve"></image>
  12. </view>
  13. <view class="p20">
  14. <view>健康养生</view>
  15. <view class="color9 fs24 ellipsis ">
  16. 通过科学的饮食、运动等方式养好自己身体,活出生命质量
  17. </view>
  18. <view class="mt8 justify-between align-center">
  19. <view class="justify-start align-center">
  20. <u-avatar :src="src" size="20"></u-avatar>
  21. <text class="fs24 color6 ml8">崔医生</text>
  22. </view>
  23. <view class="justify-start align-center zan">
  24. <image src='../../static/images/common/zan_icon.png' v-if='zanact'></image>
  25. <image src='../../static/images/common/zan_on_icon.png' v-else></image>
  26. <view class="color6 fs24">5454</view>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <view v-else>
  33. <view class="column align-center">
  34. <image src="../../static/images/common/zanwuzhibo.png"
  35. class="w200 h200"></image>
  36. <view>暂无课程</view>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. export default {
  43. data() {
  44. return {
  45. list1: [{
  46. name: '红包课程',
  47. }, {
  48. name: '直播课程',
  49. }],
  50. color:this.$store.state.theme.currentMoban['--base-color'],
  51. acttabs:0,
  52. src:'',
  53. zanact:true
  54. }
  55. },
  56. methods: {
  57. acttab(e){
  58. this.acttabs=e.index
  59. console.log(e)
  60. }
  61. }
  62. }
  63. </script>
  64. <style lang="scss" scoped>
  65. .list-img{
  66. display: flex;
  67. flex-wrap: wrap;
  68. justify-content: space-between;
  69. .list{
  70. width: 48%;
  71. }
  72. }
  73. .img{
  74. width: 100%;
  75. height: 350rpx;
  76. }
  77. .ve{
  78. width: 60rpx;
  79. height: 60rpx;
  80. position: absolute;
  81. bottom: 50%;
  82. left: 40%;
  83. }
  84. .posimg{
  85. position: relative;
  86. }
  87. .zan{
  88. image{
  89. width: 32rpx;
  90. height: 32rpx;
  91. }
  92. }
  93. </style>