newVideo.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <view>
  3. <view class="title" >
  4. <view class="title_text">{{info.title}}</view>
  5. <view class="title_more" @click="clicktoMore">更多></view>
  6. </view>
  7. <view v-if="menuslist.length>0">
  8. <videoList :listdata="menuslist" ></videoList>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. import videoList from '@/pages/components/videoList.vue'
  14. import {moduleByFive} from '@/http/api/common.js'
  15. export default {
  16. components: {
  17. videoList,
  18. },
  19. data() {
  20. return {
  21. menuslist:[],
  22. info:{
  23. title:'最新资讯'
  24. }
  25. }
  26. },
  27. async mounted() {
  28. this.getmoduleByFive()
  29. },
  30. methods: {
  31. async getmoduleByFive(){
  32. //获取模块5
  33. let res = await moduleByFive()
  34. this.menuslist = []
  35. if (res.data.code == 200) {
  36. this.info = res.data.data
  37. this.menuslist = res.data.data.articleVoList
  38. }
  39. },
  40. clicktoMore(){
  41. if (this.info?.moreToSubId && this.info?.moreToColumnId) {
  42. let data = {
  43. curNowid:this.info?.moreToColumnId,
  44. curNowsubid:this.info?.moreToSubId,
  45. }
  46. uni.setStorageSync('curNowdata',JSON.stringify(data) );
  47. uni.switchTab({
  48. url: '/pages/home/Information',
  49. });
  50. }
  51. },
  52. }
  53. }
  54. </script>
  55. <style>
  56. .title{
  57. display: flex;
  58. width: 90vw;
  59. justify-content: space-between;
  60. margin: 0 auto;
  61. }
  62. .title_text{
  63. width: 128rpx;
  64. height: 45rpx;
  65. font-size: 32rpx;
  66. font-weight: bold;
  67. color: #333333;
  68. line-height: 45rpx;
  69. }
  70. .title_more{
  71. width: 80rpx;
  72. height: 40rpx;
  73. font-size: 28rpx;
  74. font-weight: 500;
  75. color: #999999;
  76. line-height: 40rpx;
  77. }
  78. .box{
  79. display: flex;
  80. margin: 20rpx 0;
  81. justify-content: flex-start;
  82. width: 90vw;
  83. flex-direction: column;
  84. align-items: center;
  85. }
  86. .box_img{
  87. width: 100%;
  88. height: 395rpx;
  89. border-radius: 16rpx;
  90. background-color: #999999;
  91. }
  92. .box_right{
  93. margin-left: 10rpx;
  94. display: flex;
  95. flex-direction: column;
  96. justify-content: space-around;
  97. }
  98. .box_title{
  99. width: 100%;
  100. height: 45rpx;
  101. font-size: 32rpx;
  102. font-weight: bold;
  103. color: #333333;
  104. line-height: 45rpx;
  105. display: -webkit-box;
  106. word-break: break-all;
  107. text-overflow: ellipsis;
  108. overflow: hidden;
  109. -webkit-box-orient: vertical;
  110. -webkit-line-clamp:1;
  111. }
  112. .box_bottom{
  113. display: flex;
  114. justify-content: space-between;
  115. width: 100%;
  116. }
  117. .box_type{
  118. display: flex;
  119. justify-content: space-between;
  120. font-size: 28rpx;
  121. font-weight: 500;
  122. color: #999999;
  123. line-height: 40rpx;
  124. }
  125. .iconm_play{
  126. position: relative;
  127. left: 40%;
  128. top: -260rpx;
  129. z-index: 150;
  130. }
  131. </style>