Tang 4 лет назад
Родитель
Сommit
acf951076a
2 измененных файлов с 76 добавлено и 39 удалено
  1. 75 38
      components/recruitment.vue
  2. 1 1
      pages/index/index.vue

+ 75 - 38
components/recruitment.vue

@@ -5,20 +5,31 @@
 				<view class="slot-wrap"><image src="/static/search.png" class="search" @click="jumpSearch"></image></view>
 			</u-navbar>
 		</view>
-		<scroll-view scroll-y="true" @scroll="scroll" style="padding-top: 20rpx;" :style="'height: ' + windowHeight + 'px;'" @scrolltolower="scrollTolower" refresher-enabled @refresherpulling="pulling" @refresherrefresh="refresher" @refresherrestore="restore" :refresher-triggered="triggered">
+		<scroll-view
+			scroll-y="true"
+			@scroll="scroll"
+			style="padding-top: 20rpx;"
+			:style="'height: ' + windowHeight + 'px;'"
+			@scrolltolower="scrollTolower"
+			refresher-enabled
+			@refresherpulling="pulling"
+			@refresherrefresh="refresher"
+			@refresherrestore="restore"
+			:refresher-triggered="triggered"
+		>
 			<swiper class="swiper" :autoplay="true" previous-margin="15px" next-margin="15px" :circular="true">
 				<swiper-item v-for="(item, index) in list" :key="index" style="padding: 0px 5px;box-sizing: border-box;">
-					<view style="height: 100%;border-radius: 8px;overflow: hidden;"><image :src="$method.splitImgHost(item.adverUrl)" mode="" style="width: 100%;height: 100%;" @click="swiperClick(index)"></image></view>
+					<view style="height: 100%;border-radius: 8px;overflow: hidden;">
+						<image :src="$method.splitImgHost(item.adverUrl)" mode="" style="width: 100%;height: 100%;" @click="swiperClick(index)"></image>
+					</view>
 				</swiper-item>
 			</swiper>
-			<view style="margin: 31rpx 35rpx 24rpx">
-				<u-row gutter="16">
-					<u-col span="1">
-						<view style="padding: 5rpx;"><image src="/static/select.png" class="arr-icon" @click="showStatus"></image></view>
-					</u-col>
-					<u-col span="9">
-						<view>
-							<template>
+			<view style="margin: 31rpx 35rpx 24rpx;display: flex;align-items: center;">
+				<view style="padding: 5rpx;margin-right: 16rpx;"><image src="/static/select.png" class="arr-icon" @click="showStatus"></image></view>
+				<view class="dis_ssy">
+					<view class="lszty" @click="sectionChange(0)" :class="current == 0 ?'acszty':''">找岗位</view>
+					<view class="lszty" @click="sectionChange(1)" :class="current == 1 ?'acszty':''">找企业</view>
+					<!-- <template>
 								<u-subsection
 									@change="sectionChange"
 									height="54"
@@ -30,13 +41,11 @@
 									:list="tab_list"
 									:current="current"
 								></u-subsection>
-							</template>
-						</view>
-					</u-col>
-					<u-col span="2" @click="showCityPicker = true">
-						<view class="slh">{{ city === null ? '全国' : city }}</view>
-					</u-col>
-				</u-row>
+							</template> -->
+				</view>
+				<view style="width: 90px;" @click="showCityPicker = true">
+					<view class="slh">{{ city === null ? '全国' : city }}</view>
+				</view>
 			</view>
 			<view v-if="current === 0">
 				<view class="boxsize lines" v-for="(item, index) in posts" :key="index" @click="jumpDetails(item)">
