<template>
	<Container logoutBtn>
		<template #main>
			<view class="home-page">
				<!-- 左侧四大功能按钮 -->
				<view class="btn-group">
					<view class="btn-item blue" @click="goTheme"> </view>
					<view class="btn-item green" @click="goDept"> </view>
					<view class="btn-item orange" @click="goHistory"> </view>
					<view class="btn-item red" @click="goBusiness"> </view>
				</view>

				<!-- 右侧热门推荐 -->
				<view class="hot-recommend">
					<view class="recommend-title">热门推荐</view>
					<view class="recommend-list">
						<view class="recommend-item" v-for="(item, index) in recommendList" :key="index">
							<text class="dot">◆</text>
							<text class="text">{{ item }}</text>
						</view>
					</view>
				</view>
			</view>
		</template>
	</Container>
</template>

<script>
	import Container from '@/components/container/container.vue'

	export default {
		components: {
			Container
		},
		data() {
			return {
				recommendList: [
					'公有住房、全额集资建房退房',
					'职务(职称)晋升后住房面积未达标户住房补贴业务',
					'公有住房、全额集资建房退房',
					'公有住房、全额集资建房退房',
					'公有住房、全额集资建房退房',
					'职务(职称)晋升后住房面积未达标户住房补贴业务'
				]
			}
		},
		methods: {
			// 主题取号
			goTheme() {
				uni.navigateTo({
					url: '/pages/home/theme'
				})
			},
			// 部门取号
			goDept() {
				uni.navigateTo({
					url: '/pages/home/dept'
				})
			},
			// 历史取号
			goHistory() {
				uni.navigateTo({
					url: `/pages/home/businessList`
				})
			},
			// 业务取号
			goBusiness() {
				uni.navigateTo({
					url: `/pages/home/businessList`
				})
			}
		}
	}
</script>

<style scoped>
	* {
		box-sizing: border-box;
	}

	.home-page {
		width: 100%;
		height: 100%;
		display: flex;
		align-items: center;
		justify-content: space-around;
		padding: 0 5%;
		box-sizing: border-box;
	}

	/* 左侧按钮组 */
	.btn-group {
		/* width: 60%; */
		/* height: 85%; */
		display: flex;
		flex-wrap: wrap;
		/* justify-content: space-between; */
		align-content: space-around;
	}

	.btn-item {
		width: 500px;
		height: 340px;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.btn-item.blue {
		margin-right: 60px;
		margin-bottom: 60px;
		background: url('../../static/images/ticket/theme_bg.png');
		background-size: 100% 100%;
	}

	.btn-item.green {
		background: url('../../static/images/ticket/dept_bg.png');
		background-size: 100% 100%;
	}

	.btn-item.orange {
		margin-right: 60px;
		background: url('../../static/images/ticket/history_bg.png');
		background-size: 100% 100%;
	}

	.btn-item.red {
		background: url('../../static/images/ticket/business_bg.png');
		background-size: 100% 100%;
	}



	/* 右侧热门推荐 */
	.hot-recommend {
		width: 55%;
		height: 740px;
		background: #fff;
		border-radius: 20px;
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
		padding: 40px 40px 16px;
		box-sizing: border-box;
	}

	.recommend-title {
		font-size: 40px;
		font-weight: bold;
		color: rgba(51, 51, 51, 1);
		text-align: center;
		margin-bottom: 30px;
	}

	.recommend-list {
		display: flex;
		flex-direction: column;
		justify-content: space-around;
		height: 85%;
	}

	.recommend-item {
		display: flex;
		align-items: flex-start;
		line-height: 1.5;
	}

	.dot {
		color: #4080ff;
		font-size: 30px;
		margin-right: 10px;
	}

	.text {
		font-size: 30px;
		color: rgba(51, 51, 51, 1);
	}
</style>