<template>
	<view class="index-search">
		<view class="search-header">
			<u-search placeholder="请输入" v-model="keyword1" :show-action="false" @search="tosearch(1)"></u-search>
			<view class="navbar-down">
				<view class="scroll-down u-flex u-row-between">
					<view class="u-flex down-left">
						<text class="text1" :class="{textactive:paixu == 1}" @click="changepaixu(1)">按职位</text>
						<text class="text1" :class="{textactive:paixu == 2}" @click="changepaixu(2)">搜公司</text>
					</view>
					<view class="u-flex down-right">
						<view @click="opencity = true" class="u-flex right-item u-row-center">
							<text class="text">{{city.name || '全国'}}</text>
							<u-icon name="arrow-down-fill" size="20"></u-icon>
						</view>
						<view @click="$refs.shaixuan.openshaixuan = true" class="u-flex right-item u-row-center">
							<text class="text">筛选</text>
							<u-icon name="arrow-down-fill" size="20"></u-icon>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view style="height: 70vh;display: flex;justify-content: center;align-items: center;" v-if="list.length == 0">
			<u-empty text="暂无数据" mode="list"></u-empty>
		</view>
	</view>
</template>

<script>
	import {getList,getareacity} from "@/units/inquire.js"
	export default {
		data() {
			return {
				
			}
		},
		onLoad() {
			
		},
		onReachBottom() {
			if (this.total != this.list.length) {
				this.page++
				this.getlist()
			}
		},
		methods: {

		}
	}
</script>

<style lang="scss">
	page {
		background-color: #F3F3F3;
	}

	.index-search {

		.change-city-popup {
			height: calc(100vh - 144rpx);

			.change-city-scroll {
				min-height: 1rpx;

				.change-scroll-right {
					height: 100%;

					.scroll-left-shi {
						line-height: 100rpx;
						text-align: center;
						font-size: 32rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #333333;
						padding: 0 32rpx;
					}

					.shiactive {
						color: #0C66C2;
					}
				}

				.change-scroll-left {
					width: 304rpx;
					height: 100%;
					background-color: #F5F5F5;

					.scroll-left-sheng {
						text-align: center;
						font-size: 32rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #333333;
						padding: 28rpx 32rpx;
					}

					.shengactive {
						background-color: #fff;
						color: #0C66C2;
					}
				}
			}

			.change-city-down {
				padding: 12rpx 32rpx;

				text:first-child {
					width: 208rpx;
					line-height: 84rpx;
					background: #F3F3F3;
					border-radius: 10rpx;
					text-align: center;
					font-size: 32rpx;
					font-family: PingFangSC-Medium, PingFang SC;
					font-weight: 500;
					color: #555555;
				}

				text:last-child {
					width: 454rpx;
					line-height: 84rpx;
					background: #0C66C2;
					border-radius: 10rpx;
					text-align: center;
					font-size: 32rpx;
					font-family: PingFangSC-Medium, PingFang SC;
					font-weight: 500;
					color: #FFFFFF;
				}
			}

			.change-city-header {
				height: 120rpx;
				padding: 0 32rpx;


				.text {
					font-size: 36rpx;
					font-family: PingFangSC-Medium, PingFang SC;
					font-weight: 500;
					color: #222222;
				}
			}
		}

		.index-item {
			width: 702rpx;
			background: #FFFFFF;
			border-radius: 20rpx;
			margin: 20rpx auto;
			padding: 0 20rpx 24rpx 20rpx;

			.item-down {
				text:first-child {
					font-size: 22rpx;
					font-family: SFPro-Regular, SFPro;
					font-weight: 400;
					color: #666666;
				}

				text:last-child {
					font-size: 22rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #666666;
				}
			}

			.item-gongsi {
				margin-bottom: 16rpx;

				.text2 {
					font-size: 24rpx;
					font-family: SFPro-Regular, SFPro;
					font-weight: 400;
					color: #666666;
				}

				.logo {
					width: 42rpx;
					height: 42rpx;
					border-radius: 10rpx;
					margin-right: 16rpx;
				}

				.text1 {
					max-width: 192rpx;
					font-size: 24rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #444444;
					margin-right: 12rpx;
				}
			}

			.item-label {
				margin-bottom: 20rpx;

				text {
					margin-right: 16rpx;
					line-height: 46rpx;
					background: #F7F7F7;
					border-radius: 4rpx;
					padding: 0 14rpx;
					font-size: 24rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #5F5F5F;
				}
			}

			.item-top {
				height: 88rpx;

				.text1 {
					font-size: 32rpx;
					font-family: PingFangSC-Medium, PingFang SC;
					font-weight: 500;
					color: #222222;
					margin-right: 16rpx;
				}

				.text2 {
					width: 50rpx;
					line-height: 32rpx;
					background: rgba(255, 83, 53, 0.1);
					border-radius: 4rpx;
					text-align: center;
					font-size: 20rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #FF5335;
					margin-right: 12rpx;
				}

				.text3 {
					width: 90rpx;
					line-height: 32rpx;
					background: #FFF2E8;
					border-radius: 4rpx;
					text-align: center;
					font-size: 20rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #FF8620;
					margin-right: 12rpx;
				}

				.text4 {
					line-height: 32rpx;
					background: #E6EFF8;
					border-radius: 4rpx;
					padding: 0 4rpx;
					text-align: center;
					font-size: 20rpx;
					font-family: SFPro-Regular, SFPro;
					font-weight: 400;
					color: #0C66C2;
				}

				.text5 {
					font-size: 32rpx;
					font-family: JDZhengHT-Regular, JDZhengHT;
					font-weight: 400;
					color: #0C66C2;
				}
			}
		}

		.search-header {
			position: sticky;
			top: 0;
			left: 0;
			z-index: 10;
			background-color: #fff;
			padding: 20rpx 24rpx;

			.navbar-down {
				padding-top: 20rpx;

				.scroll-down {


					.down-right {
						.right-item {
							// width: 100rpx;
							padding: 0 20rpx;
							height: 52rpx;
							background: #F3F3F3;
							border-radius: 4rpx;
							margin-left: 20rpx;

							.text {
								font-size: 26rpx;
								font-family: PingFangSC-Regular, PingFang SC;
								font-weight: 400;
								color: #666666;
								margin-right: 4rpx;
							}

							image {
								width: 16rpx;
								height: 16rpx;
							}
						}
					}

					.down-left {
						.text1 {
							font-size: 28rpx;
							font-family: PingFangSC-Regular, PingFang SC;
							font-weight: 400;
							color: #777;
							margin-right: 32rpx;
						}

						.textactive {
							color: #222222;
						}
					}
				}
			}
		}
	}
</style>