t-i-bottom-OA.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template>
  2. <view class="content">
  3. <view class="section_1" v-if="bottom[2].data.length > 0">
  4. <scroll-view scroll-x>
  5. <view class="tab_box">
  6. <view class="tab" v-for="(item,index) in bottom[2].data[0].children" :key="index">
  7. <view class="title" @click="change_active(index+1)" :class="active==index+1?'active':''">{{item.title}}</view>
  8. </view>
  9. </view>
  10. </scroll-view>
  11. <view v-for="(item,index) in bottom[2].data[0].children" :key="index">
  12. <view class="list" v-if="index+1 == active">
  13. <view class="item" v-for="(item_2,index_2) in item.children" :key="index_2" @click="go_record(item_2)">
  14. {{item_2.title}}
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. <!-- 图片链接 -->
  20. <view class="section_2" v-if="bottom[3].data.length > 0">
  21. <view class="title">{{bottom[3].type_name}}</view>
  22. <view class="list">
  23. <view class="item" v-for="(item,index) in bottom[3].data[0].children" :key="index" @click="go_record(item)">
  24. <image :src="item.thumb" mode=""></image>
  25. </view>
  26. </view>
  27. </view>
  28. <!-- 快速通道 -->
  29. <view class="section_3" v-if="bottom[4].data.length > 0">
  30. <view class="title">{{bottom[4].type_name}}</view>
  31. <view class="list">
  32. <view class="item" v-for="(item,index) in bottom[4].data[0].children" :key="index" @click="go_record(item)">
  33. <image :src="item.thumb" mode="widthFix"></image>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. import {
  41. goToLink
  42. } from "@/common/common.js"
  43. export default {
  44. name: "t-i-bottom",
  45. props: [
  46. "bottom",
  47. "mine_code"
  48. ],
  49. data() {
  50. return {
  51. active: 1,
  52. };
  53. },
  54. methods: {
  55. change_active(index) {
  56. console.log(index)
  57. this.active = index
  58. },
  59. go_record(item) {
  60. goToLink(item, this.mine_code)
  61. }
  62. }
  63. }
  64. </script>
  65. <style lang="scss">
  66. .content {
  67. margin-top: 10rpx;
  68. padding-bottom: 40rpx;
  69. background-color: #FFFFFF;
  70. }
  71. .section_1 {
  72. box-sizing: border-box;
  73. padding: 25rpx;
  74. .tab_box{
  75. display: flex;
  76. .tab {
  77. margin-right: 40rpx;
  78. text-align: center;
  79. .title {
  80. width: 160rpx;
  81. line-height: 80rpx;
  82. font-size: 36rpx;
  83. }
  84. .active {
  85. color: #009fe8;
  86. border-bottom: 4rpx solid #009fe8;
  87. }
  88. }
  89. }
  90. .list {
  91. margin-top: 30rpx;
  92. overflow: hidden;
  93. .item {
  94. float: left;
  95. margin-right: 20rpx;
  96. margin-bottom: 30rpx;
  97. width: 160rpx;
  98. box-sizing: border-box;
  99. border: 2rpx solid #009fe8;
  100. border-radius: 20rpx;
  101. font-size: 28rpx;
  102. line-height: 70rpx;
  103. //超过一行省略号
  104. overflow: hidden;
  105. white-space: nowrap;
  106. text-overflow: ellipsis;
  107. padding: 0 10rpx;
  108. background-color: #66C7F218;
  109. color: #009FE8;
  110. text-align: center;
  111. }
  112. .item:nth-child(4n) {
  113. margin-right: 0;
  114. }
  115. }
  116. }
  117. .section_2 {
  118. box-sizing: border-box;
  119. padding: 0 25rpx;
  120. .title {
  121. line-height: 120rpx;
  122. font-size: 36rpx;
  123. }
  124. .list {
  125. display: flex;
  126. flex-wrap: wrap;
  127. justify-content: space-between;
  128. .item {
  129. margin-bottom: 20rpx;
  130. width: 340rpx;
  131. height: 180rpx;
  132. border-radius: 20rpx;
  133. overflow: hidden;
  134. image {
  135. width: 340rpx;
  136. height: 180rpx;
  137. }
  138. }
  139. }
  140. }
  141. .section_3 {
  142. box-sizing: border-box;
  143. padding: 0 25rpx;
  144. .title {
  145. line-height: 120rpx;
  146. font-size: 36rpx;
  147. }
  148. .list {
  149. display: flex;
  150. flex-wrap: wrap;
  151. justify-content: space-between;
  152. .item {
  153. margin-bottom: 20rpx;
  154. width: 700rpx;
  155. border-radius: 10rpx;
  156. overflow: hidden;
  157. image {
  158. width: 700rpx;
  159. }
  160. }
  161. }
  162. }
  163. </style>