<template>
	<view class="job">
		<view class="full_time" v-for="(item, index) in list" :key="index" @click="go('/pages/job/detail?id=' + item.id)">
			<view class="out">
				<view class="int">
					<image :src="ip + item.pic" mode="aspectFill"></image>
					<view class="title omit">{{ item.title }}</view>
					<view class="desc">{{ item.job }}</view>
					<view class="price" v-if="item.type == 0">{{ item.salary }}/月</view>
					<view class="price" v-if="item.type == 1">{{ item.salary }}/日</view>
					<view class="address omit">{{ item.regionName || '不限地点' }}</view>
					<view class="distance omit" v-if="item.distance">距离你{{ item.distance }}km</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	name: 'jobIndex',
	props: {
		list: {
			type: Array
		}
	},
	data() {
		return {
			ip: this.http.ip
		};
	},
	methods: {
		go(url) {
			uni.navigateTo({ url: url });
		}
	}
};
</script>

<style lang="scss"></style>
