<template>
	<view class="content">
		<app-header @back="back">扫码登记</app-header>
		<view class="main">
		<view class="icon"></view>
		<view class="text">登记成功</view>
		<view class="backIndex" @click="goHome">返回首页</view>
		</view>
	</view>
</template>

<script>
	import { HOME_INDEX, CAR_INDEX, MONITOR_INDEX, LIVE_INDEX } from '@/config/constants'
	import appHeader from '@/pages/components/header/header.vue'
	export default {
		components: {appHeader},
		methods: {
 			goHome(){
				getApp().globalData.tabIndex = HOME_INDEX
				uni.redirectTo({
					url: '/pages/home/home'
				})
			},
			back() {
				getApp().globalData.tabIndex = CAR_INDEX
				uni.redirectTo({
					url: '/pages/carManager/carManager'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.main {
		background-color: #f0f1f2;
		height: 100vh;
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		align-items: center;
		.icon {
			margin-top: 100px;
			background: url('~@/static/success.png') no-repeat;
			background-size: 100% 100%;
			width: calc(464px * 0.6);
			height: calc(368px * 0.6);
			
		}
		.text {
			width: 100%;
			font-size: 25px;
			text-align: center;
		}
		.backIndex {
			border-radius: 50px 50px;
			background-color: #344ec3;
			margin-top: 30px;
			width: 70%;
			height: 50px;
			display: flex;
			justify-content: center;
			align-items: center;
			font-size: 20px;
			color: white;
		}
	}
	
</style>