<template>
	<view class="flex">
		<image :src="image" mode="widthFix" style="width: 450rpx;margin-top: 103rpx"></image>
		<view class="flex_title">
			系统升级中...
		</view>
		<view class="flex_name">
			我们正在对平台进行升级，升级期间暂无法访问，带来不便，敬请谅解。 预计
			<text style="font-weight: bold;">{{ format(end_time * 1000) }}</text>恢复正常使用。</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				image: 'https://api.admin.jiuweiyun.cn/uploads/images/rule/202205/06/rule_1651834063_mAcayDv42f.png',
				end_time: ''
			}
		},
		onLoad(option){
			this.end_time = option.end_time
		},
		methods: {
			add(m){
				return m<10?'0'+ m:m
			},
			format(end_time){
				var time = new Date(end_time);
				var y = time.getFullYear();
				var m = time.getMonth()+1;
				var d = time.getDate();
				var h = time.getHours();
				var mm = time.getMinutes();
				if (mm > 0) {h+=1}
				return m +'月'+ d +'日'+ h + '点'
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #fff;
	}
	.flex {
		display: flex;
		flex-direction: column;
		align-items: center;
		padding: 0 34rpx;
		&_title {
			font-size: 56rpx;
			font-weight: bold;
			color: #FB231F;
			margin: 76rpx 0 24rpx 0;
		}
		&_name {
			font-size: 28rpx;
			color: #333333;
			line-height: 48rpx;
		}
	}
</style>