@@ -184,7 +193,7 @@ export default {
 	name: 'recruitment',
 	data() {
 		return {
-			list:[],
+			list: [],
 			showCityPicker: false,
 			province: null,
 			city: null,
@@ -224,11 +233,11 @@ export default {
 			companyTypeActiveBoxs: [], //选中公司类型
 			sxGW: false,
 			sxCM: false,
-			triggered: false,
+			triggered: false
 		};
 	},
 	created() {
-		this.windowHeight = uni.getSystemInfoSync().windowHeight - 100;
+		this.windowHeight = uni.getSystemInfoSync().windowHeight - 120;
 	},
 	mounted() {
 		this.inits();
@@ -236,17 +245,17 @@ export default {
 		this.advertisingList();
 	},
 	methods: {
-		pulling(){
-			this.triggered = true
+		pulling() {
+			this.triggered = true;
 		},
-		refresher(){
+		refresher() {
 			this.inits();
 			this.getDict();
 			this.advertisingList();
-			this.triggered = false
+			this.triggered = false;
 		},
-		restore(){
-			this.triggered = false
+		restore() {
+			this.triggered = false;
 		},
 		swiperClick(index) {
 			let item = this.list[index];
@@ -257,8 +266,8 @@ export default {
 		advertisingList() {
 			let self = this;
 			this.$api.advertisingList().then(res => {
-				self.list = res.data.rows.filter((item,index) => {
-					return item.type === 2
+				self.list = res.data.rows.filter((item, index) => {
+					return item.type === 2;
 				});
 			});
 		},
@@ -386,19 +395,19 @@ export default {
 			this.$api.recruitcompanyConlist(data1).then(res => {
 				if (res.data.code === 200) {
 					self.total1 = res.data.total;
-						for (let k = 0; k < res.data.rows.length; k++) {
-							if (res.data.rows[k].recruitNeedsVoList) {
-								var anum = [];
-								for (let i = 0; i < res.data.rows[k].recruitNeedsVoList.length; i++) {
-									if (i >= 3) {
-										break;
-									} else {
-										anum.push(res.data.rows[k].recruitNeedsVoList[i]);
-									}
+					for (let k = 0; k < res.data.rows.length; k++) {
+						if (res.data.rows[k].recruitNeedsVoList) {
+							var anum = [];
+							for (let i = 0; i < res.data.rows[k].recruitNeedsVoList.length; i++) {
+								if (i >= 3) {
+									break;
+								} else {
+									anum.push(res.data.rows[k].recruitNeedsVoList[i]);
 								}
-								res.data.rows[k].newNumObj = anum;
 							}
+							res.data.rows[k].newNumObj = anum;
 						}
+					}
 					self.enterprise = res.data.rows;
 					self.show = false;
 				}
@@ -584,6 +593,12 @@ export default {
 			}
 		},
 		showStatus() {
+			if(this.current === 0){
+				this.activePopBtn = 0
+			}
+			if(this.current === 1){
+				this.activePopBtn = 1
+			}
 			this.show = true;
 		},
 		activeWorkType(item) {
@@ -904,4 +919,26 @@ export default {
 	/* width: 220rpx; */
 	text-align: center;
 }
+.dis_ssy {
+	flex: 1;
+	display: flex;
+	align-items: center;
+	height: 56rpx;
+	border-radius: 20rpx;
+	background-color: #f8f9ff;
+}
+.lszty {
+	height: 44rpx;
+	line-height: 44rpx;
+	width: 50%;
+	text-align: center;
+	border-radius: 16rpx;
+	color: #636a75;
+	font-size: 24rpx;
+	transition: all 0.3s;
+}
+.acszty {
+	color: #fff;
+	background: rgba(47, 67, 121, 0.6);
+}
 </style>

+ 1 - 1
pages/index/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<home v-show="current == 0" ref="home"></home>
-		<view v-if="isClick1"><recruitment v-show="current == 1" ref="recruitment"></recruitment></view>
+		<recruitment v-show="current == 1" ref="recruitment"></recruitment>
 		<my v-show="current == 2" ref="refMy"></my>
 
 		<u-tabbar v-model="current" :safe-area-inset-bottom="true" :list="list" active-color="#2F4379" :before-switch="beforeSwitch"></u-tabbar>