<template>
    <view class="home">
		<image :src="bgimg" class="homebg"></image>
		<view  class="homebox" :style="'padding-top:'+padtop+'px'">
			<!-- 头部 -->
			<navbar :back="false" title="首页" :bgcolor="backgroundColor" color="#fff" fixed zIndex="1010" :center="true"	:custom='true' @getTop="getTop"/>
			<view class="homeboxa">
				<div>22</div>
				<view style="background-color: #000;width: 100%;height: 100vh;">
</view>
			
				
			</view>
		</view>
		
		
    <!-- 底部 导航栏  currentPage 当前页面ID -->
        <tab-bar :currentPage="0"></tab-bar>
    </view>
</template>

<script>
	import url from "@/util/url";
	let {host} = url
    //导入组件
    import tabBar from '@/components/tabbar/tabbar.vue'
    export default {
        data() {
            return {
				padtop:this.$http._GET.customBarH||0,
				backgroundColor: 'transparent',
				bgimg:require('@/static/image/bg.png'),
				
            };
        },
        components:{
            tabBar
        },
        methods: {
			getTop(e){
				this.padtop=e;
			},
			// 监听滚动
			
		},
		// onPageScroll(res) {
		// 	var scrolltop=res.scrollTop;
		// 	if(scrolltop>0){
		// 		this.backgroundColor='linear-gradient(90deg, #A00517, #E93030)'
		// 	}else{
		// 		this.backgroundColor='transparent'
		// 	}
		// 	console.log("页面滚动了",res.scrollTop)

		//  },
    };
</script>
<style scoped lang="scss">
	.home{height: 100vh;background: #f5f5f5;position: relative;
		.homebg{width: 100%;height: 376rpx;}
		.homebox{position: absolute;left: 0;right: 0;top: 0;bottom: 0;box-sizing: border-box;max-height: 100vh;display: flex;flex-direction: column;
			.homeboxa{flex: 1;overflow: scroll;}
		
		}
	}
</style>