<template>
	<view>
		<view class="se-bgc-orange se-pos se-pos-lt se-w-vw-100 se-h-vh-30" style="z-index: -1;border-bottom-left-radius: 120rpx;border-bottom-right-radius: 120rpx;"></view>
		<view class="se-flex se-flex-h-sb se-px-40 se-pb-30 se-pt-10 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-pb-20 se-pt-40 se-zi-s">
			<view class="se-px-20">
				<u-swiper height="300rpx" style="background-color: transparent;height: 300rpx;" :list="list" @change="change" @click="click"></u-swiper>
			</view>
			<view class="se-pt-10 se-bgc-white se-px-0 se-py-10 se-ta-l se-c-orange se-flex se-flex-ai-c se-fs-26">
				<image class="se-a-80" src="@/static/image/aed60x.png" mode=""></image>
				<text class="se-ml-10">今日有6个工作息新发布....</text>
			</view>
		</view>
		<view class="se-my-20 se-bgc-white se-grid">
			<navigator url="/pages_subpack/category/index" v-for="(item, index) in nav" :key="index" class="se-flex-v-c se-pt-30 se-mb-20">
				<image class="se-a-100 se-br-20" :src="item.img" mode=""></image>
				<text class="se-w-150 se-h-60 se-lh-30 se-c-black se-fs-22 se-ta-c se-mt-10 se-toe-2">{{item.name}}</text>
			</navigator>
		</view>
		<view class="se-my-20 se-bgc-white se-p-20 se-flex">
			<view @click="toNavigator(1)" class="se-flex-1 se-flex-h-c se-flex-ai-c se-c-white se-py-20 se-fw-6 enterprise">
				找工作
			</view>
			<view @click="toNavigator(2)" class="se-flex-1 se-ml-20 se-flex-h-c se-flex-ai-c se-c-white se-py-20 se-fw-6 master">
				找师傅
			</view>
		</view>
		<u-tabs
			:current="current"
			lineWidth="30"
			lineColor="#FF7A31"
			:activeStyle="{
				color: '#303133',
				fontWeight: 'bold',
				transform: 'scale(1.05)'
			}"
			:inactiveStyle="{
				color: '#606266',
				transform: 'scale(1)'
			}"
			itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;" 
			:list="navList" 
			@click="navClick($event)">
		</u-tabs>
		<!-- 企业端 -->
		<enterpriseBox v-if="current==0" />
		<!-- 师傅端 -->
		<masterBox v-if="current==1" />
	</view>
</template>

<script>
	import enterpriseBox from "./component/enterprise.vue"
	import masterBox from "./component/master.vue"
	export default{
		components:{
			enterpriseBox,
			masterBox
		},
		data(){
			return {
				status:1,
				list: [
					'../../static/image/banner.png',
					"https://cdn.uviewui.com/uview/swiper/swiper1.png"
				],
				nav:[
					{
						img:"../../static/image/nav1.png",
						name:"家政"
					},
					{
						img:"../../static/image/nav2.png",
						name:"餐饮"
					},
					{
						img:"../../static/image/nav3.png",
						name:"娱乐"
					},
					{
						img:"../../static/image/nav4.png",
						name:"生产创意"
					},
					{
						img:"../../static/image/nav5.png",
						name:"物流"
					},
					{
						img:"../../static/image/nav6.png",
						name:"装修"
					},
					{
						img:"../../static/image/nav7.png",
						name:"美容/美发"
					},
					{
						img:"../../static/image/nav8.png",
						name:"兼职"
					}
				],
				current:0,
				navList:[
					{
						name: '求职大厅',
					}, 
					{
						name: '招聘大厅',
					}
				]
			}
		},
		mounted() {
			
		},
		methods:{
			navClick(event){
				this.current=event.index
			},
			change(event){
				console.info(event)
			},
			click(event){
				console.info(event)
			},
			toNavigator(event){
				uni.navigateTo({
					url:"/pages_subpack/release/index?status="+event
				})
			},
		}
		
	}
</script>
<style>
	page{
		background-color: #f5f5f5;
	}
	.enterprise{
		background: #ff7a31;
		border: 4rpx solid rgba(255,255,255,0.50);
		border-radius: 14rpx;
	}
	.master{
		background: #f0b744;
		border: 4rpx solid rgba(255,255,255,0.50);
		border-radius: 14rpx;
	}
</style>