<template>
	<view class="content">
		<!-- #ifdef APP -->
		<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 10rpx;"></text>
		<!-- #endif -->
		
		<view class="header">
			<view class="header-box">
				<view class="header-box-img"  >
					<image :src="companyLogo" alt="logo" srcset="" class="iconBox" mode="widthFix"></image>
				</view>
			<view class="" style="text-align: center;">
				<p style="font-size: 22px;font-weight: 500;">{{appName}}APP</p>
				<p style="margin-top: 20rpx;">V1.0</p>
			</view>
			</view>
	<view class="hand"  @click="latestversion()">
		<text>版本更新</text>
			<view class="iconBox">
				<i class="iconfont icon-youjiantou"></i>
			</view>
	</view>
		</view>
	
		<view class="footer">
			<view class="" style="display: align-self: start;">
				
			</view>
			<view class="" style="display: align-self: end;">
				<span><text style="color: #2D56A7;" @click="getFile(1)">《服务协议》 | </text><text style="color: #2D56A7;" @click="getFile(2)">《隐私政策》</text></span>
				<p class="footer-text" style="margin: 10px 0;">客服电话：400-921-9290</p>
				<p class="footer-text">由{{companyFullName}}提供</p>
			</view>
		</view>
	</view>
</template>

<script>
	import {companyInfo} from "@/environments/environment";
	export default {
		data() {
			return {
				companyType : companyInfo.companyType,
				companyFullName : companyInfo.companyFullName,
				appName : companyInfo.appName,
				companyLogo : '../../../static/logo2.png'
			}
		},
		created() {
			
		},
		destroyed() {
			uni.hideToast();
		},
		onLoad(option) {
			if(this.companyType == '1'){
				this.companyLogo='../../../static/myteam/Group1633.png';
			}else if(this.companyType == '2'){
				this.companyLogo='../../../static/logo2.png'
			}
		},
		onShow() {
			if(this.companyType == '1'){
				this.companyLogo='../../../static/myteam/Group1633.png';
			}else if(this.companyType == '2'){
				this.companyLogo='../../../static/logo2.png'
			}
		},
		methods:{
			goBack() {
				uni.navigateBack({
					delta: 1  
				});
			},
			getFile(type){
				uni.navigateTo({
					url:`/myPackageA/ruleAndContract/clause?type=${type}`
				})
			},
			latestversion(){
				uni.showToast({
					title: '已是最新版本,无需更新!',
					duration: 2000,
					icon: 'none'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content{
		
		width: 100%;
		height: 100%;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}
	.header{
		flex: 1;
	}
	.footer-text{
		font-size: 12px;
		color: #999999;
	}
	.hand{
		display: flex;
		justify-content: space-between;
		padding: 30rpx 0;
		margin: 46rpx 50rpx;
		border-top: 2rpx solid #E6E6E6;
		border-bottom: 2rpx solid #E6E6E6;
	}
	.footer{
		text-align: center;
		padding: 50rpx;
	}
		.header-box-img{
			width: 124rpx;
			height: 124rpx;
			margin: 90rpx auto  45rpx auto;
			background-size: auto 100%;
		}
</style>