<template>
	<view class="activity">
	   <web-view :webview-styles="webviewStyles" :src="activityPath"></web-view>
	   <!-- 侧边 -->
	   <scroll-top :isScrollTop="isScrollTop" :bottom="200"></scroll-top>
	</view>
</template>

<script>
	export default {
	    data() {
	        return {
	            webviewStyles: {
	                progress: {
	                    color: '#FF3333'
	                }
	            },
				productID:'',
				activityPath:'',
				isScrollTop:false
	        }
	    },
		onLoad(option) {
			console.log(option)
			switch(option.id){
				case '277':
					this.activityPath = 'https://static.caimei365.com/app/caimei-activity-h5/html/2020/caimeih5_01.html'
					uni.setNavigationBarTitle({title:'三昭国际优惠'});
					break;
				case '278':
					this.activityPath = 'https://static.caimei365.com/app/caimei-activity-h5/html/2020/caimeih5_02.html'
					uni.setNavigationBarTitle({title:'点斗优惠'});
					break;
				case '280':
					this.activityPath = 'https://static.caimei365.com/app/caimei-activity-h5/html/2020/caimeih5_03.html'
					uni.setNavigationBarTitle({title:'唯美概念DEP优惠'});
					break;
				case '223':
					this.activityPath = 'https://static.caimei365.com/app/caimei-activity-h5/html/2020/caimeih5_99.html'
					uni.setNavigationBarTitle({title:'品牌OEM服务'});
					break;
			}
			
		},
		methods:{
			
		},
		onPageScroll(e){//实时获取到滚动的值
			if(e.scrollTop>600){
				this.isScrollTop = true
			}else{
				this.isScrollTop = false
			}	
		},
	}
</script>
	
<style lang="scss">
	.activity{
		width: 100%;
		height: auto;
		image{
			width: 100%;
			height: auto;
		}
	}
</style>
