supplier_more.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <template>
  2. <view class="more">
  3. <view class="supplier_login"><login-menu ref="login-menu" :menuList="menuList" @scrollPage="scrollPage" /></view>
  4. <view class="more-bg">
  5. <image src="https://static.caimei365.com/app/img/supplier-login/growth/banner.png" mode=""></image>
  6. </view>
  7. <view class="container">
  8. <view class="tabs">
  9. <view class="tab" :class="active === i.id ? 'active' : ''" v-for="i in activeTabs" :key="i.id" @click="handlerTabs(i)">
  10. {{ i.title }}
  11. </view>
  12. </view>
  13. <view class="growth-module-list">
  14. <active-team-com v-for="i in dataList" :key="i.id" :module="i" :active="active" @playVideo="playVideo"/>
  15. </view>
  16. </view>
  17. <cm-video :show="showVideo" @closeClick="closeVideo" :videoObj="videoObj" />
  18. </view>
  19. </template>
  20. <script>
  21. import LoginMenu from './components/supplier-loginMenu.vue'
  22. import activeTeamCom from './components/activeTeamCom.vue'
  23. import CmVideo from './components/caimei-video.vue'
  24. export default {
  25. components: {
  26. LoginMenu,
  27. activeTeamCom,
  28. CmVideo
  29. },
  30. data () {
  31. return {
  32. menuList: [
  33. {
  34. id: 0,
  35. title: '营销服务'
  36. },
  37. {
  38. id: 1,
  39. title: '解决方案'
  40. },
  41. {
  42. id: 2,
  43. title: '运营产品'
  44. },
  45. {
  46. id: 3,
  47. title: '营销工具'
  48. },
  49. {
  50. id: 4,
  51. title: '成功案例'
  52. },
  53. {
  54. id: 5,
  55. title: '关于采美'
  56. },
  57. {
  58. id: 6,
  59. title: '增长社区'
  60. }
  61. ],
  62. activeMenu: '',
  63. isActive: 6,
  64. activeTabs: [
  65. {
  66. id: 1,
  67. title: '美业企谈'
  68. },
  69. {
  70. id: 2,
  71. title: '干货知识'
  72. }
  73. ],
  74. active: 1,
  75. dataList: [],
  76. showVideo: false,
  77. videoObj: {}
  78. }
  79. },
  80. onLoad (option) {
  81. this.handlerInit()
  82. this.active = Number(option.active)
  83. this.getSupplierLanding(this.active)
  84. },
  85. methods: {
  86. // 滚动事件
  87. scrollPage($event) {
  88. this.activeMenu = $event
  89. uni.$emit('handlerChangeLink', $event)
  90. uni.navigateBack({ delta: 1 })
  91. },
  92. // init
  93. handlerInit () {
  94. this.$refs['login-menu'].activeMenu = 'item6'
  95. this.$refs['login-menu'].isActive = 6
  96. },
  97. handlerTabs ($event) {
  98. this.active = $event.id
  99. this.getSupplierLanding(this.active)
  100. },
  101. async getSupplierLanding(active) {
  102. try {
  103. const { data } = await this.UserService.supplierLoading({ source: 2 })
  104. this.dataList = active === 1 ? data.landing.filter(e => e.type == '2') : data.landing.filter(e => e.type == '3')
  105. } catch (error) {
  106. console.log(error)
  107. }
  108. },
  109. // 视频播放
  110. playVideo($event) {
  111. this.videoObj = $event
  112. this.showVideo = true
  113. },
  114. // 视频关闭
  115. closeVideo() {
  116. this.showVideo = false
  117. },
  118. }
  119. }
  120. </script>
  121. <style scoped lang="scss">
  122. .more {
  123. .more-bg {
  124. padding-top: 110rpx;
  125. height: 360rpx;
  126. image {
  127. width: 100%;
  128. height: 100%;
  129. }
  130. }
  131. .container {
  132. padding: 70rpx 33rpx;
  133. box-sizing: border-box;
  134. .tabs {
  135. padding-bottom: 30rpx;
  136. align-items: center;
  137. display: flex;
  138. box-sizing: border-box;
  139. .tab {
  140. color: #666666;
  141. font-size: 32rpx;
  142. margin-right: 56rpx;
  143. &.active {
  144. color: #333333;
  145. font-weight: bold;
  146. border-bottom: 3rpx solid #FF5B00;
  147. }
  148. }
  149. }
  150. .growth-module-list {
  151. display: grid;
  152. grid-template-columns: repeat(2, 1fr);
  153. grid-gap: 20rpx;
  154. }
  155. }
  156. }
  157. </style>