123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <template>
- <view class="container home clearfix">
- <!-- 主页内容 -->
- <tui-skeleton
- v-if="!skeletonShow"
- backgroundColor="#fafafa"
- borderRadius="10rpx"
- :isLoading="true"
- :loadingType="5"
- ></tui-skeleton>
- <view class="container-home tui-skeleton">
- <!-- 轮播 -->
- <banner :list="bannerList" v-if="skeletonShow"></banner>
- <!-- 金刚区菜单 -->
- <navbars :list="mainmenu" v-if="skeletonShow"></navbars>
- <!-- 活动模块 -->
- <hotmode :mallTheme="mallTheme" v-if="skeletonShow"></hotmode>
- <!-- 楼层模块 -->
- <floors :list="floorList" v-if="skeletonShow"></floors>
- </view>
- </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'
- export default {
- mixins: [ homeMiXins ],
- components: {
- banner,
- navbars,
- hotmode,
- floors
- },
- onLoad() {},
- onPageScroll(e) {
- //实时获取到滚动的值
- if (e.scrollTop > 50) {
- this.inputActive = 'fixed'
- } else {
- this.inputActive = 'float'
- }
- if (e.scrollTop > 400) {
- this.isScrollTop = true
- } else {
- this.isScrollTop = false
- }
- },
- onPullDownRefresh() {
- //下拉刷新
- this.getHomeInformation()
- uni.stopPullDownRefresh()
- },
- onShareAppMessage(res) {
- //分享转发
- if (res.from === 'button') {
- // 来自页面内转发按钮
- }
- return {
- title: '生美医美正品采购服务平台',
- path: 'pages/tabBar/home/index',
- imageUrl: 'https://static.caimei365.com/app/img/bg/min-banner.jpg'
- }
- },
- onShow() {
- this.authApplets()
- },
- onHide() {
- }
- }
- </script>
- <style lang="scss">
- page {
- background-color: #ffffff;
- }
- .container-section {
- width: 100%;
- height: auto;
- background-color: #f7f7f7;
- }
- </style>
|