<template>
	<view class="top-hint">
		<view class="txt">
			<image :src="`${$imgUrl}common/icon-tips.png`" mode="aspectFill" class="imgs"></image>
			<view>
				<text>使用场景：</text>
				<view class="grey-txt">卡签一年内即将到期，延长卡签使用时间</view>
			</view>
		</view>
		
	</view>
	
	<view class="have-gradient" style="margin-top: -20rpx;">
		<view class="have-gradient-inside">
			<view class="title">需要准备事项</view>
			<view class="need-info">
				<view class="need-info-item">
					<image class="etc-image" :src="`${$imgUrl}issuance/cardPicture.png`" mode="heightFix"></image>
					<view class="tips-text">ETC卡（卡续期、卡签续期时必用）</view>
				</view>
				<view class="need-info-item">
					<image class="etc-image" :src="`${$imgUrl}issuance/obuPicture.png`" mode="heightFix"></image>
					<view class="tips-text">ETC设备（签续期、卡签续期时必用）</view>
				</view>
			</view>
		</view>
	</view>
	
	<view class="bg">
		<view class="title"> 办理流程 </view>
		<view class="dot_wrap">
			<view class="dot_wrap_left">
				<text class="dot"></text>
				<text class="line"></text>
				<text class="dot"></text>
				<text class="line"></text>
				<text class="dot"></text>
				<text class="line"></text>
				<text class="dot"></text>
			</view>
			<view class="dot_wrap_right">
				<view class="item">
					<image :src="`${$imgUrl}issuance/direction1.png`"></image>
					<view class="destion">
						<view class="destion1">选择待续期车辆</view>
					</view>
				</view>
				<view class="item">
					<image :src="`${$imgUrl}issuance/direction2.png`"></image>
					<view class="destion">
						<view class="destion1">选择续期类型</view>
					</view>
				</view>
				<view class="item">
					<image :src="`${$imgUrl}issuance/direction2.png`"></image>
					<view class="destion">
						<view class="destion1">连接设备蓝牙或NFC</view>
					</view>
				</view>
				<view class="item" style="margin-bottom: 0;">
					<image :src="`${$imgUrl}issuance/direction3.png`"></image>
					<view class="destion">
						<view class="destion1">续期成功</view>
					</view>
				</view>
			</view>
		</view>
	</view>
	
	<FixedFooter>
		<button type="default" class="ui-btn" @click="renewal">
			卡签续约
		</button>
	</FixedFooter>
</template>

<script setup lang="ts">
	import FixedFooter from '@/components/common/FixedFooter.vue'
	import {
		ref,
		reactive
	} from "vue";
	
	import {
		onLoad
	} from "@dcloudio/uni-app";
	
	const state = reactive({
		vehicleId: ""
	});
	
	onLoad(({vehicleId}) => {
		if (vehicleId) {
			state.vehicleId = vehicleId
		}
	});
	
	const renewal = () => {
		// uni.navigateTo({
		// 	url: `/subpackage/after-sale/renewalContral/car-detail?vehicleId=${state.vehicleId}`
		// })
		
		uni.navigateTo({
			url: `/subpackage/after-sale/activation-once-again/select-car?type=4`
		})
	}
	
</script>

<style lang="scss" scoped>
	.renewal-contract-content{
		
	}
	
	.bg {
		background-color: white;
		margin: 0 30rpx;
		margin-top: 20rpx;
		border-radius: 10px;
		padding: 20rpx;
		overflow: hidden;
	
		.title {
			font-weight: 400;
			font-size: 30rpx;
			color: #01243A;
		}
	
		.dot_wrap {
			display: flex;
			margin: 30rpx 0;
	
			.dot_wrap_left {
				display: flex;
				flex-direction: column;
				align-items: center;
				margin-right: 20rpx;
				margin-top: 50rpx;
	
				.dot {
					width: 24rpx;
					height: 24rpx;
					background: #01243A;
					border-radius: 50%;
				}
	
				.line {
					height: 126rpx;
					background-color: transparent;
					border-left: 2rpx dashed #01243A;
				}
			}
	
			.dot_wrap_right {
				.item {
					background: #F7F7F7;
					border-radius: 12rpx;
					height: 120rpx;
					display: flex;
					padding: 10rpx 20rpx;
					box-sizing: border-box;
					width: 600rpx;
					margin-bottom: 30rpx;
					align-items: center;
					.destion {
						margin: 0 60rpx 0 20rpx;
						font-weight: 400;
	
						.destion1 {
							font-size: 28rpx;
							color: #01243A;
						}
	
						.destion2 {
							font-size: 22rpx;
							color: #999999;
							line-height: 50rpx;
						}
					}
	
					image {
						width: 46rpx;
						height: 47rpx;
					}
				}
			}
		}
	
		.des {
			font-weight: 400;
			font-size: 28rpx;
			color: #01243A;
			line-height: 56rpx;
			margin-top: 10rpx;
			text-indent: 1rem;
		}
	
		.cailiao {
			width: 100%;
			display: flex;
			flex-wrap: wrap;
			justify-content: space-between;
	
			.list {
				width: 48%;
				margin-top: 30rpx;
	
				view {
					text-align: center;
					margin-bottom: 15rpx;
					font-size: 28rpx;
					color: #01243A;
				}
	
				.icon {
					width: 100%;
					height: 190rpx;
					background-image: var(--bgimg);
					background-size: 100% 100%;
					background-repeat: no-repeat;
				}
			}
		}
	}
	
	.action {
		position: absolute;
		left: 0;
		height: 270rpx;
		background-color: #fff;
		border-radius: 30rpx 30rpx 0 0;
		width: 100vw;
		display: flex;
		align-items: center;
		justify-content: space-evenly;
		flex-direction: column;
		margin-top: 20rpx;
	}
	.need-info{
		display: flex;
		align-items: center;
		justify-content: space-between;
		.need-info-item{
			width: 48%;
			margin-top: 24rpx;
			display: flex;
			flex-direction: column;
			align-items: center;
			.tips-text{
				text-align: center;
				margin-top: 12rpx;
				margin-bottom: 15rpx;
				font-size: 28rpx;
				color: #01243A;
			}
			.etc-image{
				height: 190rpx;
			}
		}
	}
</style>