123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <template>
- <view class="container home clearfix">
- <!-- 主页内容 -->
- <tui-skeleton
- v-if="!skeletonShow"
- backgroundColor="#fafafa"
- borderRadius="10rpx"
- :isLoading="true"
- :loadingType="5"
- />
- <view class="container-home tui-skeleton">
- <!-- 轮播 -->
- <banner :list="bannerList" v-if="skeletonShow" />
- <!-- 金刚区菜单 -->
- <navbars :list="mainmenu" v-if="skeletonShow" />
- <!-- 活动模块 -->
- <hotmode :mallTheme="mallTheme" v-if="skeletonShow" />
- <!-- 楼层模块 -->
- <floors :list="floorList" v-if="skeletonShow" />
- </view>
- <!-- 侧边 -->
- <scroll-top :isScrollTop="isScrollTop" :bottom="50" />
- </view>
- </template>
- <script>
- import { mapState, mapMutations } from 'vuex'
- import banner from './components/banner.vue'
- import navbars from './components/navbars.vue'
- import hotmode from './components/hotmode.vue'
- import floors from './components/floors.vue'
- import homeMiXins from './index.js'
- import shareMixin from '@/mixins/shareMixin.js'
- export default {
- mixins: [homeMiXins, shareMixin],
- components: {
- banner,
- navbars,
- hotmode,
- floors
- },
- onLoad() {},
- onPageScroll(e) {
- //实时获取到滚动的值
- if (e.scrollTop > 400) {
- this.isScrollTop = true
- } else {
- this.isScrollTop = false
- }
- },
- onPullDownRefresh() {
- //下拉刷新
- this.mallOrganizeHome()
- uni.stopPullDownRefresh()
- },
- onShow() {
- this.authApplets()
- },
- onHide() {}
- }
- </script>
- <style lang="scss">
- page {
- background-color: #ffffff;
- }
- .container-section {
- width: 100%;
- height: auto;
- background-color: #f7f7f7;
- }
- </style>
|