<template>
	<view class="content">
		<view class="box">
			<view class="hflex acenter jbetween">
				<view class="top">{{pageData.title}}</view>
				<view class="text_blue">{{pageData.salary}}</view>
			</view>
			<view class="hflex acenter fwrap">
				<block v-for="(item,index) in pageData.requirement">
					<view class="box_item">{{item.name}}</view>
				</block>
			</view>
		</view>
		<view class="box">
			<view class="hflex acenter">
				<image :src="pageData.user.headimg" class="headimg"></image>
				<view class="text1">{{pageData.user.name}}</view>
			</view>
			<view class="hflex acenter padT-26">
				<u-icon name="phone-fill" color="#666666" size="14" class="padR-24"></u-icon>
				<view class="text_style1">{{pageData.user.phone}}</view>
			</view>
			<view class="hflex acenter padT-26">
				<image src="/static/images/index/demand/email.png" class="icon"></image>
				<view class="text_style1">{{pageData.user.email}}<span style="color: #506dff;" @click="copy(pageData.user.email)"><span style="padding: 0 5rpx;">|</span>复制</span></view>
			</view>
		</view>
		<view class="box">
			<view class="box_title">职位描述</view>
			<view class="desc">
				<view class="hflex pad_tb10">
					<view class="label">地区范围</view>
					<view class="text_style1">{{pageData.desc.area}}</view>
				</view>
				<view class="hflex acenter pad_tb10">
					<view class="label">用工时间</view>
					<view class="text_style1">{{pageData.desc.time}}</view>
				</view>
				<view class="hflex acenter pad_tb10">
					<view class="label">用工性质</view>
					<view class="text_style1">{{pageData.desc.type}}</view>
				</view>
			</view>
		</view>
		<view class="box">
			<view class="box_title">必备技能</view>
			<view class="">
				<block v-for="(item,index) in pageData.skill" :key="index">
					<view class="text2">{{index+1}}.{{item.name}}</view>
				</block>
			</view>
			<view class="box_title" style="padding-top: 20rpx;">证书</view>
			<view class="hflex acenter">
				<block v-for="(item,index) in pageData.book" :key="index">
					<view class="text2">{{item.name}}</view>
				</block>
			</view>
		</view>
		<view class="box">
			<view class="box_title">福利待遇</view>
			<view class="text2">{{pageData.welfare}}</view>
		</view>
		<view class="box" style="margin-bottom: 186rpx;">
			<view class="box_title">备注</view>
			<view class="text2">{{pageData.remarks}}</view>
		</view>
		<view class="bottom hflex acenter jbetween">
			<view class="vflex acenter" @click="collect">
				<u-icon name="star" color="#444444" size="20" v-if="pageData.is_collect == 0"></u-icon>
				<u-icon name="star-fill" color="#506DFF" size="20" v-else></u-icon>
				<view class="text_style1">收藏</view>	
			</view>	
			<view class="vflex acenter" @click="share">
				<image src="/static/images/comment/share.png" mode="" class="bottom_img"></image>	
				<view class="text_style1">分享</view>	
			</view>	
			<view class="left_btn hflex acenter jcenter">
				<u-icon name="heart" color="#506DFF" size="20"></u-icon>
				<view class="btn_text">感兴趣</view>
			</view>
			<view class="right_btn hflex acenter jcenter">
				<image src="/static/images/comment/chat.png" class="btn_icon"></image>
				<view class="btn_text2">立即沟通</view>
			</view>
		</view>
	</view>
</template>

