<template>
	<view style="background: #03803B;height: 100vh;">
		<view style="display: flex;justify-content: center;padding-top: 180rpx;">
			<image src="/static/images/me/setting (2).png" style="width:360rpx;height: 286rpx;" mode="scaleToFill">
			</image>
		</view>
		<view style="margin-top: 200rpx;">
			<view style="text-align: center;">
				<image src="/static/images/me/setting (1).png" style="width:518rpx;height: 144rpx;" mode="scaleToFill">
				</image>
				<view style="color: #fff;font-size: 26rpx;margin-top: 55rpx;" @click="getAppUpdate">version：{{versionNumber}}</view>
			</view>
		</view>
		<!-- 更新组件 force 是否强制更新    tabbar：页面是否有原生tabbar组件-->
		<app-update ref="app_update" :force="false" :manual="true"></app-update>
	</view>
</template>

<script>
	import appUpdate from "@/components/yzhua006-update/app-update.vue"
	export default {
		components: {
			appUpdate
		},
		data() {
			return {
				name: '获取失败',
				versionNumber: '获取失败'
			}
		},
		created() {
			const systemInfo = uni.getSystemInfoSync();
			this.versionNumber = systemInfo.appVersion ? systemInfo.appVersion : '获取失败'
		},
		methods: {
			logOut() {
				uni.removeStorageSync('accessToken')
				uni.removeStorageSync('userInfo')
				uni.reLaunch({
					url: '/pages/login/index'
				});
			},
			getAppUpdate() {
				console.log(this.$refs.app_update.update())
				this.$refs.app_update.update()
			}
		}
	}
</script>

<style lang="scss" scoped>
	.head {
		padding-top: var(--status-bar-height);
	}

	.head ::v-deep.u-navbar-inner {
		z-index: -99999;
	}
</style>