<style lang='scss' scoped>
.about{
	width: 100%;
	height: 100%;
	background-color: #F9F9F9;
	&-header{
		/* background-color: #fff; */
		text-align: center;
		/* height: 400rpx; */
		&-logo{
			width: 200rpx;
			height: 200rpx;
			margin: 60rpx 0 30rpx 0;
		}
	}
	&-nav-list{
		padding: $paddingTB $paddingLR;
	}
	&-nav-box{
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding-bottom: 20rpx;
		border-bottom: 1px solid #ccc;
		&:last-child{
			border-bottom: none;
		}
		&-icon{
			width: 50rpx;
			height: 50rpx;
			display: flex;
			justify-content: center;
			align-items: center;
			background-color: #5FB6FF;
			border-radius: 50%;
		}
		&-name{
			display: flex;
			align-items: center;
		}
	}
}
</style>
<template>
	<view class="about">
		<view class="about-header">
			<!-- #ifdef APP-PLUS -->
			<image class="about-header-logo" :src="appConfig.logo" mode=""></image>
			<!-- #endif -->
			<!-- #ifndef APP-PLUS -->
			<image class="about-header-logo" :src="appConfig.logo" mode=""></image>
			<!-- #endif -->
			<view class="pb20">{{appConfig.name}}</view>
			<view class="pb30">{{version?'V ' + version:''}}</view>
		</view>
		<view class="about-nav-list">
			<view class="about-nav-box" @click="goUserPolicyFn">
				<view class="about-nav-box-name">
					<view class="about-nav-box-icon">
						<tuiIcon name="xieyi" color="#fff"></tuiIcon>
					</view>
					<view class="pl20">用户协议</view>
				</view>
				<u-icon name="arrow-right" color="#BFBFBF"></u-icon>
			</view>
			<view class="about-nav-box pt20" @click="goPrivacyPolicyFn">
				<view class="about-nav-box-name">
					<view class="about-nav-box-icon">
						<tuiIcon name="yinsi" color="#fff"></tuiIcon>
					</view>
					<view class="pl20">隐私政策</view>
				</view>
				<u-icon name="arrow-right" color="#BFBFBF"></u-icon>
			</view>
			<view class="about-nav-box pt20">
				<view class="about-nav-box-name">
					<view class="about-nav-box-icon">
						<tuiIcon name="banben" color="#fff"></tuiIcon>
					</view>
					<view class="pl20">检查新版本</view>
				</view>
				<u-icon name="arrow-right" color="#BFBFBF"></u-icon>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				version:''
			}
		},
		computed:{
			appConfig() {
				return this.$store.state.app.appConfig
			},
		},
		onLoad() {
			// #ifdef MP-WEIXIN
			const accountInfo = wx.getAccountInfoSync();
			if(accountInfo.miniProgram.envVersion=='release'){
				this.version = accountInfo.miniProgram.version;
			}
			console.log(accountInfo.miniProgram.version) // 插件版本号， 'a.b.c' 这样的形式
			// #endif
		},
		methods: {
			goPrivacyPolicyFn(){
				uni.navigateTo({
					url:"./privacyPolicy"
				})
			},
			goUserPolicyFn(){
				uni.navigateTo({
					url:"./userPolicy"
				})
			}
		}
	}
</script>