<script>
	import $api from '@/static/js/api.js'
	var that = ''
	export default {
		data() {
			return {
				pageData: {
					title: '船舶设计师',
					salary: '13-15K',
					requirement: [
						{
							name: '招5人'
						},
						{
							name: '经验不限'
						},
						{
							name: '学历不限'
						},
						{
							name: '30岁以下'
						},
						{
							name: '男性'
						},
					],
					user: {
						name: '*嘉琪',
						sex: '女',
						edu: '本科',
						age: '27岁',
						year: '5年',
						phone: '18923465789',
						email: '18923465789@163.com',
						headimg: '/static/images/mine/avatar2.jpg'
					},
					desc: {
						area: '江苏省南京市浦口区江北街道东方万汇城22号楼一单元2021',
						time: '两个月',
						type: '全职',
					},
					skill: [
						{
							name: '负责船体专业送审图纸的检查和监督、施工图纸检查和监 督、施工图纸及订货下发时间的筹划和监督；'
						},
						{
							name: '坞修船船体相关技术工作的协调与解决；'
						},
						{
							name: '负责依据项目履约计划制定设计计划，并完成生产设计及 出图；'
						}
					],
					book: [
						{
							name: '船舶工程二级证书'
						},
						{
							name: '建模证书'
						}
					],
					welfare: '免费员工餐、免费培训、住房补贴、五险一金',
					remarks: '免费员工餐、免费培训、住房补贴、五险一金',
					is_collect: 0,
				}
			}
		},
		onLoad() {
			that = this
		},
		methods: {
			// 复制
			copy(value) {
				uni.setClipboardData({
					data: value,
					success: function () {
						$api.info('复制成功')
					}
				});
			},
		},
	}
</script>

<style lang="scss" scoped>
	.content {
		.box {
			width: 690rpx;
			margin: 0 30rpx;
			box-sizing: border-box;
			padding: 20rpx 0;
			border-bottom: 1rpx solid #F4F4F4;
			.top {
				font-size: 40rpx;
				font-weight: 500;
				color: #222222;
				line-height: 56rpx;
				padding: 24rpx 0 20rpx;
			}
			.text_blue {
				font-size: 32rpx;
				font-weight: 400;
				color: #506DFF;
				line-height: 40rpx;
			}
			.box_item {
				width: auto;
				height: 40rpx;
				background: #F0F2F6;
				border-radius: 4rpx;
				margin: 0 20rpx 20rpx 0;
				padding: 0 16rpx;
				font-size: 22rpx;
				font-weight: 400;
				color: #444444;
				line-height: 40rpx;
			}
			.headimg {
				width: 72rpx;
				height: 72rpx;
				border-radius: 50%;
				margin-right: 20rpx;
			}
			.text1 {
				font-size: 30rpx;
				font-weight: 500;
				color: #222222;
				line-height: 42rpx;
			}
			.padT-26 {
				padding-top: 26rpx;
			}
			.padR-24 {
				padding-right: 24rpx;
			}
			.label {
				width: 20%;
				font-size: 24rpx;
				font-weight: 400;
				color: #444444;
			}
			.icon {
				width: 28rpx;
				height: 28rpx;
			}
			.text_style1 {
				width: 80%;
				font-size: 24rpx;
				padding-left: 5rpx;
				font-weight: 400;
				color: #666666;
			}
			.box_title {
				font-size: 32rpx;
				font-weight: 500;
				color: #222222;
			}
			.desc {
				margin: 16rpx 0 0;
				background: #F7F7F7;
				border-radius: 8px;
				box-sizing: border-box;
				padding: 24rpx 20rpx;
				.pad_tb10 {
					padding: 10rpx 0;
				}
			}
			.text2 {
				font-size: 24rpx;
				font-weight: 400;
				color: #333333;
				line-height: 34rpx;
				padding: 16rpx 0 0;
			}
		}
		.bottom {
			width: 100%;
			z-index: 9;
			position: fixed;
			bottom: 0;
			height: 166rpx;
			background: #FFFFFF;
			box-sizing: border-box;
			box-shadow: 0px -1px 0px 0px #F4F4F4;
			padding: 8rpx 30rpx 74rpx;
			.text_style1 {
				font-size: 20rpx;
				font-weight: 400;
				color: #444444;
			}
			.left_btn {
				width: 230rpx;
				height: 80rpx;
				background: #F1F6FF;
				border-radius: 42rpx;
			}
			.btn_text {
				font-size: 32rpx;
				font-weight: 500;
				color: #506DFF;
				line-height: 44rpx;
				padding-left: 10rpx;
			}
			.right_btn {
				width: 270rpx;
				height: 80rpx;
				background: #506DFF;
				border-radius: 42rpx;
				margin-left: 20rpx;
				.btn_icon {
					width: 40rpx;
					height: 40rpx;
				}
				.btn_text2 {
					font-size: 32rpx;
					font-weight: 500;
					color: #FFFFFF;
					line-height: 44rpx;
					padding-left: 10rpx;
				}
			}
			.bottom_img {
				width: 40rpx;
				height: 40rpx;
			}
			
		}
	}
</style>