<template>
	<view class="containers" :style="{'height':winHeight+'px'}">
		<view class="title">BD访客</view>
		<view class="bdfk">
			<view>
				<u--image :showLoading="true" :src="ptfk" width="315rpx" height="600rpx" @click="toUrl(1)"></u--image>
			</view>
			<view class="sgry">
				<u--image :src="wlcl" width="315rpx" height="280rpx" @click="toUrl(3)"></u--image>
				<view>
					<u--image :src="sgry" width="315rpx" height="280rpx" @click="toUrl(2)"></u--image>
				</view>
			</view>
			<!-- <img src="../../static/img/ptfk1.png" alt=""> -->
		</view>
		<view class="title">BD管理员</view>
		<view>
			<u--image :src="bdgl" width="670rpx" height="336rpx" @click="toUrl(4)"></u--image>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				ptfk: require('../../static/img/ptfk1.png'),
				wlcl: require('../../static/img/wlcl1.png'),
				sgry: require('../../static/img/sgry1.png'),
				bdgl: require('../../static/img/bdgl.png'),
				winHeight: 0
			}
		},
		onLoad() {
			console.log(uni.getSystemInfoSync().statusBarHeight)
			this.winHeight = uni.getSystemInfoSync().screenHeight - uni.getSystemInfoSync().statusBarHeight * 2-20;
			console.log(this.winHeight)
		},
		methods: {
			toUrl(type) {
				let url = ""
				switch (type) {
					case 1:
						url = "/pages/visit/addrecord?type=1"
						break;
					case 2:
						url = "/pages/visit/addrecord?type=2"
						break;
					case 3:
						url = "/pages/visit/addrecord?type=3"
						// url = "/pages/visit/study?type=3"
						break;
					case 4:
						url = "/pages/index/login"
						break;
				}
				console.log(url)
				uni.navigateTo({
					url:url
				})
			}
		}
	}
</script>

<style scoped>
	.containers {
		background-color: #044ed7;
		padding: 0 40rpx;
		padding-bottom:20px;
	}

	.title {
		color: #fff;
		font-size: 32rpx;
		padding: 40rpx 0;
		padding-top: 70rpx
	}
	.title:first-child{
		padding-top:30rpx
	}
	.bdfk {
		display: flex;
		justify-content: space-between;
	}

	.sgry view {
		margin-top: 40rpx
	}
</style>
