<template>
	<view class="page-container uni-column">
		<view class="title uni-row">咨询</view>
	</view>
</template>

<script setup>
	import { ref } from 'vue'
	import { onLoad, onReady, onUnload, onShow } from '@dcloudio/uni-app'
	
	const keywords = ref('')
	const optionList = ref([])
	// 检查指导书
	const optionList1 = ref([])
	// 分选标准
	const optionList2 = ref([])
	
	// 页面生命周期函数
	onLoad(() => {
		optionList1.value = [
			{
				title: '001 台阶径',
				standard: '角偏 < 0.05'
			},
			{
				title: '002 台阶径',
				standard: '角偏 < 0.04'
			}
		]
		
		optionList2.value = [
			{
				title: '划痕',
				standard: '划痕描述'
			},
			{
				title: '划伤',
				standard: '划伤描述'
			}
		]
		
		optionList.value = optionList1.value
	})
	
	// tabbar切换
	const handleTabBarClick = (val) => {
		switch (val) {
			case 1:
				optionList.value = optionList1.value
				break
			case 2:
				optionList.value = optionList2.value
		}
		currentTabName.value = val
	}
	
	const handleOptionChecked = (data) => {
		uni.$emit('addUnfitInfoEvent', {
			title: data.title,
			standard: data.standard
		})
		uni.navigateBack()
	}
</script>

<style lang="scss">
	.page-container {
		height: 100%;
		background-color: #ececec;
		font-size: 28rpx;
		padding: 24rpx;
		box-sizing: border-box;
	}
	.option-container {
		background-color: #ffffff;
		padding: 24rpx;
		border-radius: 12rpx;
	}
	.tab-bars {
		height: 56rpx;
		
		> view {
			flex: 1;
			text-align: center;
			
			.line {
				width: 50%;
				height: 2px;
				margin:8rpx auto 0 auto;
				background-color: #FFFFFF;
			}
			&.active {
				.line {
					background-color: #1684FC;
				}
			}
		}
	}
	.search-container {
		margin-top: 16rpx;
		align-items: center;
		
		input {
			flex: 1;
			height: 72rpx;
			border: 1px solid #bbbbbb;
			padding: 0 8rpx;
			box-sizing: border-box;
		}
		.btn {
			display: flex;
			flex-direction: row;
			width: 112rpx;
			height: 72rpx;
			align-items: center;
			justify-content: center;
			background-color: #1684FC;
			color: #ffffff;
		}
	}
	.option-item {
		position: relative;
		margin-top: 24rpx;
		padding-bottom: 8rpx;
		border-bottom: 1px solid #BBBBBB;
		
		.uni-row {
			padding-bottom: 16rpx;
			
			.label {
				width: 144rpx;
			}
			.value {
				flex: 1;
			}
		}
		.uni-row:first-child {
			font-size: 32rpx;
			font-weight: 700;
		}
		
		.arrow-right {
			position: absolute;
			top: 24rpx;
			right: 24rpx;
		}
	}
</style>