<template>
	<view class="UserAgreement">
		<view class="AgreementIcon">
			<image :src="ImgUrl+'xzf/AgreementIcon.png'" mode="aspectFit"></image>
		</view>
		<view class="AgreementList">
			<view class="AgreementItem" @click="ToAgreement(1)" style="border-bottom: none;">
				<view class="left">
					<image :src="ImgUrl+'xzf/AgreementIcon1.png'" mode="aspectFit"></image>
					<view class="">《服务协议》</view>
				</view>
				<view class="right">
					>
				</view>
			</view>
			<view class="AgreementItem" @click="ToAgreement(2)" style="border-bottom: none;">
				<view class="left">
					<image :src="ImgUrl+'xzf/AgreementIcon2.png'" mode="aspectFit"></image>
					<view class="">《隐私权政策》</view>
				</view>
				<view class="right">
					>
				</view>
			</view>
			<view class="AgreementItem" @click="ToAgreement(3)">
				<view class="left">
					<image :src="ImgUrl+'xzf/AgreementIcon3.png'" mode="aspectFit"></image>
					<view class="">《未成年人个人信息保护规则》</view>
				</view>
				<view class="right">
					>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "UserAgreement",
		data() {
			return {
				externalInfo: {
					seesionID: '',
					userID: '',
					AppID: ''
				},
				ImgUrl: this.$ImgUrl
			}
		},
		onLoad: function(options) {
			console.warn(options);
			this.externalInfo = options
		},
		methods: {
			// 跳转协议
			async ToAgreement(type) {
				try {
					uni.navigateTo({
						url: "../pdfPreview/pdfPreview?pdfName=" + this.externalInfo.AppID + '_' + type
					})
				} catch (e) {
					//TODO handle the exception
				}
			}
		}
	}
</script>

<style lang="scss">
	.AgreementIcon {
		text-align: center;

		image {
			width: 265rpx;
			height: 147rpx;
			position: relative;
		}
	}


	.UserAgreement {
		padding-top: 111rpx;
		// margin-left: 150rpx;


		.AgreementList {
			width: 638rpx;
			height: 144rpx;
			margin: 0 auto;

			margin-top: 88rpx;
		}

		.AgreementItem {
			height: 144rpx;
			width: 100%;
			border-top: 1rpx solid #DDDDDD;
			border-bottom: 1rpx solid #DDDDDD;
			display: flex;
			align-items: center;
			justify-content: space-between;


			image {
				width: 70rpx;
				height: 70rpx;
				position: relative;
			}

			.left {
				display: flex;
				align-items: center;
			}

			.right {
				padding-right: 24rpx;
			}
			
			
			font-size: 28rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 800;
			color: rgba(0, 0, 0, 0.85);
			line-height: 40rpx;

			// font-family: PingFang SC;
			// font-size: 35rpx;
			letter-spacing: 1rpx;
			// font-weight: 600;
			// color: #34C98E;
			// line-height: 100rpx;
		}
	}
</style>
