<template>
	<view>
			<!-- #ifdef MP-WEIXIN -->
			<view class="" v-if="list.length" style="margin-top: 10upx;">
				<!-- #endif -->
				<!-- #ifndef MP-WEIXIN -->
				<view class="" v-if="list.length" style="margin-top: 10upx;">
					<!-- #endif -->
					<view class="listbox" v-for="(item,index) in list" :key="index" @click="goDetail(item)">
						<view class="flex align-center justify-between">
							<view>
								<view class="text-xl text-bold" style="color: #000;">{{item.resumes.resumesName}}</view>
								<view class="flex align-center margin-top-xs flex-wrap" style="color: #999999;">
									<view>{{item.resumes.resumesAge}}岁</view>
									<view class="margin-lr-sm" style="width: 1rpx;height: 25rpx;background: #CCCCCC;">
									</view>
									<view>工作{{item.resumes.resumesWorkExperience}}</view>
									<view class="margin-lr-sm" style="width: 1rpx;height: 25rpx;background: #CCCCCC;">
									</view>
									<view>{{item.resumes.resumesEducation}}</view>
									<view class="margin-lr-sm" style="width: 1rpx;height: 25rpx;background: #CCCCCC;">
									</view>
									<view>{{item.resumes.resumesCompensation}}</view>
								</view>
							</view>
							<view>
								<image :src="item.resumes.avatar?item.resumes.avatar:'../../../static/logo.png'"
									style="width: 100upx;height: 100upx;border-radius: 55upx;">
								</image>
							</view>
						</view>
						<view class="margin-top" v-if="item.resumes.resumesCompanyList">
							<view class="flex align-center">
								<view class="margin-right-xs">
									<image src="../../../static/images/qi.png" style="width: 30upx;height: 32upx;">
									</image>
								</view>
								<view class="text-bold" style="color: #121212;">{{item.resumes.resumesCompanyList[0].resumesTitle}}</view>
							</view>
							<view class=" margin-left margin-top-xs padding-left-xs" style="color: #999999;font-size: 26upx;">
								{{item.resumes.resumesCompanyList[0].resumesPost}}</view>
						</view>
						<view class="margin-top-sm" v-if="item.resumes.resumesWorkList">
							<view class="flex align-center">
								<view class="margin-right-xs">
									<image src="../../../static/images/geren.png" style="width: 35upx;height:26upx;">
									</image>
								</view>
								<view class="text-bold" style="color: #121212;">{{item.resumes.school?item.resumes.school:'暂无'}}</view>
							</view>
							<view class=" margin-left margin-top-xs padding-left-xs" style="color: #999999;font-size: 26upx;">
								{{item.resumes.resumesPost}}</view>
						</view>
					</view>
				</view>
				<empty v-if="list.length == 0"></empty>
			</view>
</template>

<script>
	import empty from '@/components/empty.vue'
	export default {
		components: {
			empty
		},
		data() {
			return {
				page: 1,
				limit: 10,
				token: '',
				cont:'',
				list:[],
				postDetailsId:'',
			}
		},
		onLoad(option) {
			this.postDetailsId = option.postDetailsId
			//获取简历列表
			this.getorderList();
		},
		methods: {
			//简历详情
			goDetail(e) {
				uni.navigateTo({
					url: '/pages/index/game/orderDet?resumesId=' + e.resumesId
				});
			},
			//简历列表
			getorderList() {
				let data = {
					page: this.page,
					limit: this.limit,
					classify:2,
					status:2,
					postDetailsId:this.postDetailsId
				}
				this.$Request.get("/app/postPush/selectResumesPushLists", data).then(res => {
					if (res.code == 0) {
						this.cont = res.data.totalPage
						if (this.page == 1) {
							this.list = res.data.list
						} else {
							this.list = [...this.list, ...res.data.list]
						}
					}
					uni.stopPullDownRefresh();
				})
			}
		},
		onReachBottom: function() {
			if(this.page == this.cont){
				uni.showToast({
					title:'已经到底了',
					icon:'none'
				})
				
			}else{
				this.page += 1;
				this.getorderList();
			}
		},
		onPullDownRefresh: function() {
			this.page = 1;
			this.getorderList();
		},
	}
</script>

<style>
	page {
		background-color: #F5F5F5;
	}

	.bg {
		background: #ffffff;
	}
	/deep/.navs {
		background: #FFFFFF !important;
	}

	.listbox {
		background: #FFFFFF;
		border-radius: 24upx;
		margin: 20upx 30upx;
		padding: 30upx;
	}

	.argrtn {
		background: #F6F6F6;
		color: #666666;
		font-size: 24upx;
		border-radius: 8upx;
		padding: 5upx 20upx;
		margin-right: 20upx;
	}
</style>
