<template>
	<view>
		<!-- <view class="se-flex se-flex-h-sb se-px-40 se-py-30 se-bgc-orange se-zi-s">
			<view class="se-c-white se-fs-28">
				<view class="se-bgc-white se-py-5 se-px-10 se-fw-6 se-br-12 se-c-orange se-fs-24 se-display-ib">
					工
				</view>
				<text class="se-ml-10 se-fw-6 se-fs-28">用工平台</text>
			</view>
			<view class="se-br-30 se-bgc-white se-fw-6 se-c-orange se-fs-28 se-px-20 se-py-10">
				企业/个人端
			</view>
		</view>
		<view class="se-px-20 se-pt-10 se-zi-s">
			<u-search height="40" placeholder="搜索" :showAction="false" v-model="keyword"></u-search>
		</view>
		<view class="se-px-20 se-pb-20 se-pt-40 se-zi-s">
			<u-swiper
					height="300rpx"
				    style="background-color: transparent;height: 300rpx;"
					:list="list"
					@change="change"
					@click="click"
			></u-swiper>
		</view>
		<view class="se-p-20">
			<view class="se-flex se-flex-ai-c se-pb-10">
				<view class="line-orange"></view>
				<view class="se-ml-10 se-fs-32 se-c-black se-fw-6">
					信息大厅
				</view>
			</view>
		</view> -->
		<!-- 
		<screenWork :filterData='filterData' :defaultIndex='defaultIndex' @onSelected='onSelected' @onIntellect="onIntellect"></screenWork>
		 -->
		<view class="se-mt-10">
			<view class="se-m-20 se-br-20 se-bs-b se-bgc-white se-py-20 se-px-30" v-for="(items,indexs) in rolelist" :key="indexs">
				<view class="se-flex se-flex-h-sb"  @click.capture="onMasterDetail(items)">
					<view class="se-flex">
						<view class="se-a-80">
							<image class="se-a-80 se-br-p-50 se-bgc-f5" :src="items.headImage" mode=""></image>
						</view>
						<view class="se-ml-20 se-flex se-flex-v-c se-flex-ai-fs">
							<text class="se-fw-6 se-c-black se-fs-30">{{items.userName}}</text>
							<text class="se-fs-24 se-c-text-third">{{items.gender==1?'男':'女'}}-汉族</text>
						</view>
						<view class="se-flex se-flex-h-c">
							<view class="se-py-10 se-px-20 se-br-12 se-fs-22 se-c-orange se-bgc-ffd se-ml-20 se-fw-6" >
								{{items.industryName}}
							</view>
						</view>
					</view>
					<view class="se-c-orange se-fs-32 se-fw-6">
						{{items.moneyMin}}-{{items.moneyMax}}元
					</view>
				</view>
				<!-- <view>
					<text class="se-c-text-third se-fs-22 se-mt-10">09月23日 16:20</text>
				</view> -->
				<view class="se-flex se-flex-h-sb">
					<text class="se-c-text-sub se-fs-24">{{items.detail}}</text>
					<view @click.capture="onCustomerService(items.phone)" class="se-flex se-flex-h-c se-py-10 se-px-20 se-br-12 se-fs-22 se-c-orange se-bgc-ffd se-fw-6">
						<u-icon  color="#FF7A31" name="phone-fill"></u-icon>
						<text class="se-ml-5">联系他</text>
					</view>
				</view>
			</view>
			<u-empty v-if="rolelist && rolelist.length==0" mode="list"></u-empty>
		</view>
		<!-- <view class="release-box" @click="toNavigator()">
			<image class="se-a-70 se-br-p-50" src="@/static/image/release_btn.png" mode=""></image>
			<text class="se-c-white se-fs-30 se-fw-6">订单发布</text>
		</view> -->
	</view>
</template>

<script>
	// import screenWork from "./screen-work.vue"
	export default{
		props:["rolelist"],
		components:{
			// screenWork
		},
		data(){
			return {
				keyword:"",
				name:"",
				list: [
					'https://cdn.uviewui.com/uview/swiper/swiper2.png'
				],
				filterData:[
					[
						{ text: '全国', value: '', select:true }, 
						{ text: '状态1', value: 1, select:false }, 
						{ text: '状态2', value: 2, select:false }, 
						{ text: '状态3', value: 3, select:false }
					],
					[
						{ text: '选择工种', value: '', select:true },
						{ text: '类型1', value: 1, select:false }, 
						{ text: '类型2', value: 2, select:false }, 
						{ text: '类型3', value: 3, select:false },
					]
				],
				defaultIndex:[0,0]
			}
		},
		mounted() {
			console.info(this)
		},
		methods:{
			onCustomerService(phome){
				let that = this
				// let obj = that.$utils.getkeyContent('phone')
				if (uni.canIUse('makePhoneCall')) {
					uni.makePhoneCall({
					  phoneNumber: String(phome),
					  success: function () {
						console.log('拨打电话成功');
					  },
					  fail: function () {
						console.log('拨打电话失败');
					  }
					});
				} else {
					console.log('你的设备不支持拨打电话功能');
				}
				
			},
			onSelected(res){
				console.info(res)
			},
			onIntellect(res){
			   console.info(res)
			},
			change(event){
				console.info(event)
			},
			click(event){
				console.info(event)
			},
			toNavigator(){
				uni.navigateTo({
					url:"/pages_subpack/release/index?status=1"
				})
			},
			onMasterDetail(event){
				console.info("event",event)
				uni.navigateTo({
					url:"/pages_subpack/master-detail/index?id="+event.industryId
				})
			}
		}
		
	}
</script>

<style lang="scss" scoped>
	.release-box{
		width: 250rpx;
		height: 80rpx;
		background: #ff5d18;
		border: 4rpx solid rgba(255,255,255,0.68);
		border-radius: 44rpx;
		box-shadow: 0px 6rpx 12rpx 0px rgba(0,0,0,0.16); 
		display: flex;
		justify-content: center;
		align-items: center;
		position: fixed;
		bottom: 40rpx;
		left: 250rpx;
	}
</style>