<template>
	<view class="resume">
		<view class="row">
			<!--个人信息-->
			<view class="top">
				<view class="sm6">
					<view class="name">
						<text>{{ item.name || '' }}</text>
					</view>
					<view class="item">年龄：{{ item.age || '' }}</view>
					<view class="item">性别：{{ item.sex || '' }}</view>
					<view class="item">手机号码：{{ item.phone || '' }}</view>
					<view class="item">电子邮箱：{{ item.email || '' }}</view>
				</view>
				<image :src="item.avatar ? ip + item.avatar : '../../../static/ls.jpg'" mode="widthFix" class="tx" v-if="item.avatar"></image>
			</view>
		</view>
		<!--求职期望-->
		<view class="row">
			<view class="label">
				<text class="title">求职期望</text>
			</view>
			<view class="item">意向工作：{{ item.positionName || '' }}</view>
		</view>
		<button class="btn" @click="show = true">
			<text class="icon">&#xe6a3;</text>
			<text>面试邀请</text>
		</button>
		<button class="btn" @click="call()">
			<text class="icon">&#xe644;</text>
			<text>拨打电话</text>
		</button>
		<invite v-model="show" :resumeDeliverId="resumeDeliverId"></invite>
	</view>
</template>

<script>
export default {
	data() {
		return {
			ip: this.http.ip,
			resumeDeliverId: 0,
			item: {},
			show: false
		};
	},
	onLoad(e) {
		this.resumeDeliverId = e.id;
		this.http.request({
			url: '/app/deliver/detail/' + e.id,
			success: (res) => {
				this.item = res.data.data;
			}
		});
	},
	methods: {
		call() {
			uni.makePhoneCall({
				phoneNumber: this.item.phone
			});
		}
	}
};
</script>
<style lang="scss"></style>
