<template>
	<view class="container clearfix">
		<image :src="imagePath" :class="imgClass" @click="previewImg" mode=""></image>
	</view>
</template>

<script>
	export default{
		data() {
			return{
				staticUrl: this.$Static,
				imagePath:'',
				imgClass:'',
				imageList:[],
			}
		},
		onLoad(option){
			this.imagePath = `${this.staticUrl}certificates/certificates-${option.id}.png`
			this.imgClass = `image-${option.id}`
			this.imageList.push(this.imagePath)
		},
		methods:{
			previewImg () {//顶部商品图片预览
				uni.previewImage({
					current: 0, 	//图片索引
					urls: this.imageList, //必须是http图片，本地图片无效
					longPressActions:''
				})
			}
		}
	}
</script>

<style lang="scss">
	page{
		background-color: #FFFFFF;
	}
	.container{
		width: 100%;
		height: auto;
		box-sizing: border-box;
		padding: 0 24rpx;
		.image-1{
			width: 100%;
			height: 480rpx;
		}
		.image-2{
			width: 100%;
			height: 940rpx;
		}
		.image-3{
			width: 100%;
			height: 4294rpx;
		}
	}
</style>