<template>
	<view>
		<view class="content">

			<u-icon name="checkmark-circle" size="90" color="#EF9525"></u-icon>
			<view class="h3">您已经预约成功</view>
			<view class="p">即将跳转到{{tips}}</view>
		</view>
		<view class="pinkBtn" @click="goHome">返回首页</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tips: "参观预约"
			}
		},
		onLoad(options) {
			if (options.from && options.id) {
				var url = "";
				if (options.from == "visit") {
					this.tips = "参观预约";
					url = "/pages/order/visitorderinfo?id=" + options.id
				} else if (options.from == "activity") {
					this.tips = "活动预约";
					url = "/pages/order/activityorderinfo?id=" + options.id
				} else if (options.from == "park") {
					this.tips = "车位预约";
					url = "/pages/order/parkorderinfo?id=" + options.id
				} else if (options.from == "feed") {
					this.tips = "首页";
					url = ""
				}


				if (url == "") {
					this.goHome();
				} else {
					setTimeout(function() {
						uni.navigateTo({
							url: url
						})
					}, 5000)
				}
			}

		},
		methods: {
			goHome() {
				uni.switchTab({
					url: "/pages/index/index"
				})
			}
		}
	}
</script>


<style lang="scss" scoped>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		padding-top: 90px;
	}

	.successBox {

		.iconfont {
			color: #00CCB9;
			font-size: 180rpx;
		}

		.h3 {
			font-size: 40rpx;
			font-weight: 500;
			color: #333333;
			margin-top: 40rpx;
		}

		.p {
			font-size: 28rpx;
			font-weight: 400;
			color: #333333;
			margin-top: 24rpx;
		}

	}

	.pinkBtn {
		width: 670rpx;
		height: 88rpx;
		background-image: linear-gradient(45deg, #EF9525 0%, #EF9525 100%);
		border-radius: 44rpx;
		font-size: 36rpx;
		font-weight: 500;
		color: #FFFFFF;
		text-align: center;
		line-height: 88rpx;
		margin: 80rpx auto;
	}
</style>
