lsw 11 månader sedan
förälder
incheckning
f48e0a3e20
3 ändrade filer med 9 tillägg och 4 borttagningar
  1. 1 1
      app/common/common.scss
  2. 7 3
      app/pages/index/index.vue
  3. 1 0
      app/pages/job/list.vue

+ 1 - 1
app/common/common.scss

@@ -294,7 +294,7 @@
 .job{
 	margin-left: -5px;
 	margin-right: -5px;
-	margin-top: 5px;
+	margin-top: -5px;
 	overflow: hidden;
 	.full_time {
 		float: left;

+ 7 - 3
app/pages/index/index.vue

@@ -19,8 +19,9 @@
 		</view>
 		<!--职位列表-->
 		<view class="list">
-			<jobIndex :list="list" v-if="list.length > 0"></jobIndex>
-			<u-empty v-else text="该城市暂无工作"></u-empty>
+			<jobIndex :list="list" v-if="list.length > 0 && param.recommend == 1"></jobIndex>
+			<job :list="list" v-if="list.length > 0 && param.recommend == ''"></job>
+			<u-empty v-if="list.length === 0" text="该城市暂无工作"></u-empty>
 			<button class="btn" v-if="list.length == 8" @click="go('/pages/job/list?type=' + param.type + '&current=' + param.current)">
 				<text>查看更多</text>
 				<text class="icon">&#xe62b;</text>
@@ -34,7 +35,7 @@ export default {
 		return {
 			tab: [
 				{ name: '推荐工作', orderBy: 'id', type: 0, recommend: 1, current: 1 },
-				{ name: '身边工作', orderBy: 'distance', type: 0, recommend: 1, current: 2 },
+				{ name: '身边工作', orderBy: 'distance', type: 0, recommend: '', current: 2 },
 				{ name: '现结工作', orderBy: 'id', type: 1, recommend: 1, current: 0 }
 			],
 			list: [],
@@ -135,6 +136,9 @@ export default {
 	border-radius: 5px;
 	box-shadow: $box-shadow;
 }
+.list {
+	padding-top: 10px;
+}
 .btn {
 	width: 60%;
 	margin-top: 10px;

+ 1 - 0
app/pages/job/list.vue

@@ -47,6 +47,7 @@ export default {
 		}
 		this.param.type = e.type || 0;
 		this.current = e.current || 0;
+		this.param.orderBy = this.tab[this.current].orderBy;
 		setTimeout(() => {
 			uni.setNavigationBarTitle({ title: this.param.type == 0 ? '全职岗位' : '兼职岗位' });
 		}, 300);