<template>
	<view>
		<u-navbar title="临时车辆" :is-back="false"></u-navbar>
		<view class="main">
			<!-- <view class="park-name" v-if="detail.parkName">
				<img src="@/assets/static/img/if-location-pin@2x.png" alt="">
				<text>{{detail.parkName}}</text>
			</view> -->
			<view class="unlabeled">
				临时车
			</view>
			<view class="bus-number">
				{{detail.carNum}}
			</view>
		</view>
	</view>
</template>

<script>
	import * as API from '@/apis/parking.js'

	export default {
		data() {
			return {
				companyId: '',
				detail: {},
				message: '',
			}
		},
		onLoad(op) {
			if (op.id) {
				this.companyId = op.id
				this.getInfo()
			} else {
				uni.showModal({
					content: "参数错误"
				})
			}
		},
		methods: {
			getInfo() {
				uni.showLoading({
					title: "加载中",
					mask: true,
				})
				API.getTemporaryCarNum({
					openId: this.carhelp.getOpenId(),
					companyId: this.companyId
				}).then((res) => {

					uni.hideLoading();

					this.detail = res.data;
					
				}).catch(error => {
					uni.hideLoading()
					this.message = error
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.main {

		padding: 20px 0px 28px 23px;
		background: linear-gradient(#1F55FF, #27ABFF);

		.park-name {
		 line-height: 20px;
			color: rgba(255, 255, 255, 100);
			font-size: 20px;
			position: relative;

			text {
				margin-left: 25px;
			}

			img {
				width: 20px;
				height: 20px;
				margin-right: 8px;
				position: absolute;

			}
		}

		.unlabeled {
			line-height: 36px;
			color: rgba(255, 255, 255, 100);
			font-size: 36px;
			margin-top: 28px;
		}

		.bus-number {
			line-height: 48px;
			color: rgba(255, 255, 255, 100);
			font-size: 48px;
			margin-top: 20px;
		}
	}

	.u-btn {
		width: 89.3%;
		background-color: #005AD9;
		color: #ffffff;
		border-radius: 12px;
		margin-top: 20px;
	}

	.notice {
		padding: 20px 23px;

		.title {
			font-size: 16px;
			color: #101010;
		}

		p {
			color: #666666;
			margin-top: 8px;
		}
	}
</style>
