<template>
	<view class="my-content">
		<view class="item" v-for="item in certs">
			<image @click="showImg(item)" :src="item" mode="widthFix"></image>
		</view>
		
	</view>
</template>
<script>
	import {getConfigByKey} from '@/api/common'
	export default {
		data() {
			return {
				 certs:[]
			}
		},
		onLoad(val) {
			this.getConfigByKey();
		},
		methods: {
			getConfigByKey(){
				var that=this;
				var data={key:"his.certs"}
				getConfigByKey(data).then(
					res => {
						if(res.code==200){
							this.certs=JSON.parse(res.data).certs.split(',');
						}
					},
					rej => {}
				);
			},
			showImg(item) {
				 //预览图片
				 var urls=[];
				 urls.push(item)
				 uni.previewImage({
					urls: urls,
					current: 0
				 });
			},
		}
	}
 
 
</script>


<style scoped lang="scss">
page{
	height: 100%;
}
.my-content{
	width: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	.item{
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
		margin: 30rpx;
		width: 100%;
	}
	
}
 

</style>
