店播抖音版小程序

live.vue 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <view style="background: #FFFFFF;">
  3. <page-head title="home" background="#ffffff"></page-head>
  4. <view :style="'padding-top:'+ safeAreaTop+'px'">
  5. <view class="searchView">
  6. <i class="iconfont icon-search_icon"></i>
  7. <input type="text" value="" placeholder="搜直播" />
  8. <button>搜索</button>
  9. </view>
  10. <scroll-view class="rankTabBox" scroll-x="true">
  11. <view :class="['rankTab',tab == 1 ? 'tab_active' : '']">
  12. <text class="text">正在直播</text>
  13. <image src="https://kx-bigdata.oss-cn-beijing.aliyuncs.com/shop_live/live.gif" mode="heightFix" class="img"></image>
  14. </view>
  15. <view class="rankTab">
  16. <text class="text">直播带货榜</text>
  17. </view>
  18. </scroll-view>
  19. <template v-if="showFlag">
  20. <onLive v-if="tab==1" :height='(safeAreaTop*2 + 420)'></onLive>
  21. </template>
  22. </view>
  23. <tabbar selected='livePage'></tabbar>
  24. </view>
  25. </template>
  26. <script>
  27. import tabbar from '@/components/tabbar.vue'
  28. import onLive from './onLive.vue'
  29. export default {
  30. components:{
  31. tabbar,
  32. onLive
  33. },
  34. data() {
  35. return {
  36. safeAreaTop:this.$store.state.systemInfo.safeAreaTop,
  37. tab:1,
  38. showFlag:false
  39. }
  40. },
  41. async onLoad() {
  42. await this.$onLaunched;
  43. this.showFlag = true
  44. },
  45. methods: {
  46. }
  47. }
  48. </script>
  49. <style scoped lang="scss">
  50. @import '@/common/css/rank.scss'
  51. </style>