<template>
	<view class="deliverLog">
		<view class="list">
			<view class="list-item" v-for="item in list" @click="toDetail(item)">
				<view class="list-title f_b">
					<view class="f_s">
						{{ item.name }}
					</view>
					<view class="money">{{item.salaryMin}}~{{item.salaryMax}}</view>
				</view>
				<view class="f_s">
					<view class="tag">{{item.recruitType}}</view>
					<view class="tag">{{ item.qualification }}</view>
					<view class="tag">{{ item.experience }}</view>
				</view>
				<view class="company f_s">
					<u--image
					    :src="item.org.logo"
					    width="80rpx"
					    height="80rpx"
						radius="4"
					/>
					<text style="padding: 0 10px;font-weight: 300;font-size: 28rpx;">{{ item.orgName }}</text>
				</view>
				<view class="f_b occupational">
					<view>{{item.industryName}}</view>
					<view>{{item.org.city != '市辖区' ? item.org.city : item.org.province}}</view>
				</view>
			</view>
			<u-loadmore 
				:status="status" 
				:loading-text="loadingText" 
				:loadmore-text="loadmoreText" 
				:nomore-text="nomoreText" 
			/>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [],
				status: 'nomore',
				loadingText: '努力加载中',
				loadmoreText: '轻轻上拉',
				nomoreText: '实在没有了',
				tabList: [
					{name: '推荐'}
				]
			}
		},
		onLoad() {
			this.load()
		},
		onPullDownRefresh() {
		    this.load('sx')
		},
		onShow() {

		},
		methods: {
			load(type) {
				this.$http.get('/signRecord/l', {}).then(res => {
					this.list = res.data.list
					if (type == 'sx') {
						uni.stopPullDownRefresh();
						uni.showToast({
							title: '刷新成功',
							icon: 'none'
						})
					}
				})
			},
			toDetail(el = {}) {
				uni.navigateTo({
					url: `/pages/home/jobDetails?id=${el.id}`
				})
			}
		}
	}
</script>

<style lang="scss">
.deliverLog{
	height: 100%;
	overflow: hidden;
	.list{
		height: calc(100%);
		overflow: auto;
		padding: 30rpx;
		box-sizing: border-box;
		.list-item{
			background-color: #fff;
			border-radius: 20rpx;
			padding: 30rpx;
			.list-title{
				font-weight: bold;
				font-size: 36rpx;
				margin-bottom: 20rpx;
				.t{
					background-color: #EFF7FE;
					color: #33A1CA;
					margin-left: 20rpx;
					font-weight: normal;
				}
				.money{
					color: #647BEB;
				}
			}
			.company{
				margin: 20rpx 0;
				color: #666;
				font-size: 30rpx;
			}
			.occupational{
				color: #666;
				font-size: 26rpx;
				font-weight: 300;
			}
		}
		.list-item + .list-item{
			margin-top: 30rpx;
		}
	}
}
</style>
