123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554 |
- <template>
- <view>
- <view class="cu-bar search bg-gray">
- <view class="search-form round text-center">
- <text class="cuIcon-search"></text>
- <input v-model="searchval" :adjust-position="false" type="text" placeholder="请输入关键字"
- confirm-type="search" @confirm="btnSearch()"></input>
- </view>
- <view class="action" v-if="searchval!==''">
- <button class="cu-btn bg-white shadow-blur round" @click="btnSearch()">搜索</button>
- </view>
- </view>
- <view class="filterbg">
- <view class="flex justify-between solids-bottom padding bg-white">
- <view class="text-bold">
- <view class="cu-tag radius bg-red" @tap="resetFilter">重置</view>
- </view>
- <view class="flex justify-end">
- <!-- <view class="cu-tag radius bg-green" data-filterbox="rectype" @tap="showFilter">
- {{rectypelist.title}}</view> -->
- <view class="cu-tag radius bg-green" data-filterbox="wtype" @tap="showFilter">{{wtypelist.title}}
- </view>
- <view class="cu-tag radius bg-green" data-filterbox="cate" @tap="showFilter">{{catelist.title}}
- </view>
- <view class="cu-tag radius bg-green" data-filterbox="area" @tap="showFilter">{{arealist.title}}
- </view>
- </view>
- </view>
- <view class="filtercon" v-if="filterbox!==null" @click="hideFilter()">
- <view class="padding bg-white" v-if="filterbox=='rectype'" @click.stop>
- <block v-for="(item,index) in rectypelist.data" :key="index">
- <button class="cu-btn margin-lr-xs margin-tb-xs"
- @click="checkRectype(item.title,item.value)">{{item.title}}</button>
- </block>
- </view>
- <view class="padding bg-white" v-if="filterbox=='wtype'" @click.stop>
- <block v-for="(item,index) in wtypelist.data" :key="index">
- <button class="cu-btn margin-lr-xs margin-tb-xs"
- @click="checkWtype(item.title,item.value)">{{item.title}}</button>
- </block>
- </view>
- <view class="padding bg-white" v-if="filterbox=='cate'" @click.stop>
- <block v-for="(item,index) in catelist.data" :key="index">
- <button class="cu-btn margin-lr-xs margin-tb-xs"
- @click="checkCate(item.title,item.value)">{{item.title}}</button>
- </block>
- </view>
- <view class="grid margin-bottom text-left col-3 bg-white" v-if="filterbox=='area'" @click.stop>
- <view class="solids-right padding-bottom">
- <scroll-view scroll-y="true" style="height: 600rpx;">
- <view class="solid-bottom text-gray padding-lr-sm padding-tb-sm">选择市</view>
- <view class="solid-bottom padding-lr-sm padding-tb-sm" @click="checkArea(4,0)">全部</view>
- <block v-for="(item,index) in arealist.data" :key="index">
- <view class="solid-bottom padding-lr-sm padding-tb-sm" @click="checkArea(1,index)">
- {{item.title}}
- </view>
- </block>
- </scroll-view>
- </view>
- <view class="solids-right padding-bottom">
- <scroll-view scroll-y="true" style="height: 600rpx;">
- <view class="solid-bottom text-gray padding-lr-sm padding-tb-sm">选择区县</view>
- <block v-for="(item,index) in arealist.cityarr" :key="index">
- <view class="solid-bottom padding-lr-sm padding-tb-sm" @click="checkArea(2,index)">
- {{item.title}}
- </view>
- </block>
- </scroll-view>
- </view>
- <view class="padding-bottom">
- <scroll-view scroll-y="true" style="height: 600rpx;">
- <view class="solid-bottom text-gray padding-lr-sm padding-tb-sm">选择镇街</view>
- <block v-for="(item,index) in arealist.districtarr" :key="index">
- <view class="solid-bottom padding-lr-sm padding-tb-sm" @click="checkArea(3,index)">
- {{item.title}}
- </view>
- </block>
- </scroll-view>
- </view>
- </view>
- </view>
- </view>
- <view class="comjobsList">
- <view class="listCard" v-for="(item,index) in plist" :key="index" @tap="goDetail(item.id)">
- <view class="listCard-item">
- <view class="item-left">
- <image class="item-left-icon" :src="$getImageUrl('static/images/applet/index/cardA.png')"
- mode="widthFix"></image>
- <view class="item-left-content bold">{{item.title}}</view>
- </view>
- <view class="item-right">
- <image class="item-right-icon" src="../../static/images/comJobs/icon-sum.png" mode="widthFix"></image>
- <view class="item-right-content red">{{item.zwagall}}</view>
- </view>
- </view>
- <view class="listCard-itemTag">
- <view v-for="(titem,tindex) in item.tags" :key="tindex" class="tag-item">{{titem}}</view>
- </view>
- <view class="listCard-item">
- <view class="item-left">
- <image class="item-left-icon" :src="$getImageUrl('static/images/applet/index/cardD.png')"
- mode="widthFix"></image>
- <view class="item-left-content">地点:{{item.address}}</view>
- </view>
- <view class="item-right">
- <image class="item-right-icon" src="../../static/images/comJobs/icon-pageView.png" mode="widthFix">
- </image>
- <view class="item-right-content">浏览量:{{item.volume}}</view>
- </view>
- </view>
- </view>
- </view>
- <block v-for="(item,index) in plist" :key="index" v-if="false">
- <view class="cu-card dynamic no-card solid-bottom echo-comjobs-item padding-top-sm padding-lr-sm radius">
- <view class="cu-item shadow padding-top-sm padding-bottom" @tap="goDetail(item.id)">
- <view class="padding-lr flex justify-between align-center">
- <view class="basis-lg text-bold text-df text-cut">
- {{item.title}}
- <text class="text-red text-sm" v-if="item.wtype==1">(按月)</text>
- <text class="text-red text-sm" v-if="item.wtype==2">(按时)</text>
- <text class="text-red text-sm" v-if="item.wtype==3">(按件)</text>
- <text class="text-red text-sm" v-if="item.wtype==4">(按项目)</text>
- <text class="text-sm">{{item.recruit_num}}名</text>
- </view>
- <view class="basis-sm text-cut text-right text-gray text-sm">
- <view><text class="text-red text-bold">{{item.zwagall}}</text></view>
- <view v-if="item.recruitment_cate == 2"><text
- class="text-red text-bold">悬赏{{item.retmoney}}{{item.is_pay == 1 ? '(已支付)' : ''}}</text>
- </view>
- </view>
- </view>
- <view class="padding-lr padding-tb-xs text-cut">
- <view v-for="(titem,tindex) in item.tags" :key="tindex"
- class="cu-tag light bg-blue lg echo-tags-item">{{titem}}</view>
- </view>
- <view class="padding-lr text-cut text-sm flex justify-between align-center">
- <view class="basis-lg text-df text-cut">{{item.worker.title}}</view>
- <view class="basis-sm text-cut text-right text-sm">
- 浏览量:{{item.volume}}
- </view>
- </view>
- <!-- <view class="text-gray padding-lr flex align-center justify-between" @tap="goShop(item.workerid)">
- <view class="flex align-center">
- <image class="iconyrz" :src="$getImageUrl('static/images/applet/iconyrz.png')" mode="scaleToFill"></image>
- <image class="iconwyp" :src="$getImageUrl('static/images/applet/iconwyp.png')" mode="scaleToFill" v-if="item.recruitment_cate==2"></image>
- </view>
- <view class="text-gray text-right basis-xs text-sm">
- <text class="cuIcon-shop margin-right-xs text-lg"></text>
- 进店
- </view>
- </view> -->
- </view>
- </view>
- </block>
- <uni-load-more :status="pstatus"></uni-load-more>
- <wxContact></wxContact>
- <view class="padding-sm"></view>
- <view class="padding-xl"></view>
- <view class="cu-bar tabbar bg-white foot">
- <view class="action text-gray" @tap="goNavPage('/pages/index/index')">
- <view class="cuIcon-cu-image">
- <image src="../../static/tabbar/index.png"></image>
- </view>
- 首页
- </view>
- <view class="action text-red" @tap="goNavPage('/pages/comjobs/comjobs')">
- <view class="cuIcon-cu-image">
- <image src="../../static/tabbar/jobsSelected.png"></image>
- </view>
- 招聘
- </view>
- <!-- #ifndef MP-WEIXIN -->
- <view class="action text-gray videoimg" @tap="goNavPage('/pages/video/videolist')">
- <view class="cuIcon-cu-image">
- <image src="../../static/tabbar/video.png"></image>
- </view>
- 微工作
- </view>
- <!-- #endif -->
- <view class="action text-gray" @tap="goNavPage('/pages/broker/brokerlist')">
- <view class="cuIcon-cu-image">
- <image src="../../static/tabbar/broker.png"></image>
- </view>
- 经纪人
- </view>
- <view class="action text-gray" @tap="goNavPage('/pages/my/my')">
- <view class="cuIcon-cu-image">
- <image src="../../static/tabbar/my.png"></image>
- </view>
- 我的
- </view>
- </view>
- </view>
- </template>
- <script>
- import slFilter from '@/components/sl-filter/sl-filter.vue';
- import uniLoadMore from "@/components/uni-load-more/uni-load-more.vue";
- var _this;
- export default {
- components: {
- slFilter,
- uniLoadMore
- },
- data() {
- return {
- filterbox: null,
- rectypelist: {
- title: "悬赏/普通",
- value: 0
- },
- wtypelist: {
- title: "类型",
- value: 0,
- data: []
- },
- catelist: {
- title: "岗位",
- value: 0,
- data: []
- },
- arealist: {
- title: "区域",
- value: "",
- cityarr: [],
- districtarr: [],
- area_2: 0,
- data: [],
- community: "",
- },
- searchval: "",
- pstatus: 'more',
- ppage: 1,
- psize: 20,
- plist: []
- };
- },
- onLoad: function(option) {
- _this = this;
- _this.searchval = option.searchval || "";
- // _this.rectypelist.value = option.rectypelistID || 0;
- // if(_this.rectypelist.value != 0) {
- // _this.rectypelist.title = "悬赏聘";
- // } else {
- // _this.rectypelist.title = "悬赏/普通";
- // }
- // console.log("参数",_this.rectypelist.value)
- _this.$req.ajax({
- path: "comjobs/pagecomjobs",
- }).then((data) => {
- console.log("分类", data)
- _this.catelist.data = data.catelist;
- _this.wtypelist.data = data.wtypelist;
- _this.rectypelist.data = data.rectypelist;
- _this.arealist.data = require('@/common/area.json');
- _this.getMore();
- }).catch((err) => {
- uni.showModal({
- title: '信息提示',
- content: err,
- showCancel: false
- });
- });
- },
- onPullDownRefresh: function() {
- _this.pageRefresh();
- },
- onReachBottom: function() {
- if (_this.pstatus !== 'more') {
- return;
- }
- _this.getMore();
- },
- onShareAppMessage: function(res) {
- return {
- title: "企业招聘",
- path: "/pages/comjobs/comjobs"
- }
- },
- methods: {
- showFilter: function(e) {
- var nowfilterbox = e.currentTarget.dataset.filterbox;
- if (_this.filterbox == nowfilterbox) {
- _this.filterbox = null;
- } else {
- _this.filterbox = nowfilterbox;
- }
- uni.pageScrollTo({
- scrollTop: 0,
- duration: 300
- });
- },
- hideFilter: function(e) {
- _this.filterbox = null;
- },
- checkRectype: function(title, value) {
- _this.rectypelist.title = title;
- _this.rectypelist.value = value;
- console.log("悬赏聘", _this.rectypelist.title, _this.rectypelist.value)
- _this.filterbox = null;
- _this.pageRefresh();
- },
- checkWtype: function(title, value) {
- _this.wtypelist.title = title;
- _this.wtypelist.value = value;
- _this.filterbox = null;
- _this.pageRefresh();
- },
- checkCate: function(title, value) {
- _this.catelist.title = title;
- _this.catelist.value = value;
- _this.filterbox = null;
- _this.pageRefresh();
- },
- checkArea: function(level, index) {
- if (level == 1) {
- _this.arealist.cityarr = _this.arealist.data[index].children;
- _this.arealist.districtarr = [];
- } else if (level == 2) {
- _this.arealist.districtarr = _this.arealist.cityarr[index].children;
- _this.arealist.area_2 = _this.arealist.cityarr[index].value;
- } else if (level == 3) {
- _this.arealist.value = _this.arealist.community = "";
- _this.arealist.title = _this.arealist.districtarr[index].title;
- if (_this.arealist.area_2 == "350582") {
- //晋江
- if (_this.arealist.cityarr[index].value == "350582") {
- _this.arealist.value = _this.arealist.districtarr[index].title;
- } else {
- _this.arealist.community = _this.arealist.districtarr[index].value;
- }
- } else {
- //其他区域
- _this.arealist.value = _this.arealist.districtarr[index].title;
- }
- _this.filterbox = null;
- _this.pageRefresh();
- } else if (level == 4) {
- _this.arealist.cityarr = [];
- _this.arealist.districtarr = [];
- _this.arealist.title = "全部";
- _this.arealist.value = "";
- _this.filterbox = null;
- _this.pageRefresh();
- }
- },
- // 搜索
- bindInput: function(e) {
- _this.searchval = e.detail.value;
- },
- btnSearch: function() {
- if (_this.searchval == "") {
- uni.showModal({
- title: '信息提示',
- content: "请输入要搜索的关键字...",
- showCancel: false
- });
- return false;
- }
- _this.pageRefresh();
- },
- resetFilter: function() {
- _this.searchval = "";
- _this.rectypelist.title = '悬赏/普通';
- _this.rectypelist.value = 1;
- _this.wtypelist.title = '类型';
- _this.wtypelist.value = 0;
- _this.catelist.title = '岗位';
- _this.catelist.value = 0;
- _this.arealist.title = '区域';
- _this.arealist.value = '';
- _this.arealist.cityarr = [];
- _this.arealist.districtarr = [];
- _this.pageRefresh();
- },
- pageRefresh: function() {
- _this.pstatus = 'more';
- _this.ppage = 1;
- _this.plist = [];
- _this.getMore();
- },
- getMore: function() {
- _this.$req.ajax({
- path: "comjobs/listcomjobs",
- data: {
- ppage: _this.ppage,
- psize: _this.psize,
- searchval: _this.searchval,
- cateid: _this.catelist.value,
- wtype: _this.wtypelist.value,
- rectype: _this.rectypelist.value,
- district: _this.arealist.value,
- community: _this.arealist.community
- }
- }).then((data) => {
- console.log("查看数据", data)
- _this.pstatus = data.pstatus;
- _this.plist = _this.plist.concat(data.plist);
- _this.ppage += 1;
- uni.stopPullDownRefresh();
- }).catch((err) => {
- uni.showModal({
- title: '信息提示',
- content: err,
- showCancel: false
- });
- });
- },
- goDetail: function(comjobsid) {
- uni.navigateTo({
- url: '/pages/comjobs/detail?comjobsid=' + comjobsid
- });
- },
- goShop: function(workerid) {
- uni.navigateTo({
- url: '/pages/worker/shop?workerid=' + workerid
- });
- },
- result: function(e) {
- _this.cateid = e.cateid;
- _this.wtype = e.wtype;
- _this.province = e.province;
- _this.pageRefresh();
- },
- goNavPage: function(pageurl) {
- uni.redirectTo({
- url: pageurl
- });
- }
- }
- }
- </script>
- <style lang="scss">
- .comjobsList {
- padding: 28rpx 26rpx 0;
- .listCard {
- margin-bottom: 40rpx;
- padding: 28rpx 24rpx;
- background: #FFFFFF;
- border-radius: 12rpx;
-
- .listCard-itemTag {
- display: flex;
- flex-wrap: wrap;
- margin: 28rpx 0 8rpx;
-
- .tag-item {
- margin-right: 15rpx;
- background: #E6F2FF;
- font-size: 20rpx;
- color: #CA151C;
- padding: 5rpx 12rpx;
- margin-bottom: 20rpx;
- white-space: nowrap;
- text-overflow: ellipsis;
- white-space: nowrap;
- overflow: hidden;
- }
- }
- .listCard-item {
- display: flex;
- align-items: center;
-
- .item-left {
- width: 60%;
- display: flex;
-
- .item-left-icon {
- width: 35rpx;
- height: 35rpx;
- }
-
- .item-left-content {
- flex: 1;
- margin-left: 15rpx;
- font-size: 28rpx;
- font-weight: 400;
- color: #747474;
- overflow: hidden;
- text-overflow: ellipsis;
- -webkit-line-clamp: 1;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- }
-
- .bold {
- font-size: 28rpx;
- font-weight: 600;
- color: #383838;
- }
-
- .red {
- font-size: 28rpx;
- font-weight: 500;
- color: #CA151C;
- }
- }
-
- .item-right {
- width: 35%;
- margin-left: 15rpx;
- display: flex;
-
- .item-right-icon {
- width: 35rpx;
- height: 35rpx;
- }
-
- .item-right-content {
- flex: 1;
- margin-left: 15rpx;
- font-size: 28rpx;
- font-weight: 400;
- color: #747474;
- overflow: hidden;
- text-overflow: ellipsis;
- -webkit-line-clamp: 1;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- }
-
- .bold {
- font-size: 28rpx;
- font-weight: 600;
- color: #383838;
- }
-
- .red {
- font-size: 28rpx;
- font-weight: 500;
- color: #CA151C;
- }
- }
- }
- }
- }
- </style>
|