<template>
	<view class="contain">
		<uni-row>
			<view style="height: 20rpx;"></view>
		</uni-row>
		<uni-row>
			<uni-col :push="1">
				<view class="contain-item"><text class="contain-text">需求号：</text>{{item.requireId}}</view>
			</uni-col>
		</uni-row>
		<uni-row>
			<uni-col :push="1">
				<view class="contain-item"><text class="contain-text">学员ID：</text>{{item.uid}}</view>
			</uni-col>
		</uni-row>
		<uni-row>
			<uni-col :span="12" :push="1">
				<view class="contain-item"><text class="contain-text">学员：</text>{{item.name}}</view>
			</uni-col>
			<uni-col :span="12">
				<view><text class="contain-text">学员性别：</text>{{item.sex}}</view>
			</uni-col>
		</uni-row>
		<uni-row>
			<uni-col :push="1">
				<view class="contain-item"><text class="contain-text">需求科目：</text>{{item.subjectBig}}/{{item.subjectSmall}}</view>
			</uni-col>
		</uni-row>
		<uni-row>
			<view class="contain-item">
				<map :longitude="location[1]" :latitude="location[0]" :markers="marker" class="map"></map>
			</view>
		</uni-row>
		<uni-row>
			<uni-col :push="1">
				<view class="contain-item"><text class="contain-text">学员地址：</text>{{item.locationStr}}</view>
			</uni-col>
		</uni-row>
		<uni-row>
			<uni-col :push="1">
				<text class="contain-text">课程时间：</text>
			</uni-col>
		</uni-row>
		<uni-row>
			<uni-col :span="12" :push="1">
				<view class="contain-item"><text class="contain-text">教员类型：</text>{{item.teacherType}}</view>
			</uni-col>
			<uni-col :span="12">
				<view><text class="contain-text">学员学历：</text>{{item.teacherEdu}}</view>
			</uni-col>
		</uni-row>
		<uni-row>
			<uni-col :span="12" :push="1">
				<view class="contain-item"><text class="contain-text">教员性别：</text>{{item.teacherGender}}</view>
			</uni-col>
			<uni-col :span="12">
				<view><text class="contain-text">上课方式：</text>{{item.mode}}</view>
			</uni-col>
		</uni-row>
		<uni-row>
			<uni-col :span="12" :push="1">
				<view class="contain-item"><text class="contain-text">教员头像：</text>{{item.teacherProfilePhoto}}</view>
			</uni-col>
			<uni-col :span="12">
				<view><text class="contain-text">需求金额：</text>{{item.salary}}元</view>
			</uni-col>
		</uni-row>
		<uni-row>
			<uni-col :push="1">
				<view class="contain-item"><text class="contain-text">期望目标：</text>{{item.goal}}</view>
			</uni-col>
		</uni-row>
		<uni-row>
			<uni-col :push="1">
				<view class="contain-item"><text class="contain-text">额外要求：</text>{{item.teacherDemanded}}</view>
			</uni-col>
		</uni-row>
		<uni-row>
			<uni-col :push="1">
				<view class="contain-item"><text class="contain-text">审核不通过原因：</text>{{item.verifyRefuseReason}}</view>
			</uni-col>
		</uni-row>
		<uni-row>
			<uni-col :push="1">
				<view class="contain-item"><text class="contain-text">本需求发布日期：</text>{{item.datetime}}</view>
			</uni-col>
		</uni-row>
		<uni-row>
			<uni-col :push="1">
				<view class="contain-item"><text class="contain-text">手机号：</text>{{item.phone}}</view>
			</uni-col>
		</uni-row>
		<uni-row>
			<uni-col :push="1">
				<view class="contain-item"><text class="contain-text">微信号：</text>{{item.wxid}}</view>
			</uni-col>
		</uni-row>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				item: {},
				location: [],
				marker: [{
					id: 1,
					joinCluster:true,
					latitude: 0,
					longitude: 0,
					width: 30,
					height: 30,
					iconPath: '/static/location.png',
				}],
			};
		},
		onLoad(option) {
			let options = decodeURIComponent(option.item)
			this.item = JSON.parse(options)
			console.log(this.item)
			this.location = this.item.locationAl.split(",")
			this.marker.latitude = Number(this.location[0])
			console.log(Number(this.location[0]))
			this.marker.longitude = Number(this.location[1])
			console.log(this.marker)
		}
	}
</script>

<style lang="scss" scoped>
.contain {
	background-color: #FFF2CC;
	border-radius: 10%;
	
	.contain-item {
		margin-bottom: 20rpx;
	}
	
	.contain-text {
		font-weight: 700;
		color: #bbb;
	}
	
	.map {
		width: 100%;
	}
}
</style>
