<template>
	<view class="activity">
	   <web-view :webview-styles="webviewStyles" :src="activityPath"></web-view>
	   <!-- 侧边 -->
	   <scroll-top v-if="isScrollTop"></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-b.caimei365.com/app/caimei-h5/html/2020/caimeih5_01.html'
					uni.setNavigationBarTitle({title:'三昭国际优惠'});
					break;
				case '278':
					this.activityPath = 'https://static-b.caimei365.com/app/caimei-h5/html/2020/caimeih5_02.html'
					uni.setNavigationBarTitle({title:'点斗优惠'});
					break;
				case '223':
					this.activityPath = 'https://static-b.caimei365.com/app/caimei-h5/html/2020/caimeih5_03.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>
