he2802 před 4 roky
rodič
revize
8e078e15ea
4 změnil soubory, kde provedl 117 přidání a 58 odebrání
  1. 35 21
      components/home.vue
  2. 80 36
      components/recruitment.vue
  3. 1 1
      pages/index/index.vue
  4. 1 0
      pages2/wd/edu_info.vue

+ 35 - 21
components/home.vue

@@ -5,7 +5,7 @@
 				<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="'height: ' + windowHeight + 'px;'" @scrolltolower="scrollTolower">
+		<scroll-view scroll-y="true" @scroll="scroll" :style="'height: ' + windowHeight + 'px;'" @scrolltolower="scrollTolower" refresher-enabled @refresherpulling="pulling" @refresherrefresh="refresher" @refresherrestore="restore" :refresher-triggered="triggered">
 			<view class="box">
 				<view class="my_swiper"><u-swiper :list="list" @click="swiperClick" height="330" border-radius="25" mode="none"></u-swiper></view>
 				<!-- 日历-->
@@ -130,28 +130,29 @@
 					</view>
 				</view>
 				<view v-if="paramList[current].showStatus" style="text-align: center;margin-top: 24rpx;">到底啦~</view>
-				<u-popup v-model="show" border-radius="14">
-					<view class="flex-d" style="width: 600rpx">
-						<view class="popup_t1">选择你需要的</view>
-						<view class="contentZ">
-							<view class="lzs">
-								<view class="tylsz" v-for="(item, index) in cateChild1" :key="index" @click="item.categoryId === 0 ? activeAll(1) : active1(item)" :class="item.categoryId === cateActiveIndex1 ? 'activeStys':''">{{ item.categoryName }}</view>
-							</view>
-							<view class="lzs">
-								<view class="tylsz" v-for="(item, index) in cateChild2" :key="index" @click="item.categoryId === 0 ? activeAll(2) : active2(item)" :class="item.categoryId === cateActiveIndex2 ? 'activeStys':''">{{ item.categoryName }}</view>
-							</view>
-							<view class="lzs">
-								<view class="tylsz" v-for="(item, index) in cateChild3" :key="index" @click="item.categoryId === 0 ? activeAll(3) : active3(item)" :class="item.categoryId === cateActiveIndex3 ? 'activeStys':''">{{ item.categoryName }}</view>
-							</view>
-						</view>
-						<view class="fots">
-							<view class="leftBtns" @click="initLists">重置筛选</view>
-							<view class="right_Btns" @click="searchPageInfos">确定筛选</view>
-						</view>
-					</view>
-				</u-popup>
 			</view>
+			
 		</scroll-view>
+		<u-popup v-model="show" border-radius="14">
+			<view class="flex-d" style="width: 600rpx">
+				<view class="popup_t1">选择你需要的</view>
+				<view class="contentZ">
+					<view class="lzs">
+						<view class="tylsz" v-for="(item, index) in cateChild1" :key="index" @click="item.categoryId === 0 ? activeAll(1) : active1(item)" :class="item.categoryId === cateActiveIndex1 ? 'activeStys':''">{{ item.categoryName }}</view>
+					</view>
+					<view class="lzs">
+						<view class="tylsz" v-for="(item, index) in cateChild2" :key="index" @click="item.categoryId === 0 ? activeAll(2) : active2(item)" :class="item.categoryId === cateActiveIndex2 ? 'activeStys':''">{{ item.categoryName }}</view>
+					</view>
+					<view class="lzs">
+						<view class="tylsz" v-for="(item, index) in cateChild3" :key="index" @click="item.categoryId === 0 ? activeAll(3) : active3(item)" :class="item.categoryId === cateActiveIndex3 ? 'activeStys':''">{{ item.categoryName }}</view>
+					</view>
+				</view>
+				<view class="fots">
+					<view class="leftBtns" @click="initLists">重置筛选</view>
+					<view class="right_Btns" @click="searchPageInfos">确定筛选</view>
+				</view>
+			</view>
+		</u-popup>
 	</view>
 </template>
 
@@ -160,6 +161,7 @@ export default {
 	name: 'home',
 	data() {
 		return {
+			triggered: false,
 			courseItem: {},
 			cateList: [],
 			cateChild1: [],
@@ -224,6 +226,18 @@ export default {
 		this.initCateList();
 	},
 	methods: {
+		pulling(){
+			this.triggered = true
+		},
+		refresher(){
+			this.initList();
+			this.advertisingList();
+			this.initCateList();
+			this.triggered = false
+		},
+		restore(){
+			this.triggered = false
+		},
 		init() {
 			if (!this.$method.isLogin()) {
 				//未登录

+ 80 - 36
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">
+		<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,
@@ -223,7 +232,8 @@ export default {
 			companyTypeList: [], //公司类型
 			companyTypeActiveBoxs: [], //选中公司类型
 			sxGW: false,
-			sxCM: false
+			sxCM: false,
+			triggered: false
 		};
 	},
 	created() {
@@ -234,12 +244,18 @@ export default {
 		this.getDict();
 		this.advertisingList();
 	},
-	refresherrefresh(){
-		console.log(34)
-	},
 	methods: {
-		refresherrefresh(){
-			console.log(34)
+		pulling() {
+			this.triggered = true;
+		},
+		refresher() {
+			this.inits();
+			this.getDict();
+			this.advertisingList();
+			this.triggered = false;
+		},
+		restore() {
+			this.triggered = false;
 		},
 		swiperClick(index) {
 			let item = this.list[index];
@@ -250,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;
 				});
 			});
 		},
@@ -379,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;
 				}
@@ -577,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) {
@@ -897,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>

+ 1 - 0
pages2/wd/edu_info.vue

@@ -280,6 +280,7 @@
 						if(this.schoolInfo.graduationTime)
 							this.index_grade = this.dictObj['grade'].indexOf((this.schoolInfo.grade))
 					}
+					console.log(this.dictObj['edu_level'],this.index_level,999)
 				});
 			},
 			bindPickerChangeSex(e){