This commit is contained in:
shijingjing
2022-05-31 17:52:14 +08:00
parent 99574bc82b
commit 4b760830c2

View File

@@ -1,15 +1,22 @@
<template> <template>
<div class="wrapper"> <div class="wrapper">
<div class="tabs">
<div class="tab-select"> <u-tabs
<div class="item" :class="tabIndex == index ? 'active' : ''" v-for="(item, index) in tabs" :key="index" @click="tabClick(index)">{{item}}<span></span></div> :list="tabs"
font-size="40"
bg-color="transparent"
:bold="false"
inactive-color="#ccddff"
:is-scroll="true"
:gutter="16"
active-color="#fff"
:current="index"
@change="onChange">
</u-tabs>
</div> </div>
<div class="search-wrap"> <div class="search-wrap">
<div class="left"> <div class="left">
<!-- @click="show=true" -->
<!-- <span>{{ search.typeName ? search.typeName : "全部" }}</span> -->
<!-- <u-icon name="arrow-down" color="#ffffff" size="20"></u-icon> -->
<AiSelect :dict="yesOrNo" v-model="search.typeName" placeholder="请选择"> <AiSelect :dict="yesOrNo" v-model="search.typeName" placeholder="请选择">
<span>{{ search.typeName ? search.typeName : "全部类型" }}</span> <span>{{ search.typeName ? search.typeName : "全部类型" }}</span>
<u-icon name="arrow-down" color="#333333" size="20"></u-icon> <u-icon name="arrow-down" color="#333333" size="20"></u-icon>
@@ -23,12 +30,6 @@
</div> </div>
</div> </div>
<div class="job-list" v-if="list.length"> <div class="job-list" v-if="list.length">
<!-- <header>
<span>招工就业列表</span>
<div class="right">
<em>{{ total }}</em>个职位
</div>
</header> -->
<div class="card" v-for="(item,index) in list" :key="index"> <div class="card" v-for="(item,index) in list" :key="index">
<template v-if="item.type == 1"> <template v-if="item.type == 1">
<div class="top" @click="toDetail(0,item)"> <div class="top" @click="toDetail(0,item)">
@@ -95,8 +96,7 @@ export default {
type: "", type: "",
typeName: "", typeName: "",
}, },
tabs: ['全部','我的发布'], index: 0,
tabIndex: 0,
} }
}, },
onLoad() { onLoad() {
@@ -110,12 +110,18 @@ export default {
}, { }, {
value: '0', value: '0',
label: '企业招工' label: '企业招工'
}, },{
{ value: '1',
value: '1', label: '个人求职'
label: '个人求职' }];
}]; },
} tabs() {
return [{
name: '全部'
}, {
name: '我的发布'
}]
},
}, },
methods: { methods: {
preview(index) { preview(index) {
@@ -133,11 +139,12 @@ export default {
this.getList(); this.getList();
}, },
tabClick(index) { onChange(val) {
this.current = 1, this.index = val;
this.list = [], this.current = 1;
this.tabIndex = index if (!!this.index) {
// this.getList() this.getMine();
} else this.getAll();
}, },
getList() { getList() {
@@ -175,43 +182,17 @@ export default {
padding-top: 96px; padding-top: 96px;
} }
.tab-select { .tabs {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
z-index: 11;
width: 100%; width: 100%;
height: 96px; padding: 10px 0 10px 16px;
line-height: 96px; box-sizing: border-box;
background: #4181FF; background: #4181FF;
display: flex;
z-index: 999;
.item{
flex: 1;
text-align: center;
font-size: 40px;
font-family: PingFangSC-Regular, PingFang SC;
color: #CDDCF0;
}
.active{
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
position: relative;
color: #fff;
span{
width: 48px;
height: 4px;
background: #FFF;
position: absolute;
bottom: 14px;
left: 50%;
margin-left: -24px;
}
}
} }
.search-wrap { .search-wrap {
width: 100%; width: 100%;
height: 124px; height: 124px;