index.vue 3.3 KB
<template>
	<view class="app-container">
		<up-navbar placeholder :leftIconSize="0" bgColor="transparent" />
		<view class="car_list">
			<view class="title">车辆管理</view>
			<carCard v-for="carItem in carList" :key="carItem.carId" :carInfo="carItem">
				<template #header>
					<navTop :carNum="carItem.carNum" />
				</template>
				<template #center>
					<centerLine :leftContent="carItem.carBrand" fontColor="#999" :rightContent="carItem.address"></centerLine>
				</template>
				<template #footer>
					<centerLine></centerLine>
				</template>
			</carCard>
			<view class="addBtn" @click="addCarInfo">登记车辆保险信息</view>
		</view>
		
		<up-popup :show="showNotice" mode="center" :safeAreaInsetBottom="false" round="20" @close="showNotice = false">
			<view class="notice">
				<view class="notice_title">通知公告</view>
				<view class="notice_content">
					1.我是公告我是公告我是公告我是公告我是公告我是公告我是公告我是公告我是公告
					2.我是公告我是公告我是公告我是公告我是公告我是公告我是公告我是公告我是公告我是公告我是公告我是公告我是公告
					3.我是公告我是公告我是公告我是公告
				</view>
				<view class="btn" @click="showNotice = false">确认</view>
			</view>
		</up-popup>
	</view>
</template>

<script setup>
import { ref } from 'vue'
import carCard from '@/components/carCard.vue';
import centerLine from '@/components/centerLine.vue';
import navTop from '@/components/navTop.vue';
const showNotice = ref(true)
const carList = ref([
	{ carId: 1, carNum: '桂A·66666', carBrand: '梅赛德斯奔驰', address: '广西壮族自治区 南宁市 兴宁区投保', status: 0 },
	{ carId: 2, carNum: '桂A·77777', carBrand: '梅赛德斯奔驰', address: '广西壮族自治区 南宁市 兴宁区投保', status: 1 },
	{ carId: 3, carNum: '桂A·77777', carBrand: '梅赛德斯奔驰', address: '广西壮族自治区 南宁市 兴宁区投保', status: 2 }
])
const addCarInfo = () => {
	uni.navigateTo({
		url: '/pages/carDetail/carDetail'
	})
}
</script>

<style lang="scss" scoped>
.app-container{
	width: 100%;
	height: 100vh;
	padding: 0 30rpx;
	background: url('http://bxhd.crgx.net/profile/avatar/2024/09/25/bg-index_20240925113012A004.png') no-repeat;
	background-size: 100% 100%;
	overflow: hidden;
	.car_list{
		display: flex;
		flex-direction: column;
		gap: 20rpx;
		.title{
			font-size: 32rpx;
			line-height: 42rpx;
			color: #fff;
		}
		.addBtn{
			width: 100%;
			height: 80rpx;
			line-height: 80rpx;
			text-align: center;
			font-size: 28rpx;
			color: #3d3d3d;
			font-weight: 500;
			background: #FFFFFF;
			box-shadow: 0rpx 8rpx 40rpx 0rpx rgba(10,22,44,0.06);
			border-radius: 20rpx;
		}
	}
}
.notice{
	position: relative;
	width: 690rpx;
	height: 600rpx;
	background: #FFFFFF;
	padding: 40rpx 30rpx 0;
	border-radius: 20rpx;
	overflow: hidden;
	.notice_title{
		text-align: center;
		font-size: 36rpx;
		line-height: 48rpx;
		color: #3D3D3D;
		margin-bottom: 40rpx;
	}
	.notice_content{
		font-size: 28rpx;
		line-height: 38rpx;
		color: #999;
	}
	.btn{
		position: absolute;
		bottom: 0;
		left: 0;
		width: 100%;
		line-height: 100rpx;
		text-align: center;
		height: 100rpx;
		color: #3680FE;
		font-size: 28rpx;
		border-top: 2rpx solid #eee;
	}
}
</style>