societyHome.vue 3.5 KB
<template>
	<view class="company_container">
		<up-navbar placeholder :leftIconSize="0" bgColor="transparent" />
		<view class="work_box">
			<view class="work_list">
				<carCard v-for="carItem in carList" :key="carItem.carId" tipContent="待办" :carInfo="carItem">
					<template #header>
						<navTop :carNum="carItem.carNum" />
					</template>
					<template #center>
						<wordInfo :carType="carItem.carType" :userName="carItem.name" :applyTime="carItem.createTime" />
					</template>
					<template #footer>
						<operateList />
					</template>
				</carCard>
			</view>
		</view>
		
		<!-- 底部导航栏 -->
		<up-tabbar
			:value="useTabbar.societyCurrent"
			activeColor="#3680FE"
			inactiveColor="#707070"
		>
			<up-tabbar-item text="主页" icon="home" badge="11"></up-tabbar-item>
			<up-tabbar-item text="我的" icon="account" @click="goRouter">
				<template #active-icon>
					<image style="width: 48rpx;" class="u-page__item__slot-icon" src="@/static/tabbarIcon/my-active.png" mode="widthFix"></image>
				</template>
				<template #inactive-icon>
					<image style="width: 48rpx;" class="u-page__item__slot-icon" src="@/static/tabbarIcon/my.png" mode="widthFix"></image>
				</template>
			</up-tabbar-item>
		</up-tabbar>
		
	</view>
</template>

<script setup>
	import { ref } from 'vue';
	import carCard from '@/components/carCard.vue';
	import navTop from '@/components/navTop.vue';
	import wordInfo from '@/components/wordInfo.vue';
	import operateList from '@/components/operateList.vue';
	import useTabbarStore from '@/store/modules/tabbar.js'
	const useTabbar = useTabbarStore()
	const carList = ref([
		{ carId: 1, carNum: '桂A·66666', carType: '奔驰C级', name: '张三', createTime: '2024-09-08 10:12' },
		{ carId: 2, carNum: '桂A·77777', carType: '奔驰C级', name: '李四', createTime: '2024-09-08 10:12' },
		{ carId: 3, carNum: '桂A·77777', carType: '梅赛德斯奔驰', name: '王五', createTime: '2024-09-08 10:12' },
		{ carId: 4, carNum: '桂A·77777', carType: '梅赛德斯奔驰', name: '王五', createTime: '2024-09-08 10:12' },
		{ carId: 5, carNum: '桂A·77777', carType: '梅赛德斯奔驰', name: '王五', createTime: '2024-09-08 10:12' },
		{ carId: 6, carNum: '桂A·77777', carType: '梅赛德斯奔驰', name: '王五', createTime: '2024-09-08 10:12' },
		{ carId: 7, carNum: '桂A·77777', carType: '梅赛德斯奔驰', name: '王五', createTime: '2024-09-08 10:12' },
		{ carId: 8, carNum: '桂A·77777', carType: '梅赛德斯奔驰', name: '王五', createTime: '2024-09-08 10:12' },
		{ carId: 9, carNum: '桂A·77777', carType: '梅赛德斯奔驰', name: '王五', createTime: '2024-09-08 10:12' },
		{ carId: 10, carNum: '桂A·77777', carType: '梅赛德斯奔驰', name: '王五', createTime: '2024-09-08 10:12' },
		{ carId: 11, carNum: '桂A·77777', carType: '梅赛德斯奔驰', name: '王五', createTime: '2024-09-08 10:12' },
	])
	const titleStyle = {
		fontSize: '36rpx',
		color: '#fff',
		fontWeight: 500
	}
	const goRouter = (index) => {
		useTabbar.societyCurrent = index
		uni.redirectTo({
			url: '/pages/societyMy/societyMy'
		})
	}
</script>

<style lang="scss" scoped>
.company_container{
	width: 100%;
	height: 100vh;
	background: url('http://bxhd.crgx.net/profile/avatar/2024/09/25/bg-index_20240925113012A004.png') no-repeat;
	background-size: 100% 100%;
	overflow: hidden;
	.work_box{
		padding: 20rpx 30rpx 250rpx;
		height: calc(100vh - 88rpx);
		background-color: #F8F9FF;
		overflow-y: scroll;
		.work_list{
			display: flex;
			flex-direction: column;
			gap: 20rpx;
		}
	}
}
</style>