index.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <view class="container home clearfix">
  3. <!-- 主页内容 -->
  4. <tui-skeleton
  5. v-if="!skeletonShow"
  6. backgroundColor="#fafafa"
  7. borderRadius="10rpx"
  8. :isLoading="true"
  9. :loadingType="5"
  10. />
  11. <view class="container-home tui-skeleton">
  12. <!-- 轮播 -->
  13. <banner :list="bannerList" v-if="skeletonShow" />
  14. <!-- 金刚区菜单 -->
  15. <navbars :list="mainmenu" v-if="skeletonShow" />
  16. <!-- 活动模块 -->
  17. <hotmode :mallTheme="mallTheme" v-if="skeletonShow" />
  18. <!-- 楼层模块 -->
  19. <floors :list="floorList" v-if="skeletonShow" />
  20. </view>
  21. <!-- 侧边 -->
  22. <scroll-top :isScrollTop="isScrollTop" :bottom="50" />
  23. </view>
  24. </template>
  25. <script>
  26. import { mapState, mapMutations } from 'vuex'
  27. import banner from './components/banner.vue'
  28. import navbars from './components/navbars.vue'
  29. import hotmode from './components/hotmode.vue'
  30. import floors from './components/floors.vue'
  31. import homeMiXins from './index.js'
  32. import shareMixin from '@/mixins/shareMixin.js'
  33. export default {
  34. mixins: [homeMiXins, shareMixin],
  35. components: {
  36. banner,
  37. navbars,
  38. hotmode,
  39. floors
  40. },
  41. onLoad() {},
  42. onPageScroll(e) {
  43. //实时获取到滚动的值
  44. if (e.scrollTop > 400) {
  45. this.isScrollTop = true
  46. } else {
  47. this.isScrollTop = false
  48. }
  49. },
  50. onPullDownRefresh() {
  51. //下拉刷新
  52. this.mallOrganizeHome()
  53. uni.stopPullDownRefresh()
  54. },
  55. onShow() {
  56. this.authApplets()
  57. },
  58. onHide() {}
  59. }
  60. </script>
  61. <style lang="scss">
  62. page {
  63. background-color: #ffffff;
  64. }
  65. .container-section {
  66. width: 100%;
  67. height: auto;
  68. background-color: #f7f7f7;
  69. }
  70. </style>