|
|
<template>
|
|
|
<view>
|
|
|
<view
|
|
|
:class="'weui-search-bar weui-search-bar_focusing ' + (fromProject ? 'fff' : 'fff')"
|
|
|
id="searchBar"
|
|
|
style="line-height: 1; padding-left: 16px; padding-right: 16px;padding-bottom: 12px;"
|
|
|
v-if="!isFilterPage"
|
|
|
>
|
|
|
<view class="weui-search-bar__form flex-1 fsa">
|
|
|
<view class="weui-search-bar__box flex-1 fsa" style="background-color: #f5f5f5; border-radius: 17px">
|
|
|
<i class="iconfont icon-sousuo11"></i>
|
|
|
<input
|
|
|
type="text"
|
|
|
class="weui-search-bar__input flex-1 c3"
|
|
|
placeholder-style="color:#999;"
|
|
|
:value="inputVal"
|
|
|
:placeholder="placeholderText"
|
|
|
@input="inputTyping"
|
|
|
@confirm="searchKey"
|
|
|
auto-focus
|
|
|
confirm-type="search"
|
|
|
/>
|
|
|
<view class="iconfont icon-qingchu biggerSize" v-if="inputVal" @click.stop="clearInput"></view>
|
|
|
<view class="search" @tap="searchKey">搜索</view>
|
|
|
</view>
|
|
|
<!-- <view class="typeChange ml16" hover-class="none" hover-stop-propagation="false">
|
|
|
<image class catchtap="choosenTop" data-id="{{toped == 2 ? 1 : 2}}" style="width:60px;height: 40px;" src="{{toped == 1 ? 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/biaog.svg' : '../../assets/images/jiang.svg'}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror bindload></image>
|
|
|
</view>-->
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- wx:if="{{isWannaShow}}" -->
|
|
|
<view class="wannaSearch pl16 mt20 c9 f14" hover-class="none" v-if="isWannaShow && historyList.length > 0" :hover-stop-propagation="false">
|
|
|
<view class>最近搜索</view>
|
|
|
<view class="laji biggerSize f14 iconfont icon-lajitong" @tap="clearNearSearch" hover-class="none" :hover-stop-propagation="false"></view>
|
|
|
<view class="wannaList c6 f16" style>
|
|
|
<view class="subset" hover-class="hcb" @tap="setKey" :data-key="item" v-for="(item, index) in historyList" :key="index">
|
|
|
{{ item }}
|
|
|
|
|
|
<!-- <view class="clearIcon iconfont icon-qingchu" hover-class="none" hover-stop-propagation="false">
|
|
|
</view>-->
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="wannaSearch pl16 mt20 c9 f14" v-if="isWannaShow" hover-class="none" :hover-stop-propagation="false">
|
|
|
<view>猜你想搜</view>
|
|
|
<view class="wannaList c6 f16" hover-class="none" :hover-stop-propagation="false">
|
|
|
<view class="subset" hover-class="thover" :data-key="item" @tap="setKey" v-for="(item, index) in wannaList" :key="index">{{ item }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view style class="container" @touchstart="touchStart" v-if="!isWannaShow">
|
|
|
<view class="navigator">
|
|
|
<!-- <view class="quickapply">
|
|
|
<button class="text" size="mini" hover-class="none" catchgetphonenumber="getPhoneNumber" open-type="getPhoneNumber" catchtap="emptyMethod" hover-stop-propagation="false" wx:if="{{!isLogin}}">
|
|
|
<view class hover-class="thover" hover-stop-propagation="false" bindtap="changeRecordBillType" data-type="photo">
|
|
|
<view class="info">
|
|
|
<view class="fw500 f18">拍照报名</view>
|
|
|
<view class="f12 c9">自动识别</view>
|
|
|
</view>
|
|
|
<view class="t-icon t-icon-paizhao"></view>
|
|
|
</view>
|
|
|
<view class hover-class="thover" hover-stop-propagation="false" bindtap="changeRecordBillType" data-type="record">
|
|
|
<view class="info">
|
|
|
<view class="fw500">报名录单</view>
|
|
|
<view class="f12 c9">快速报名</view>
|
|
|
</view>
|
|
|
<view class="t-icon t-icon-ludan"></view>
|
|
|
</view>
|
|
|
</button>
|
|
|
<button wx:else hover-class="none" style="width: calc(100vw - 20px);">
|
|
|
<view class hover-class="thover" hover-stop-propagation="false" catchtap="chooseIdCard">
|
|
|
<view class="info">
|
|
|
<view class="fw500">拍照报名</view>
|
|
|
<view class="f12 c9">自动识别</view>
|
|
|
</view>
|
|
|
<view class="t-icon t-icon-paizhao" />
|
|
|
</view>
|
|
|
<view class hover-class="thover" hover-stop-propagation="false" catchtap="navigatorToRecord">
|
|
|
<view class="info">
|
|
|
<view class="fw500">报名录单</view>
|
|
|
<view class="f12 c9">快速报名</view>
|
|
|
</view>
|
|
|
<view class="t-icon t-icon-ludan" />
|
|
|
</view>
|
|
|
</button>
|
|
|
</view>-->
|
|
|
</view>
|
|
|
<view class="sticky" hover-class="none" :hover-stop-propagation="false" v-if="!isFilterPage">
|
|
|
<!-- <view class="fsa searchBar">
|
|
|
<view class="fsa" hover-class="none" hover-stop-propagation="false">
|
|
|
<view class="tarbar" bindtap="collectChange" data-id="0">
|
|
|
<view class="tarbarText {{choiceCollect == '0'?'collectActive':''}}">全部</view>
|
|
|
</view>
|
|
|
<view class="tarbar" style="margin-left: 24px;" bindtap="collectChange" data-id="1">
|
|
|
<view class="tarbarText {{choiceCollect == '1'?'collectActive':''}}">收藏</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<form class="weui-search-bar__form">
|
|
|
<view class="weui-search-bar__box" catchtap="goSearch">
|
|
|
<i class="iconfont icon-sousuo"></i>
|
|
|
<view class="weui-search-bar__input f14 oelps {{!chaShowed ? 'c9' : 'c3'}}" style="max-width: 70px;">{{inputVal}}</view>
|
|
|
<view class="iconfont icon-guanbi11 f10 c9" wx:if="{{chaShowed}}" style="color:#333" catchtap="clearInput"></view>
|
|
|
<view class="search f14" catchtap="searchKey" style="color: var(--color-ysd);">搜索</view>
|
|
|
</view>
|
|
|
</form>
|
|
|
<view class="typeChange" hover-class="none" hover-stop-propagation="false">
|
|
|
<image class catchtap="choosenTop" data-id="{{toped == 2 ? 1 : 2}}" style="width:60px;height: 32px;" src="{{toped == 1 ? '../../assets/images/biao.svg' : '../../assets/images/jian.svg'}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror bindload></image>
|
|
|
</view>
|
|
|
</view>-->
|
|
|
<view class="xgxg p012" id="menu" v-if="!isWannaShow && !isFilterPage">
|
|
|
<view class="display-flex" style="justify-content: space-beteween; height: 36px">
|
|
|
<view class="csbf v-center p0" style="background-color: #fff" hover-class="thover" @tap="goCity">
|
|
|
<view class="f16 fw500 dib">{{ searchCityParamStorage.name == '' ? '全国' : searchCityParamStorage.shortName }}</view>
|
|
|
<i class="iconfont icon-zhankai f12" style="margin: 1px 0px 0 6px"></i>
|
|
|
</view>
|
|
|
<!-- <view class="csbf f14 c6 {{whichOneShow == 'gj' ?'active':''}} {{ activez!='' && activez!='all'?'activecolor':''}}" bindtap="chooseNl" data-type="gj">
|
|
|
{{firstMenu}}
|
|
|
<i class="iconfont icon-shouqi f12 {{ activez=='zuigao' || activez=='zuijin' ?'cf40':'c9'}} fst ml4" wx:if="{{whichOneShow == 'gj'}}"></i>
|
|
|
<i class="iconfont icon-zhankai f12 {{ activez=='zuigao' || activez=='zuijin' ?'cf40':'c9'}} fst ml4" wx:else data-type="gj"></i>
|
|
|
<scroll-view class="gjFixed" catchtouchmove="cc" wx:if="{{ whichOneShow == 'gj' }}">
|
|
|
<view class="bgf tl c3 por filter filterprice sort" style="height:240px">
|
|
|
<view class="f16 fw500 p016 {{activez=='all'?'cf00 b1 ':''}}" data-id="all" bindtap="choiceFilter" style="line-height: 42px" hover-class="thover">综合排序</view>
|
|
|
<view class="f16 fw500 p016 {{activez=='zuigao'?'cf00 b1 ':''}}" data-id="zuigao" bindtap="choiceFilter" style="line-height: 42px" hover-class="thover">工价优先</view>
|
|
|
<view class="f16 fw500 p016 bb1 {{activez=='zuijin'?'cf00 b1':''}}" data-id="zuijin" bindtap="choiceFilter" style="line-height: 42px" hover-class="thover">距离优先</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
</view>-->
|
|
|
<view
|
|
|
:class="'csbf c6 f14 ' + (whichOneShow == 'sex' ? 'active' : '') + ' ' + (sexid != '' && sexid != '-1' ? 'activecolor' : '')"
|
|
|
@tap="chooseNl"
|
|
|
data-type="sex"
|
|
|
style
|
|
|
>
|
|
|
{{ secondMenu }}
|
|
|
<i :class="'iconfont icon-shouqi f12 ' + (sexid != '-1' ? 'cf40' : 'c9') + ' fst ml4'" v-if="whichOneShow == 'sex'"></i>
|
|
|
<i :class="'iconfont icon-zhankai f12 ' + (sexid != '-1' ? 'cf40' : 'c9') + ' fst ml4'" v-else data-type="sex"></i>
|
|
|
<scroll-view class="gjFixed" @touchmove.stop.prevent="cc" v-if="whichOneShow == 'sex'">
|
|
|
<view class="bgf tl c3 filter filterprice sort" style="height: 240px">
|
|
|
<view
|
|
|
:class="'f16 fw500 p016 ' + (sexid == '-1' ? 'cf00 b1' : '')"
|
|
|
data-id="-1"
|
|
|
@tap="choiceSex"
|
|
|
style="line-height: 42px"
|
|
|
hover-class="thover"
|
|
|
>
|
|
|
男女不限
|
|
|
</view>
|
|
|
<view :class="'f16 fw500 p016 ' + (sexid == '1' ? 'cf00 b1' : '')" data-id="1" @tap="choiceSex" style="line-height: 42px" hover-class="thover">
|
|
|
男生
|
|
|
</view>
|
|
|
<view :class="'f16 fw500 p016 ' + (sexid == '2' ? 'cf00 b1' : '')" data-id="2" @tap="choiceSex" style="line-height: 42px" hover-class="thover">
|
|
|
女生
|
|
|
</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
<view
|
|
|
:class="'csbf f14 c6 fsa ' + (whichOneShow == 'brand' ? 'active' : '') + ' ' + (selectBrandList.length > 0 ? 'activecolor' : '')"
|
|
|
@tap="chooseNl"
|
|
|
data-type="brand"
|
|
|
>
|
|
|
分类
|
|
|
<i class="iconfont icon-shouqi f12 c9 fst ml4" v-if="whichOneShow == 'brand' && selectBrandList.length <= 0"></i>
|
|
|
<i class="iconfont icon-zhankai f12 c9 fst ml4" v-if="whichOneShow != 'brand' && selectBrandList.length <= 0" data-type="brand"></i>
|
|
|
<view v-if="selectBrandList.length > 0" class="specialnum ml4" data-type="brand">{{ selectBrandList.length }}</view>
|
|
|
<scroll-view class="gjFixed" v-if="whichOneShow == 'brand'">
|
|
|
<view class="bgf tl c3 filterprice brand" @click.stop="cc">
|
|
|
<view class="display-flex content">
|
|
|
<block v-for="(item, index) in brandList" :key="index">
|
|
|
<view @tap="selectBrand" :data-index="index" :class="item.checked ? 'brandactive' : ''">
|
|
|
<!-- <image class src="{{item.logo}}" mode lazy-load="false" binderror bindload wx:if="{{item.logo}}"></image>
|
|
|
<image class wx:else mode="aspectFit" src="https://matripe.oss-cn-beijing.aliyuncs.com/default.png"></image>-->
|
|
|
{{ item.name }}
|
|
|
</view>
|
|
|
</block>
|
|
|
</view>
|
|
|
<view class="btmFix display-flex" style="justify-content: center">
|
|
|
<view class>
|
|
|
<button class="resetBtn" style @click.stop="reset" data-type="2">重置</button>
|
|
|
</view>
|
|
|
<view class>
|
|
|
<button type="primary" class="loginOut ysd-basebg-color" hover-class="thover" style @click.stop="loginOut">确定</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
<!-- <view class="csbf f14 c6 {{whichOneShow == 'brand' ?'active':''}} {{ selectBrandList.length > 0 ?'activecolor':''}}" bindtap="chooseNl" data-type="brand">
|
|
|
品牌
|
|
|
<i class="iconfont icon-shouqi f12 c9 fst ml4" wx:if="{{whichOneShow == 'brand' && selectBrandList.length <= 0}}"></i>
|
|
|
<i class="iconfont icon-zhankai f12 c9 fst ml4" wx:if="{{whichOneShow != 'brand' && selectBrandList.length <= 0}}" data-type="brand"></i>
|
|
|
<span wx:if="{{selectBrandList.length > 0}}" class="specialnum ml4" data-type="brand">{{selectBrandList.length}}</span>
|
|
|
<scroll-view class="gjFixed" wx:if="{{whichOneShow == 'brand'}}">
|
|
|
<view class="bgf tl c3 filterprice brand" catchtap="cc">
|
|
|
<view class="display-flex content">
|
|
|
<block wx:for="{{brandList}}" wx:for-item="item">
|
|
|
<view bindtap="selectBrand" data-index="{{index}}" class="{{item.checked ? 'brandactive' : ''}}">
|
|
|
<image class src="{{item.logo}}" mode lazy-load="false" binderror bindload wx:if="{{item.logo}}"></image>
|
|
|
<image class wx:else mode="aspectFit" src="https://matripe.oss-cn-beijing.aliyuncs.com/default.png"></image>
|
|
|
{{item.name}}
|
|
|
</view>
|
|
|
</block>
|
|
|
</view>
|
|
|
<view class="btmFix display-flex" style="justify-content: center;">
|
|
|
<view class>
|
|
|
<button class="resetBtn" style catchtap="reset" data-type="2">重置</button>
|
|
|
</view>
|
|
|
<view class>
|
|
|
<button type="primary" class="loginOut ysd-basebg-color" hover-class="thover" style catchtap="loginOut">确定</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
</view>-->
|
|
|
|
|
|
<view
|
|
|
:class="'csbf f14 c6 fsa ' + (whichOneShow == 'special' ? 'active' : '') + ' ' + (selectJobList.length > 0 ? 'activecolor' : '')"
|
|
|
@tap="chooseNl"
|
|
|
data-type="special"
|
|
|
>
|
|
|
筛选
|
|
|
<i class="iconfont icon-shouqi f12 c9 fst ml4" v-if="whichOneShow == 'special' && selectJobList.length <= 0"></i>
|
|
|
<i class="iconfont icon-zhankai f12 c9 fst ml4" v-if="whichOneShow != 'special' && selectJobList.length <= 0" data-type="special"></i>
|
|
|
<view v-if="selectJobList.length > 0" class="specialnum ml4" data-type="special">{{ selectJobList.length }}</view>
|
|
|
<scroll-view class="gjFixed" v-if="whichOneShow == 'special'">
|
|
|
<view class="bgf tl c3 filterprice filterBox" @click.stop="cc">
|
|
|
<scroll-view :scroll-y="true" class="specialtag">
|
|
|
<view class="f18 c3 fw500 mt12" style="text-align: start">薪资福利</view>
|
|
|
<view class="mt10 tagBox">
|
|
|
<block v-for="(item, index) in tagArray1" :key="index">
|
|
|
<view @tap="selectJobSpecialLabel" data-index-tag="1" :data-index="index" :class="'bgAc ' + (item.checked ? 'active' : '')">
|
|
|
{{ item.name }}
|
|
|
</view>
|
|
|
</block>
|
|
|
</view>
|
|
|
<view class="f18 c3 fw500 mt16">食宿保障</view>
|
|
|
<view class="mt10 tagBox">
|
|
|
<block v-for="(item, index) in tagArray3" :key="index">
|
|
|
<view @tap="selectJobSpecialLabel" data-index-tag="3" :data-index="index" :class="'bgAc ' + (item.checked ? 'active' : '')">
|
|
|
{{ item.name }}
|
|
|
</view>
|
|
|
</block>
|
|
|
</view>
|
|
|
<view class="f18 c3 fw500 mt16">班制特色</view>
|
|
|
<view class="mt10 tagBox">
|
|
|
<block v-for="(item, index) in tagArray0" :key="index">
|
|
|
<view @tap="selectJobSpecialLabel" data-index-tag="0" :data-index="index" :class="'bgAc ' + (item.checked ? 'active' : '')">
|
|
|
{{ item.name }}
|
|
|
</view>
|
|
|
</block>
|
|
|
</view>
|
|
|
<view class="f18 c3 fw500 mt16">其它特色</view>
|
|
|
<view class="mt10 tagBox">
|
|
|
<block v-for="(item, index) in tagArray2" :key="index">
|
|
|
<view @tap="selectJobSpecialLabel" data-index-tag="2" :data-index="index" :class="'bgAc ' + (item.checked ? 'active' : '')">
|
|
|
{{ item.name }}
|
|
|
</view>
|
|
|
</block>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
<view class="btmFix display-flex" style="justify-content: center">
|
|
|
<view class>
|
|
|
<button class="resetBtn" style @click.stop="reset" data-type="1">重置</button>
|
|
|
</view>
|
|
|
<view class>
|
|
|
<button type="primary" class="loginOut ysd-basebg-color" hover-class="thover" style @click.stop="loginOut">确定</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<scroll-view
|
|
|
class="filterTag display-flex"
|
|
|
:scroll-x="true"
|
|
|
:scroll-y="false"
|
|
|
scroll-top="0"
|
|
|
scroll-left="0"
|
|
|
scroll-into-view
|
|
|
:scroll-with-animation="false"
|
|
|
enable-flex
|
|
|
:enable-back-to-top="false"
|
|
|
v-if="selectBrandList.length > 0 || selectJobList.length > 0 || activez != 'all' || sexid != '-1'"
|
|
|
>
|
|
|
<view class="display-flex" hover-class="none" :hover-stop-propagation="false">
|
|
|
<view
|
|
|
:class="
|
|
|
'tc genderTag f14 por ' + (activez != 'all' && (selectJobList.length > 0 || selectBrandList.length > 0 || sexid != '-1') ? 'hascontent' : '')
|
|
|
"
|
|
|
style="min-width: 60px"
|
|
|
v-if="activez != 'all'"
|
|
|
hover-class="none"
|
|
|
:hover-stop-propagation="false"
|
|
|
>
|
|
|
<view class hover-class="none" :hover-stop-propagation="false">{{ firstMenu }}</view>
|
|
|
</view>
|
|
|
<view
|
|
|
:class="'tc genderTag f14 por ' + (sexid != '-1' && (selectJobList.length > 0 || selectBrandList.length > 0) ? 'hascontent' : '')"
|
|
|
style="min-width: 60px"
|
|
|
v-if="sexid != '-1'"
|
|
|
hover-class="none"
|
|
|
:hover-stop-propagation="false"
|
|
|
>
|
|
|
<view class hover-class="none" :hover-stop-propagation="false">{{ secondMenu }}</view>
|
|
|
</view>
|
|
|
<view :class="'brandTag ml8 ' + (selectBrandList.length > 0 && selectJobList.length > 0 ? 'hascontent' : '')" v-if="selectBrandList.length > 0">
|
|
|
<block v-for="(item, index) in selectBrandList" :key="index">
|
|
|
<view class>{{ item.name }}</view>
|
|
|
</block>
|
|
|
</view>
|
|
|
<view class="specialTag" v-if="selectJobList.length > 0">
|
|
|
<block v-for="(item, index) in selectJobList" :key="index">
|
|
|
<view class>{{ item.name }}</view>
|
|
|
</block>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="clear" @click.stop="clearFilter" hover-class="none" :hover-stop-propagation="false">
|
|
|
<i class="iconfont icon-qingkong1 f14"></i>
|
|
|
清除
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 标准列表 -->
|
|
|
<block v-if="toped == 1">
|
|
|
<view v-if="recordList != null && recordList.length > 0" class="standardList" style="padding-top: 0">
|
|
|
<scroll-view
|
|
|
:scroll-y="true"
|
|
|
:enable-back-to-top="true"
|
|
|
@scrolltolower="onScrollToLower"
|
|
|
@refresherrefresh="onScrollRefresh"
|
|
|
:refresher-enabled="!isScrollTop"
|
|
|
:refresher-triggered="isTrigger"
|
|
|
class="jobCenterActive"
|
|
|
:scroll-with-animation="true"
|
|
|
:scroll-into-view="siv"
|
|
|
:style="
|
|
|
'height:calc(100vh - ' +
|
|
|
(selectBrandList.length > 0 || selectJobList.length > 0 || activez != 'all' || sexid != '-1'
|
|
|
? navigatorBarHeight + 151
|
|
|
: navigatorBarHeight + (!isFilterPage ? 103 : 95)) +
|
|
|
'px);'
|
|
|
"
|
|
|
>
|
|
|
<view :x:if="recordList != null && recordList.length > 0" class style="padding-top: 0">
|
|
|
<view class="jcenter bgf br8">
|
|
|
<view class="listcontainer" style="border-top: 1px solid #f3f3f3">
|
|
|
<view
|
|
|
class="jobOne"
|
|
|
hover-start-time="50"
|
|
|
hover-stay-time="0"
|
|
|
:data-id="item.id"
|
|
|
@tap="goDetail"
|
|
|
:hover-class="item.recruitment == '1' ? 'ahover' : ''"
|
|
|
:style="
|
|
|
'background-color:' +
|
|
|
(item.recruitment == '1' ? '#fff' : '#f5f5f5') +
|
|
|
';border-bottom: ' +
|
|
|
(item.recruitment == '1' ? '' : '1px solid #ddd') +
|
|
|
';'
|
|
|
"
|
|
|
v-for="(item, index) in recordList"
|
|
|
:key="index"
|
|
|
>
|
|
|
<view class="p1020 jobIn" hover-class="none">
|
|
|
<image
|
|
|
class="markImg"
|
|
|
style="width: 80px; height: 80px; position: absolute; right: 100px"
|
|
|
src="http://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/tingzhao.svg"
|
|
|
v-if="item.status == 1 && item.recruitment == 2"
|
|
|
></image>
|
|
|
|
|
|
<image
|
|
|
class="markImg"
|
|
|
style="width: 72px; height: 72px; position: absolute; right: 100px"
|
|
|
src="http://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/weishangxian.svg"
|
|
|
v-if="item.status == 0"
|
|
|
></image>
|
|
|
|
|
|
<view class="display-flex">
|
|
|
<view class="prImg">
|
|
|
<image :src="item.logo" v-if="item.logo != null && item.logo != ''" mode="aspectFit" class="logoClass" alt></image>
|
|
|
<image class="logoClass" v-else mode="aspectFit" src="https://matripe.oss-cn-beijing.aliyuncs.com/default.png"></image>
|
|
|
<button
|
|
|
v-if="isLogin"
|
|
|
:class="'collect biggerSize v-center ' + (item.collected - 1 == 0 ? 'collectred' : '')"
|
|
|
@click.stop="collectPaste"
|
|
|
style="width: 52px"
|
|
|
:data-collected="item.collected"
|
|
|
:data-jobid="item.id"
|
|
|
hover-stop-propagation
|
|
|
>
|
|
|
<i class="iconfont icon-shoucang lh12" style="color: #888" v-if="item.collected == 0"></i>
|
|
|
<i class="iconfont icon-yishoucang lh12 color-f40" style v-else></i>
|
|
|
<text :class="'f10 ' + (item.collected - 1 == 0 ? 'color-f40' : 'c8')" style="line-height: 12px; margin-left: 2px">
|
|
|
{{ item.collected == 0 ? '收藏' : '已收藏' }}
|
|
|
</text>
|
|
|
</button>
|
|
|
<button
|
|
|
v-if="!isLogin"
|
|
|
style="width: 52px"
|
|
|
class="collect biggerSize"
|
|
|
open-type="getPhoneNumber"
|
|
|
@getphonenumber.stop.prevent="getPhoneNumber"
|
|
|
@click.stop="emptyMethod"
|
|
|
:data-collected="item.collected"
|
|
|
:data-jobid="item.id"
|
|
|
hover-stop-propagation
|
|
|
>
|
|
|
<i class="iconfont icon-shoucang" style="color: #888"></i>
|
|
|
<text class="f10 c8" style="line-height: 18px; margin-left: 2px">收藏</text>
|
|
|
</button>
|
|
|
</view>
|
|
|
<view class="flex-1 vsb">
|
|
|
<view class="display-flex">
|
|
|
<view class="storeName" v-if="item.jobName != null && item.jobName != ''">{{ item.jobName }}</view>
|
|
|
<view class="storeName" v-else>{{ item.aliasName }}</view>
|
|
|
<!-- <view class="hourPay">{{item.salaryClassifyValue}}</view> -->
|
|
|
<view class="hourPay" v-if="item.salaryClassify == 7">月薪</view>
|
|
|
<view class="hourPay" v-else>{{ item.salaryClassifyValue }}</view>
|
|
|
</view>
|
|
|
<view class="v-center mt12 mb12">
|
|
|
<view class="f14s c045 flex-1 display-flex">
|
|
|
<view class="overflowOmit" hover-class="none" :hover-stop-propagation="false" style="max-width: 220px">
|
|
|
{{ item.district == '' ? '' : item.district + ' | ' }}
|
|
|
<block v-if="item.distance != null && item.distance != '' && storeJobListSearchForm.sortTag == 2">
|
|
|
{{ item.distanceKm }}
|
|
|
</block>
|
|
|
<block v-else>{{ item.age }}</block>
|
|
|
</view>
|
|
|
<!-- <view class="fr f14s c633 fw400">{{item.monthlyPay}}</view> -->
|
|
|
<view class="fr f14s fw400" v-if="item.jobType != 2 || item.salaryClassify == 7" style="color: var(--color-f40)">
|
|
|
{{ item.monthlyPay }}
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="display-flex">
|
|
|
<scroll-view
|
|
|
:scroll-x="true"
|
|
|
@scroll.stop.prevent="scroll"
|
|
|
@click.stop="stoptap"
|
|
|
:class="'tttg ' + (item.isTagShow == true ? 'isTagShow' : '')"
|
|
|
>
|
|
|
<!-- <view class="t-icon t-icon-ziying1 " wx:if="{{item.signType == 1}}" style="background-repeat:no-repeat"></view> -->
|
|
|
<view class="tagsLi" v-for="(item1, index1) in item.jobSpecialLabelNameArray" :key="index1">{{ item1 }}</view>
|
|
|
<view class="tagsLi" v-if="item.jobSpecialLabelNameArray.length <= 0">暂无特色</view>
|
|
|
</scroll-view>
|
|
|
<block v-if="item.status == 1 && item.recruitment == 2">
|
|
|
<view class="miniBtn disabled" :hover-stop-propagation="false">立即报名</view>
|
|
|
</block>
|
|
|
<block v-else>
|
|
|
<view
|
|
|
class="miniBtn"
|
|
|
@click.stop="recordBill"
|
|
|
:data-job="item"
|
|
|
hover-class="thover"
|
|
|
:hover-stop-propagation="false"
|
|
|
>
|
|
|
立即报名
|
|
|
</view>
|
|
|
</block>
|
|
|
|
|
|
<!-- <view class="fsa bz f12 fee" wx:if="{{agencyStatus == 1 || corpUserFlag == true}}">
|
|
|
<view class="inner" hover-class="none" hover-stop-propagation="false">费</view>{{item.fuWuFei ? item.fuWuFei : '-' }}
|
|
|
</view>-->
|
|
|
<!-- <view class="fsa bz f12 fee">
|
|
|
<view class="inner" hover-class="none" hover-stop-propagation="false">费</view>
|
|
|
{{!isLogin ? '登录查看' : (agencyStatus == 1 ? (item.fuWuFei ? item.fuWuFei : '-') : '仅代理可见')}}
|
|
|
</view>-->
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<block v-if="(recordList == null || recordList.length == 0) && storeJobListSearchForm.keys != null && storeJobListSearchForm.keys != ''">
|
|
|
<view class="tc p20 f12 c045">没有符合条件的职位</view>
|
|
|
</block>
|
|
|
<block v-else>
|
|
|
<block v-if="isLogin">
|
|
|
<view class="tc p20 f12 c045" v-if="!hasMoreData || recordList.length == 0">已经到底啦~</view>
|
|
|
<view class="tc p20 f12 c045" v-else>上滑加载更多</view>
|
|
|
</block>
|
|
|
</block>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
|
|
|
<view v-if="recordList == null || (recordList.length == 0 && pageShow && !isWannaShow)" style="height: calc(100vh - 95px)" class="tc">
|
|
|
<view class="t-icon t-icon-zanwu" style="width: 80px; height: 80px; margin: 120px auto 20px"></view>
|
|
|
<view class="tc f14 c045">没有符合条件的职位</view>
|
|
|
</view>
|
|
|
</block>
|
|
|
|
|
|
<view class="bottomBox" v-if="isFilterPage" hover-class="none" :hover-stop-propagation="false">
|
|
|
<button class="normalBtn backIndex" @tap="backIndex">返回首页</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<bottom-drawer
|
|
|
:show="recordShow"
|
|
|
:info="currentInfo"
|
|
|
drawerType="recordShow"
|
|
|
:cancerShow="false"
|
|
|
:touchClose="true"
|
|
|
@hidedrawer="hidedrawershow"
|
|
|
class="bottomDrawer"
|
|
|
height="494px"
|
|
|
></bottom-drawer>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import bottomDrawer from '../../components/bottom-drawer/index';
|
|
|
const app = getApp();
|
|
|
const commonUtil = require('../../utils/commonUtil.js');
|
|
|
export default {
|
|
|
components: {
|
|
|
bottomDrawer
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
currentInfo: {},
|
|
|
recordShow: false,
|
|
|
toped: '1',
|
|
|
chaShowed: false,
|
|
|
isTrigger: false,
|
|
|
|
|
|
// background: ["../../assets/images/banner1.jpg", "../../assets/images/banner2.jpg", "../../assets/images/banner3.jpg", "../../assets/images/banner4.jpg"],
|
|
|
pullNum: 0,
|
|
|
|
|
|
//下拉次数
|
|
|
tabs: [],
|
|
|
|
|
|
activeTab: 0,
|
|
|
systemInfo: {},
|
|
|
getMenuButtonBoundingClientRect: {},
|
|
|
|
|
|
// 手机基础信息
|
|
|
tabs2: [],
|
|
|
|
|
|
loadMore: '',
|
|
|
loadContent: ['马不停蹄加载更多数据中...', '-- 已经到底了,加不了咯 --'],
|
|
|
statusBarHeight: uni.getStorageSync('statusBarHeight'),
|
|
|
|
|
|
// 状态栏高度
|
|
|
|
|
|
navigationBarHeight: uni.getStorageSync('navigationBarHeight'),
|
|
|
|
|
|
// 导航栏高度
|
|
|
|
|
|
menuButtonHeight: uni.getStorageSync('menuButtonHeight'),
|
|
|
|
|
|
// 胶囊按钮高度
|
|
|
|
|
|
menuButton: uni.getStorageSync('menuButtonInfo'),
|
|
|
|
|
|
// 胶囊信息
|
|
|
navigatorHeight: 60,
|
|
|
|
|
|
activeTab2: 0,
|
|
|
contentIndex: 0,
|
|
|
latestClass: 0,
|
|
|
zoneClass: 0,
|
|
|
recordList: [],
|
|
|
jobSpecialLabelNames: [],
|
|
|
wannaList: ['电子厂', '大龄工', '日结', '保底', '返费', '短期工', '新能源', '富士康', '暑假工', '焊工', '食品', '学生'],
|
|
|
|
|
|
storeJobListSearchForm: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 20,
|
|
|
classify: 1,
|
|
|
sex: -1,
|
|
|
workTypeStr: '',
|
|
|
lat: '',
|
|
|
lng: '',
|
|
|
jobClassify: '',
|
|
|
sortTag: 0,
|
|
|
jobSpecialLabelIds: '',
|
|
|
cityName: '',
|
|
|
brandIds: '',
|
|
|
ujc: 0,
|
|
|
keys: ''
|
|
|
},
|
|
|
|
|
|
loading: true,
|
|
|
topJobList: [],
|
|
|
hasLocation: false,
|
|
|
chooseActive: false,
|
|
|
|
|
|
//筛选是否高亮
|
|
|
labelItems: [],
|
|
|
|
|
|
checkedlabelItems: [],
|
|
|
hasMoreData: true,
|
|
|
|
|
|
//下拉是否还有更多数据
|
|
|
inputShowed: false,
|
|
|
|
|
|
inputVal: '',
|
|
|
wxCode: '',
|
|
|
isCollect: false,
|
|
|
collectTxt: '收藏',
|
|
|
isLogin: app.globalData.isLogin,
|
|
|
hasUserInfo: 0,
|
|
|
|
|
|
searchCityParamStorage: {
|
|
|
name: '',
|
|
|
shortName: ''
|
|
|
},
|
|
|
|
|
|
iosDialog1: false,
|
|
|
iosDialog2: false,
|
|
|
phoneDialog: false,
|
|
|
triggered: false,
|
|
|
pageShow: false,
|
|
|
whichOneShow: '',
|
|
|
siv: '',
|
|
|
activez: 'all',
|
|
|
sexid: '-1',
|
|
|
|
|
|
// 性别筛选的id
|
|
|
dialog1: false,
|
|
|
|
|
|
dialog2: false,
|
|
|
jobSpecialLabelList: [],
|
|
|
brandList: [],
|
|
|
firstMenu: '排序',
|
|
|
|
|
|
// 工价筛选tab显示
|
|
|
secondMenu: '性别',
|
|
|
|
|
|
// 性别筛选tab显示
|
|
|
selectBrandList: [],
|
|
|
|
|
|
// 选中的品牌标签
|
|
|
selectJobList: [],
|
|
|
|
|
|
// 选中的特色标签
|
|
|
tagArray0: [],
|
|
|
|
|
|
tagArray1: [],
|
|
|
tagArray2: [],
|
|
|
tagArray3: [],
|
|
|
recordBillType: '',
|
|
|
|
|
|
// 报名类型(拍照或者直接报名)
|
|
|
signType: 0,
|
|
|
|
|
|
// 职位类型(自营 三方)
|
|
|
recordCount: 0,
|
|
|
|
|
|
totalPage: 0,
|
|
|
currPage: 0,
|
|
|
currentJobDrawer: {},
|
|
|
|
|
|
// 当前简版职位抽屉信息
|
|
|
drawerShow: false,
|
|
|
|
|
|
// 简版职位抽屉显隐
|
|
|
choiceCollect: 0,
|
|
|
|
|
|
//收藏的筛选
|
|
|
corpUserFlag: app.globalData.loginUserInfo.corpUserFlag,
|
|
|
|
|
|
// 内部成员的判断
|
|
|
agencyStatus: app.globalData.loginUserInfo.agencyStatus,
|
|
|
|
|
|
// 是否是代理的判断
|
|
|
serviceInfo: {},
|
|
|
|
|
|
// 代理信息
|
|
|
navigatorBarHeight: 0,
|
|
|
|
|
|
// 头部整体高度信息
|
|
|
iosDialog: false,
|
|
|
|
|
|
// 成为代理弹窗
|
|
|
isLoading: true,
|
|
|
|
|
|
// 成为代理图片加载loading效果
|
|
|
isScrollTop: false,
|
|
|
|
|
|
// 控制职位列表的滚动
|
|
|
isWannaShow: false,
|
|
|
|
|
|
// 猜你想搜是否显示
|
|
|
historyList: [],
|
|
|
|
|
|
// 最近搜索列表
|
|
|
from: '',
|
|
|
|
|
|
// 来自哪个页面
|
|
|
placeholderText: '请输入关键词',
|
|
|
|
|
|
isFilterPage: false,
|
|
|
userInfo: '',
|
|
|
age: false,
|
|
|
isShow: false,
|
|
|
fromProject: false
|
|
|
};
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
var that = this;
|
|
|
console.log(options);
|
|
|
console.log(that.menuButton);
|
|
|
// let query = wx.createSelectorQuery()
|
|
|
// console.log(query.select('#searchBar'));
|
|
|
console.log(app.globalData.isLogin);
|
|
|
console.log(app.globalData.loginUserInfo.agencyStatus);
|
|
|
console.log();
|
|
|
this.getListByTypeAndIndustry();
|
|
|
this.getBrandNameAllList();
|
|
|
|
|
|
// 查看是否授权
|
|
|
uni.getSetting({
|
|
|
success(res) {
|
|
|
if (res.authSetting['scope.userInfo']) {
|
|
|
// 已经授权,可以直接调用 getUserInfo 获取头像昵称
|
|
|
uni.getUserInfo({
|
|
|
success: function (res) {
|
|
|
console.log(res.userInfo);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
// 检查从哪个页面进来的
|
|
|
console.log(options);
|
|
|
if (options.from) {
|
|
|
if (options.from != 'filter') {
|
|
|
this.setData({
|
|
|
isWannaShow: true
|
|
|
});
|
|
|
if (options.listtype) {
|
|
|
this.setData({
|
|
|
toped: options.listtype
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
this.setData({
|
|
|
from: options.from
|
|
|
});
|
|
|
}
|
|
|
if (options.data) {
|
|
|
console.log(JSON.parse(options.data));
|
|
|
that.storeJobListSearchForm = JSON.parse(options.data);
|
|
|
}
|
|
|
if (options.key) {
|
|
|
this.setData({
|
|
|
placeholderText: options.key
|
|
|
});
|
|
|
}
|
|
|
if (app.globalData.isNotEmptyCheck(options.fromSearchPage) && options.fromSearchPage == 1) {
|
|
|
// try {
|
|
|
// var searchCityParamStorage = wx.getStorageSync("searchCityParamStorage");
|
|
|
// var searchValue = wx.getStorageSync("SEARCH_VAL");
|
|
|
// console.log(searchValue);
|
|
|
// if (searchCityParamStorage) {
|
|
|
// console.log("searchCityParamStorage======", searchCityParamStorage);
|
|
|
// that.data.storeJobListSearchForm.cityName = searchCityParamStorage.name;
|
|
|
// if (app.isEmptyCheck(searchCityParamStorage.name)) {
|
|
|
// that.data.storeJobListSearchForm.cityName = "全国";
|
|
|
// }
|
|
|
// console.log(that.data.storeJobListSearchForm);
|
|
|
// console.log(searchValue);
|
|
|
// if (searchValue) {
|
|
|
// that.data.storeJobListSearchForm.keys = searchValue;
|
|
|
// that.data.inputVal = searchValue;
|
|
|
// }
|
|
|
// that.setData({
|
|
|
// searchCityParamStorage: searchCityParamStorage,
|
|
|
// storeJobListSearchForm: that.data.storeJobListSearchForm,
|
|
|
// inputVal: that.data.inputVal,
|
|
|
// });
|
|
|
// this.getJobList();
|
|
|
// }
|
|
|
// } catch (e) {
|
|
|
// console.log("获取缓存设置的查询职位列表参数错误:", e);
|
|
|
// }
|
|
|
} else {
|
|
|
try {
|
|
|
uni.removeStorageSync('searchJobListParamStorage');
|
|
|
} catch (e) {
|
|
|
console.log('CatchClause', e);
|
|
|
console.log('CatchClause', e);
|
|
|
console.log('删除缓存设置的查询职位列表参数错误:', e);
|
|
|
}
|
|
|
try {
|
|
|
uni.removeStorageSync('searchCityParamStorage');
|
|
|
} catch (e) {
|
|
|
console.log('CatchClause', e);
|
|
|
console.log('CatchClause', e);
|
|
|
console.log('删除缓存设置的查询职位列表参数错误:', e);
|
|
|
}
|
|
|
}
|
|
|
try {
|
|
|
if (app.globalData.isScanQRCodes - 1 == 0) {
|
|
|
uni.showToast({
|
|
|
title: '欢迎查看好工作',
|
|
|
icon: 'success',
|
|
|
duration: 2000
|
|
|
});
|
|
|
if (!getApp().globalData.isLogin) {
|
|
|
setTimeout(function () {
|
|
|
if (!getApp().globalData.isLogin) {
|
|
|
that.openIOS2();
|
|
|
}
|
|
|
}, 5000);
|
|
|
}
|
|
|
}
|
|
|
} catch (e) {
|
|
|
console.log('CatchClause', e);
|
|
|
console.log('CatchClause', e);
|
|
|
console.log('获取缓存设置的查询职位列表参数错误:', e);
|
|
|
}
|
|
|
console.log('options==============================1');
|
|
|
console.log(options);
|
|
|
console.log('options==============================2');
|
|
|
if (app.globalData.isNotEmptyCheck(options.scene)) {
|
|
|
//扫小程序码携带参数
|
|
|
var sceneStr = decodeURIComponent(options.scene);
|
|
|
var sceneJson = commonUtil.sceneToJson(sceneStr);
|
|
|
console.log('sceneJson===', sceneJson);
|
|
|
if (sceneJson.fromType == 1) {
|
|
|
app.globalData.isCommission = 1;
|
|
|
uni.setStorageSync('storageSyncAgencyUserId', sceneJson.userId);
|
|
|
}
|
|
|
|
|
|
//先设置代理人缓存人再登录
|
|
|
app.globalData.getLoginUserTokenInfo();
|
|
|
} else if (app.globalData.isNotEmptyCheck(options.fromType)) {
|
|
|
//扫小程序普通二维码携带参数-来源ID
|
|
|
console.log('options.fromType========' + options.fromType);
|
|
|
if (options.fromType == 0) {
|
|
|
console.log('options.id========' + options.id);
|
|
|
console.log('options.userId========' + options.userId);
|
|
|
try {
|
|
|
app.globalData.isCommission = 1;
|
|
|
uni.setStorageSync('fromQrCodeChannelContactId', options.id);
|
|
|
that.getAgencyUserId(options.id);
|
|
|
} catch (e) {
|
|
|
console.log('CatchClause', e);
|
|
|
console.log('CatchClause', e);
|
|
|
console.log('0-扫描微信二维码,设置参数错误:', e);
|
|
|
}
|
|
|
} else if (options.fromType.indexOf('0&id=') >= 0) {
|
|
|
//兼容2021-9-9之前的二维码
|
|
|
var paramsTempId = options.fromType.replace('0&id=', '');
|
|
|
console.log('¶msTempId========' + paramsTempId);
|
|
|
try {
|
|
|
app.globalData.isCommission = 1;
|
|
|
uni.setStorageSync('fromQrCodeChannelContactId', paramsTempId);
|
|
|
that.getAgencyUserId(paramsTempId);
|
|
|
} catch (e) {
|
|
|
console.log('CatchClause', e);
|
|
|
console.log('CatchClause', e);
|
|
|
console.log('0-扫描微信二维码,设置参数错误:', e);
|
|
|
}
|
|
|
} else {
|
|
|
//兼容2021-9-9之前的二维码
|
|
|
var paramsTempId = options.fromType.replace('0,id=', '');
|
|
|
console.log('=paramsTempId========' + paramsTempId);
|
|
|
try {
|
|
|
app.globalData.isCommission = 1;
|
|
|
uni.setStorageSync('fromQrCodeChannelContactId', paramsTempId);
|
|
|
that.getAgencyUserId(paramsTempId);
|
|
|
} catch (e) {
|
|
|
console.log('CatchClause', e);
|
|
|
console.log('CatchClause', e);
|
|
|
console.log('0-扫描微信二维码,设置参数错误:', e);
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
console.log('options.fromType===else=====' + options);
|
|
|
}
|
|
|
|
|
|
//this.wxLogin();
|
|
|
let res = uni.getStorageSync('storeJobId'); //详情页返回
|
|
|
console.log(res);
|
|
|
if (app.globalData.isEmptyCheck(res.data)) {
|
|
|
this.setData({
|
|
|
recordList: []
|
|
|
});
|
|
|
} else {
|
|
|
uni.removeStorageSync({
|
|
|
key: 'storeJobId'
|
|
|
});
|
|
|
}
|
|
|
console.log('on show');
|
|
|
|
|
|
//登录=================================start
|
|
|
if (app.globalData.isLogin) {
|
|
|
this.setData({
|
|
|
isLogin: app.globalData.isLogin,
|
|
|
hasUserInfo: app.globalData.hasUserInfo,
|
|
|
agencyStatus: app.globalData.loginUserInfo.agencyStatus,
|
|
|
corpUserFlag: app.globalData.loginUserInfo.corpUserFlag,
|
|
|
userInfo: app.globalData.loginUserInfo,
|
|
|
serviceInfo: app.globalData.serviceInfo,
|
|
|
isLoading: true
|
|
|
});
|
|
|
} else {
|
|
|
// 由于 userLogin 是网络请求,可能会在 Page.onLoad 之后才返回
|
|
|
// 所以此处加入 callback 以防止这种情况
|
|
|
app.globalData.userLoginCallback = (res) => {
|
|
|
this.setData({
|
|
|
isLogin: app.globalData.isLogin,
|
|
|
hasUserInfo: app.globalData.hasUserInfo,
|
|
|
agencyStatus: app.globalData.loginUserInfo.agencyStatus,
|
|
|
corpUserFlag: app.globalData.loginUserInfo.corpUserFlag,
|
|
|
userInfo: app.globalData.loginUserInfo,
|
|
|
serviceInfo: app.globalData.serviceInfo
|
|
|
});
|
|
|
console.log(that.serviceInfo);
|
|
|
};
|
|
|
console.log(that.serviceInfo);
|
|
|
}
|
|
|
//登录=================================end
|
|
|
|
|
|
this.getHopeJobLabels();
|
|
|
let agencyUserId = options.agencyUserId;
|
|
|
if (agencyUserId) {
|
|
|
uni.setStorageSync('storageSyncAgencyUserId', agencyUserId);
|
|
|
console.log('agencyUserId', agencyUserId);
|
|
|
app.globalData.isCommission = 1;
|
|
|
}
|
|
|
},
|
|
|
onReady() {
|
|
|
let that = this;
|
|
|
},
|
|
|
onShow() {
|
|
|
let that = this;
|
|
|
that.storeJobListSearchForm.pageNum = 1;
|
|
|
console.log(that.from);
|
|
|
if (uni.getStorageSync('FROMCITY')) {
|
|
|
try {
|
|
|
var searchCityParamStorage = uni.getStorageSync('searchCityParamStorage');
|
|
|
if (searchCityParamStorage) {
|
|
|
console.log('searchCityParamStorage======', searchCityParamStorage);
|
|
|
that.storeJobListSearchForm.cityName = searchCityParamStorage.name;
|
|
|
if (app.globalData.isEmptyCheck(searchCityParamStorage.name)) {
|
|
|
that.storeJobListSearchForm.cityName = '';
|
|
|
}
|
|
|
that.setData({
|
|
|
searchCityParamStorage: searchCityParamStorage,
|
|
|
storeJobListSearchForm: that.storeJobListSearchForm
|
|
|
});
|
|
|
that.setData({
|
|
|
recordList: []
|
|
|
});
|
|
|
this.getJobList();
|
|
|
}
|
|
|
} catch (e) {
|
|
|
console.log('CatchClause', e);
|
|
|
console.log('CatchClause', e);
|
|
|
console.log('获取缓存设置的查询职位列表参数错误:', e);
|
|
|
}
|
|
|
uni.removeStorageSync('FROMCITY');
|
|
|
} else {
|
|
|
// that.setData({
|
|
|
// recordList: [],
|
|
|
// });
|
|
|
// that.getJobList();
|
|
|
}
|
|
|
if (app.globalData.isNotEmptyCheck(uni.getStorageSync('projectSearch')) && that.from == 'project') {
|
|
|
console.log(uni.getStorageSync('projectSearch'));
|
|
|
that.setData({
|
|
|
historyList: uni.getStorageSync('projectSearch')
|
|
|
});
|
|
|
}
|
|
|
if (that.from == 'filter') {
|
|
|
console.log(123);
|
|
|
that.storeJobListSearchForm.keys = '1';
|
|
|
that.setData({
|
|
|
isFilterPage: true,
|
|
|
recordList: []
|
|
|
});
|
|
|
that.getJobList();
|
|
|
uni.setNavigationBarTitle({
|
|
|
title: '职位匹配'
|
|
|
});
|
|
|
}
|
|
|
this.setData({
|
|
|
storeJobListSearchForm: that.storeJobListSearchForm,
|
|
|
isLogin: app.globalData.isLogin,
|
|
|
iosDialog2: app.globalData.isLogin ? false : that.iosDialog2,
|
|
|
recordBillType: ''
|
|
|
});
|
|
|
console.log(app.globalData);
|
|
|
setTimeout(() => {
|
|
|
if (app.globalData.isLogin) {
|
|
|
that.setData({
|
|
|
agencyStatus: app.globalData.loginUserInfo.agencyStatus,
|
|
|
corpUserFlag: app.globalData.loginUserInfo.corpUserFlag,
|
|
|
userInfo: app.globalData.loginUserInfo,
|
|
|
serviceInfo: app.globalData.serviceInfo
|
|
|
});
|
|
|
console.log(app.globalData.loginUserInfo);
|
|
|
} else {
|
|
|
that.setData({
|
|
|
serviceInfo: app.globalData.serviceInfo
|
|
|
});
|
|
|
this.wxLogin();
|
|
|
}
|
|
|
}, 100);
|
|
|
console.log(app.globalData.headers);
|
|
|
// if (that.data.inputVal != "") {
|
|
|
// console.log(that.data.inputVal);
|
|
|
// that.setData({
|
|
|
// recordList: [],
|
|
|
// });
|
|
|
|
|
|
// that.getJobList();
|
|
|
// }
|
|
|
|
|
|
uni.removeStorage({
|
|
|
key: 'townsManInfo'
|
|
|
});
|
|
|
uni.removeStorage({
|
|
|
key: 'townsManInfoJob'
|
|
|
});
|
|
|
|
|
|
/*this.wxLogin();
|
|
|
let res = wx.getStorageSync({
|
|
|
key: "storeJobId"
|
|
|
}); //详情页返回
|
|
|
if (app.isEmptyCheck(res.data)) {
|
|
|
this.setData({
|
|
|
recordList: []
|
|
|
});
|
|
|
} else {
|
|
|
wx.removeStorageSync({
|
|
|
key: "storeJobId"
|
|
|
});
|
|
|
}
|
|
|
console.log("on show");
|
|
|
this.getHopeJobLabels();
|
|
|
var reset = true;*/
|
|
|
},
|
|
|
onHide() {
|
|
|
console.log('hide');
|
|
|
uni.removeStorageSync('searchJobListParamStorage');
|
|
|
uni.removeStorageSync('searchCityParamStorage');
|
|
|
this.setData({
|
|
|
whichOneShow: ''
|
|
|
});
|
|
|
},
|
|
|
onUnload() {
|
|
|
console.log('destory');
|
|
|
},
|
|
|
methods: {
|
|
|
// onPullDownRefresh:function(){
|
|
|
// this.getJobList();
|
|
|
// console.log(123);
|
|
|
|
|
|
// wx.stopPullDownRefresh({
|
|
|
// success() {
|
|
|
// app.refreshSuccess();
|
|
|
// }
|
|
|
// });
|
|
|
// },
|
|
|
goLogin() {
|
|
|
uni.setStorageSync('comeFromPage', 'index');
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/login/index'
|
|
|
});
|
|
|
},
|
|
|
|
|
|
close() {
|
|
|
let that = this;
|
|
|
let brandList = that.brandList;
|
|
|
let selectBrandList = that.selectBrandList;
|
|
|
if (selectBrandList.length > 0) {
|
|
|
for (let i = 0; i < brandList.length; i++) {
|
|
|
console.log('level1');
|
|
|
for (let j = 0; j < selectBrandList.length; j++) {
|
|
|
console.log('level2');
|
|
|
if (brandList[i].id == selectBrandList[j].id) {
|
|
|
return (brandList[i].checked = true);
|
|
|
} else {
|
|
|
brandList[i].checked = false;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
brandList.forEach((item) => {
|
|
|
item.checked = false;
|
|
|
});
|
|
|
}
|
|
|
return brandList;
|
|
|
},
|
|
|
|
|
|
closeFix: function () {
|
|
|
var that = this;
|
|
|
// let brandList = that.close()
|
|
|
// that.data.brandList.forEach((item) => {
|
|
|
// if (that.data.selectBrandList.length > 0) {
|
|
|
// that.data.selectBrandList.forEach((item1) => {
|
|
|
// if (item.id != item1.id) {
|
|
|
// console.log("isSame");
|
|
|
// item.checked = false;
|
|
|
// console.log(item.checked);
|
|
|
// } else {
|
|
|
// item.checked = true;
|
|
|
// }
|
|
|
// });
|
|
|
// } else {
|
|
|
// item.checked = false;
|
|
|
// }
|
|
|
// });
|
|
|
// console.log(that.data.brandList);
|
|
|
// console.log(that.data.selectBrandList);
|
|
|
console.log('isout');
|
|
|
},
|
|
|
|
|
|
touchStart(e) {
|
|
|
// console.log("滚起来", e);
|
|
|
// this.setData({
|
|
|
// scrollStop: false
|
|
|
// })
|
|
|
this.setData({
|
|
|
// whichOneShow: mark,
|
|
|
siv: ''
|
|
|
});
|
|
|
},
|
|
|
|
|
|
choosenTop(e) {
|
|
|
var that = this;
|
|
|
// that.data.storeJobListSearchForm.pageNum = 1;
|
|
|
let id = e.currentTarget.dataset.id;
|
|
|
console.log(id);
|
|
|
that.setData({
|
|
|
toped: id
|
|
|
// isScrollTop: false,
|
|
|
});
|
|
|
|
|
|
// 切换标准 简版 重新查询列表
|
|
|
// that.data.storeJobListSearchForm.pageNum = 1;
|
|
|
// that.setData({
|
|
|
// toped: id,
|
|
|
// recordList: [],
|
|
|
// });
|
|
|
// that.getJobList();
|
|
|
},
|
|
|
|
|
|
chooseNl: function (e) {
|
|
|
var that = this;
|
|
|
console.log(e);
|
|
|
let mark = '';
|
|
|
let type = e.target.dataset.type;
|
|
|
let whichOneShow = that.whichOneShow;
|
|
|
if (!that.isLogin) {
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/login/index'
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
if (type == 'gj') {
|
|
|
if (whichOneShow == 'gj') {
|
|
|
mark = '';
|
|
|
} else {
|
|
|
mark = 'gj';
|
|
|
}
|
|
|
} else if (type == 'sex') {
|
|
|
if (whichOneShow == 'sex') {
|
|
|
mark = '';
|
|
|
} else {
|
|
|
mark = 'sex';
|
|
|
}
|
|
|
} else if (type == 'brand') {
|
|
|
if (whichOneShow == 'brand') {
|
|
|
mark = '';
|
|
|
} else {
|
|
|
mark = 'brand';
|
|
|
}
|
|
|
} else if (type == 'special') {
|
|
|
if (whichOneShow == 'special') {
|
|
|
mark = '';
|
|
|
} else {
|
|
|
mark = 'special';
|
|
|
}
|
|
|
}
|
|
|
if (that.siv != 'menu') {
|
|
|
setTimeout(() => {
|
|
|
that.setData({
|
|
|
whichOneShow: mark
|
|
|
// siv:'menu'
|
|
|
});
|
|
|
console.log(this.whichOneShow);
|
|
|
}, 0);
|
|
|
that.setData({
|
|
|
siv: 'menu'
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
|
|
|
toSpecialArea: function (e) {
|
|
|
var id = e.currentTarget.dataset.id;
|
|
|
uni.navigateTo({
|
|
|
url: '../specialArea/index?id=' + id
|
|
|
});
|
|
|
},
|
|
|
|
|
|
chooseM: function (e) {
|
|
|
var str = e.currentTarget.dataset.id;
|
|
|
console.log(str);
|
|
|
this.setData({
|
|
|
activez: str
|
|
|
});
|
|
|
},
|
|
|
|
|
|
watch() {},
|
|
|
|
|
|
choosen: function (e) {
|
|
|
var str = e.currentTarget.dataset.id;
|
|
|
// var ageStr = e.currentTarget.dataset.str;
|
|
|
this.setData({
|
|
|
sexid: str
|
|
|
});
|
|
|
},
|
|
|
|
|
|
choiceSex(e) {
|
|
|
var that = this;
|
|
|
// let str = that.data.sexid
|
|
|
console.log(e);
|
|
|
let str = e.currentTarget.dataset.id;
|
|
|
console.log(str);
|
|
|
if (str == '1') {
|
|
|
this.secondMenu = '男生';
|
|
|
} else if (str == '2') {
|
|
|
this.secondMenu = '女生';
|
|
|
} else if (str == '-1') {
|
|
|
this.secondMenu = '不限';
|
|
|
}
|
|
|
that.setData({
|
|
|
sexid: str,
|
|
|
secondMenu: this.secondMenu
|
|
|
});
|
|
|
that.storeJobListSearchForm.pageNum = 1;
|
|
|
that.storeJobListSearchForm.sex = str;
|
|
|
that.setData({
|
|
|
storeJobListSearchForm: that.storeJobListSearchForm,
|
|
|
recordList: []
|
|
|
});
|
|
|
that.getJobList().then(() => {
|
|
|
that.setData({
|
|
|
siv: 'menu',
|
|
|
whichOneShow: ''
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
|
|
|
onScrollRefresh: function () {
|
|
|
var that = this;
|
|
|
that.storeJobListSearchForm.pageNum = 1;
|
|
|
that.setData({
|
|
|
recordList: []
|
|
|
});
|
|
|
that.getJobList();
|
|
|
|
|
|
// setTimeout(function(){
|
|
|
// that.setData({
|
|
|
// recordList: [],: false,
|
|
|
// })
|
|
|
// },2000);
|
|
|
},
|
|
|
|
|
|
cc: function () {},
|
|
|
|
|
|
close: function () {
|
|
|
this.setData({
|
|
|
dialog1: false,
|
|
|
dialog2: false,
|
|
|
iosDialog1: false,
|
|
|
iosDialog2: false,
|
|
|
phoneDialog: false
|
|
|
});
|
|
|
},
|
|
|
|
|
|
openIOS1: function () {
|
|
|
this.setData({
|
|
|
iosDialog1: true
|
|
|
});
|
|
|
},
|
|
|
|
|
|
openIOS2: function () {
|
|
|
this.setData({
|
|
|
iosDialog2: true
|
|
|
});
|
|
|
},
|
|
|
|
|
|
showphone: function () {
|
|
|
this.setData({
|
|
|
phoneDialog: true
|
|
|
});
|
|
|
},
|
|
|
|
|
|
searchKey: function (e) {
|
|
|
console.log(e);
|
|
|
if (this.inputVal.trim() == '' && this.placeholderText == '请输入关键词') {
|
|
|
uni.showToast({
|
|
|
title: '请输入内容',
|
|
|
icon: 'none'
|
|
|
});
|
|
|
} else {
|
|
|
this.setData({
|
|
|
isWannaShow: false,
|
|
|
recordList: []
|
|
|
});
|
|
|
console.log(this.placeholderText);
|
|
|
this.storeJobListSearchForm.pageNum = 1;
|
|
|
this.storeJobListSearchForm.keys = this.inputVal || this.placeholderText;
|
|
|
this.setData({
|
|
|
inputVal: this.inputVal || this.placeholderText
|
|
|
});
|
|
|
this.getJobList();
|
|
|
this.setHistoryList();
|
|
|
}
|
|
|
},
|
|
|
|
|
|
setHistoryList() {
|
|
|
let that = this;
|
|
|
if (app.globalData.isNotEmptyCheck(uni.getStorageSync('projectSearch'))) {
|
|
|
that.historyList = uni.getStorageSync('projectSearch');
|
|
|
}
|
|
|
if (that.historyList.indexOf(that.inputVal) > -1) {
|
|
|
that.historyList.splice(that.historyList.indexOf(that.inputVal), 1);
|
|
|
that.historyList.unshift(that.inputVal);
|
|
|
} else {
|
|
|
that.historyList.unshift(that.inputVal);
|
|
|
}
|
|
|
if (that.historyList.length > 10) {
|
|
|
that.historyList = that.historyList.splice(0, 10);
|
|
|
}
|
|
|
that.setData({
|
|
|
historyList: that.historyList
|
|
|
});
|
|
|
uni.setStorageSync('projectSearch', that.funQC(that.historyList));
|
|
|
},
|
|
|
|
|
|
showInput: function () {
|
|
|
this.setData({
|
|
|
inputShowed: true
|
|
|
});
|
|
|
},
|
|
|
|
|
|
hideInput: function () {
|
|
|
this.setData({
|
|
|
inputVal: '',
|
|
|
inputShowed: false
|
|
|
});
|
|
|
},
|
|
|
|
|
|
onShareAppMessage1: function () {
|
|
|
var path = commonUtil.getCurrentPageUrlWithArgs();
|
|
|
if (app.globalData.isLogin && app.globalData.agencyStatus - 0 != 0) {
|
|
|
//当前用户是代理人
|
|
|
path += (path.indexOf('?') >= 0 ? '&' : '?') + 'agencyUserId=' + app.globalData.loginUserInfo.id;
|
|
|
}
|
|
|
console.log(path);
|
|
|
return {
|
|
|
title: '伯才',
|
|
|
path: path
|
|
|
};
|
|
|
},
|
|
|
|
|
|
clearInput: function () {
|
|
|
this.setData({
|
|
|
inputVal: '',
|
|
|
chaShowed: false,
|
|
|
inputShowed: false,
|
|
|
hasMoreData: true,
|
|
|
recordList: [],
|
|
|
isWannaShow: true,
|
|
|
placeholderText: '请输入关键词'
|
|
|
});
|
|
|
this.inputBlur();
|
|
|
this.clearFilter();
|
|
|
this.storeJobListSearchForm.pageNum = 1;
|
|
|
this.storeJobListSearchForm.keys = '';
|
|
|
},
|
|
|
|
|
|
inputTyping: function (e) {
|
|
|
this.setData({
|
|
|
inputVal: e.detail.value
|
|
|
});
|
|
|
console.log(this.inputVal == '');
|
|
|
if (this.inputVal == '') {
|
|
|
this.setData({
|
|
|
recordList: [],
|
|
|
isWannaShow: true
|
|
|
});
|
|
|
this.storeJobListSearchForm.pageNum = 1;
|
|
|
this.storeJobListSearchForm.keys = '';
|
|
|
// this.getJobList();
|
|
|
}
|
|
|
},
|
|
|
|
|
|
clear() {
|
|
|
uni.clearStorage();
|
|
|
console.log('清除成功');
|
|
|
},
|
|
|
|
|
|
inputBlur() {},
|
|
|
|
|
|
getListByTypeAndIndustry: function () {
|
|
|
var that = this;
|
|
|
uni.request({
|
|
|
url: app.globalData.ip + '/labels/getListByTypeAndIndustry',
|
|
|
data: {
|
|
|
type: 90,
|
|
|
industry: 2
|
|
|
},
|
|
|
header: app.globalData.header,
|
|
|
method: 'GET',
|
|
|
success: function (res) {
|
|
|
console.log(res.data.data);
|
|
|
// that.setData({
|
|
|
// tagArray0: [],
|
|
|
// tagArray1: [],
|
|
|
// tagArray2: [],
|
|
|
// tagArray3: [],
|
|
|
// });
|
|
|
res.data.data.forEach((item) => {
|
|
|
if (item.typeClassify == '0') {
|
|
|
that.tagArray0.push(item);
|
|
|
} else if (item.typeClassify == '1') {
|
|
|
that.tagArray1.push(item);
|
|
|
} else if (item.typeClassify == '2') {
|
|
|
that.tagArray2.push(item);
|
|
|
} else if (item.typeClassify == '3') {
|
|
|
that.tagArray3.push(item);
|
|
|
}
|
|
|
});
|
|
|
that.setData({
|
|
|
tagArray0: that.tagArray0,
|
|
|
tagArray1: that.tagArray1,
|
|
|
tagArray2: that.tagArray2,
|
|
|
tagArray3: that.tagArray3
|
|
|
});
|
|
|
var jobSpecialLabelIdArray = that.storeJobListSearchForm.jobSpecialLabelIds.split(',');
|
|
|
res.data.data.forEach((item) => {
|
|
|
item['checked'] = false;
|
|
|
jobSpecialLabelIdArray.forEach((item1) => {
|
|
|
if (item.id == item1) {
|
|
|
item['checked'] = true;
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
that.setData({
|
|
|
jobSpecialLabelList: res.data.data
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
getBrandNameAllList: function () {
|
|
|
var that = this;
|
|
|
uni.request({
|
|
|
url: app.globalData.ip + '/labels/type/95',
|
|
|
// 分类列表获取接口
|
|
|
header: app.globalData.header,
|
|
|
method: 'GET',
|
|
|
success: function (res) {
|
|
|
console.log(res);
|
|
|
if (res.data.status == 200) {
|
|
|
if (that.storeJobListSearchForm.brandIds) {
|
|
|
var brandIdArray = that.storeJobListSearchForm.brandIds.split(',');
|
|
|
}
|
|
|
console.log(res.data.data.labels);
|
|
|
res.data.data.labels.forEach((item) => {
|
|
|
item['checked'] = false;
|
|
|
if (brandIdArray) {
|
|
|
brandIdArray.forEach((item1) => {
|
|
|
if (item.id == item1) {
|
|
|
item['checked'] = true;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
that.setData({
|
|
|
brandList: res.data.data.labels
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
// wx.request({
|
|
|
// url: app.globalData.ip + "/brand/getBrandNameAllList",
|
|
|
// data: {},
|
|
|
// header: app.globalData.header,
|
|
|
// method: "GET",
|
|
|
// success: function (res) {
|
|
|
// console.log(res);
|
|
|
|
|
|
// var brandIdArray = that.data.storeJobListSearchForm.brandIds.split(",");
|
|
|
|
|
|
// res.data.data.pageBean.forEach((item) => {
|
|
|
// item["checked"] = false;
|
|
|
// brandIdArray.forEach((item1) => {
|
|
|
// if (item.id == item1) {
|
|
|
// item["checked"] = true;
|
|
|
// }
|
|
|
// });
|
|
|
// });
|
|
|
// that.setData({
|
|
|
// brandList: res.data.data,
|
|
|
// });
|
|
|
// },
|
|
|
// });
|
|
|
},
|
|
|
|
|
|
selectJobSpecialLabel: function (e) {
|
|
|
var that = this;
|
|
|
var index = e.currentTarget.dataset.index;
|
|
|
var indexTag = e.currentTarget.dataset.indexTag;
|
|
|
console.log(e);
|
|
|
console.log(indexTag);
|
|
|
// debugger;
|
|
|
if (indexTag == '0') {
|
|
|
if (that.tagArray0[index].checked) {
|
|
|
that.tagArray0[index].checked = false;
|
|
|
// index1 = that.data.selectJobList.indexOf(that.data.tagArray0[index]);
|
|
|
// that.data.selectJobList.splice(index1, 1);
|
|
|
} else {
|
|
|
that.tagArray0[index].checked = true;
|
|
|
// that.data.selectJobList.push(that.data.tagArray0[index]);
|
|
|
}
|
|
|
this.setData({
|
|
|
tagArray0: that.tagArray0
|
|
|
});
|
|
|
} else if (indexTag == '1') {
|
|
|
console.log('indexTag == "1"');
|
|
|
if (that.tagArray1[index].checked) {
|
|
|
that.tagArray1[index].checked = false;
|
|
|
// index1 = that.data.selectJobList.indexOf(that.data.tagArray1[index]);
|
|
|
// that.data.selectJobList.splice(index1, 1);
|
|
|
} else {
|
|
|
that.tagArray1[index].checked = true;
|
|
|
// that.data.selectJobList.push(that.data.tagArray1[index]);
|
|
|
}
|
|
|
this.setData({
|
|
|
tagArray1: that.tagArray1
|
|
|
});
|
|
|
} else if (indexTag == '2') {
|
|
|
if (that.tagArray2[index].checked) {
|
|
|
that.tagArray2[index].checked = false;
|
|
|
// index1 = that.data.selectJobList.indexOf(that.data.tagArray2[index]);
|
|
|
// that.data.selectJobList.splice(index1, 1);
|
|
|
} else {
|
|
|
that.tagArray2[index].checked = true;
|
|
|
// that.data.selectJobList.push(that.data.tagArray2[index]);
|
|
|
}
|
|
|
this.setData({
|
|
|
tagArray2: that.tagArray2
|
|
|
});
|
|
|
} else if (indexTag == '3') {
|
|
|
if (that.tagArray3[index].checked) {
|
|
|
that.tagArray3[index].checked = false;
|
|
|
// index1 = that.data.selectJobList.indexOf(that.data.tagArray3[index]);
|
|
|
// that.data.selectJobList.splice(index1, 1);
|
|
|
} else {
|
|
|
that.tagArray3[index].checked = true;
|
|
|
// that.data.selectJobList.push(that.data.tagArray3[index]);
|
|
|
}
|
|
|
this.setData({
|
|
|
tagArray3: that.tagArray3
|
|
|
});
|
|
|
}
|
|
|
this.setData({
|
|
|
selectJobList: that.selectJobList
|
|
|
});
|
|
|
// jobSpecialLabelList
|
|
|
|
|
|
// if(that.data.jobSpecialLabelList[index].checked) {
|
|
|
// that.data.jobSpecialLabelList[index].checked = false;
|
|
|
// } else {
|
|
|
// that.data.jobSpecialLabelList[index].checked = true;
|
|
|
// }
|
|
|
// this.setData({
|
|
|
// jobSpecialLabelList: that.data.jobSpecialLabelList
|
|
|
// });
|
|
|
},
|
|
|
|
|
|
selectBrand: function (e) {
|
|
|
var that = this;
|
|
|
var index = e.currentTarget.dataset.index;
|
|
|
if (that.brandList[index].checked) {
|
|
|
that.brandList[index].checked = false;
|
|
|
// let index1 = that.data.selectBrandList.indexOf(that.data.brandList[index])
|
|
|
// that.data.selectBrandList.splice(index1,1)
|
|
|
} else {
|
|
|
that.brandList[index].checked = true;
|
|
|
}
|
|
|
console.log(that.selectBrandList);
|
|
|
this.setData({
|
|
|
brandList: that.brandList
|
|
|
});
|
|
|
},
|
|
|
|
|
|
reset: function (e) {
|
|
|
var that = this;
|
|
|
console.log(e);
|
|
|
if (e.target.dataset.type == 1) {
|
|
|
//特色
|
|
|
that.jobSpecialLabelList.forEach((item) => {
|
|
|
// console.log(item);
|
|
|
if (item.checked) {
|
|
|
item.checked = false;
|
|
|
}
|
|
|
});
|
|
|
that.setData({
|
|
|
jobSpecialLabelList: that.jobSpecialLabelList,
|
|
|
tagArray0: that.tagArray0,
|
|
|
tagArray1: that.tagArray1,
|
|
|
tagArray2: that.tagArray2,
|
|
|
tagArray3: that.tagArray3,
|
|
|
selectJobList: [],
|
|
|
whichOneShow: ''
|
|
|
});
|
|
|
that.storeJobListSearchForm.jobSpecialLabelIds = '';
|
|
|
} else if (e.target.dataset.type == 2) {
|
|
|
//品牌
|
|
|
that.brandList.forEach((item) => {
|
|
|
if (item.checked) {
|
|
|
item.checked = false;
|
|
|
}
|
|
|
});
|
|
|
that.setData({
|
|
|
brandList: that.brandList,
|
|
|
selectBrandList: [],
|
|
|
whichOneShow: ''
|
|
|
});
|
|
|
that.storeJobListSearchForm.jobCategoryLabelIds = '';
|
|
|
// that.data.storeJobListSearchForm.brandIds = "";
|
|
|
} else if (e.target.dataset.type == 4) {
|
|
|
that.setData({
|
|
|
activez: ''
|
|
|
});
|
|
|
}
|
|
|
that.storeJobListSearchForm.pageNum = 1;
|
|
|
that.setData({
|
|
|
recordList: []
|
|
|
});
|
|
|
that.getJobList();
|
|
|
},
|
|
|
|
|
|
loginOut: function () {
|
|
|
var that = this;
|
|
|
var jobSpecialLabelIdArray = [];
|
|
|
that.jobSpecialLabelList.forEach((item) => {
|
|
|
if (item.checked) {
|
|
|
jobSpecialLabelIdArray.push(item.id);
|
|
|
}
|
|
|
});
|
|
|
if (jobSpecialLabelIdArray.length > 0) {
|
|
|
that.storeJobListSearchForm.jobSpecialLabelIds = jobSpecialLabelIdArray.join(',');
|
|
|
} else {
|
|
|
that.storeJobListSearchForm.jobSpecialLabelIds = '';
|
|
|
}
|
|
|
var brandIdArray = [];
|
|
|
that.selectBrandList = [];
|
|
|
that.brandList.forEach((item) => {
|
|
|
if (item.checked) {
|
|
|
if (that.selectBrandList.indexOf(item) == -1) {
|
|
|
that.selectBrandList.push(item);
|
|
|
}
|
|
|
brandIdArray.push(item.id);
|
|
|
}
|
|
|
});
|
|
|
that.selectJobList = [];
|
|
|
let jobList = that.tagArray0.concat(that.tagArray1, that.tagArray2, that.tagArray3);
|
|
|
jobList.forEach((item) => {
|
|
|
if (item.checked) {
|
|
|
if (that.selectJobList.indexOf(item) == -1) {
|
|
|
that.selectJobList.push(item);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
if (brandIdArray.length > 0) {
|
|
|
// that.data.storeJobListSearchForm.brandIds = brandIdArray.join(",");
|
|
|
that.storeJobListSearchForm.jobCategoryLabelIds = brandIdArray.join(',');
|
|
|
} else {
|
|
|
// that.data.storeJobListSearchForm.brandIds = "";
|
|
|
that.storeJobListSearchForm.jobCategoryLabelIds = '';
|
|
|
}
|
|
|
that.storeJobListSearchForm.pageNum = 1;
|
|
|
that.setData({
|
|
|
recordList: [],
|
|
|
siv: '',
|
|
|
whichOneShow: '',
|
|
|
selectBrandList: that.selectBrandList,
|
|
|
selectJobList: that.selectJobList
|
|
|
});
|
|
|
that.getJobList();
|
|
|
},
|
|
|
|
|
|
onTabClick(e) {
|
|
|
const index = e.detail.index;
|
|
|
this.setData({
|
|
|
activeTab: index
|
|
|
});
|
|
|
},
|
|
|
|
|
|
onChange(e) {
|
|
|
const index = e.detail.index;
|
|
|
this.setData({
|
|
|
activeTab: index
|
|
|
});
|
|
|
},
|
|
|
|
|
|
findLocation() {
|
|
|
var that = this;
|
|
|
uni.getLocation({
|
|
|
type: 'gcj02',
|
|
|
success(res1) {
|
|
|
console.log('获取位置2');
|
|
|
console.log(res1);
|
|
|
app.globalData.lng = res1.longitude;
|
|
|
app.globalData.lat = res1.latitude;
|
|
|
},
|
|
|
fail() {}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
emptyMethod(e) {
|
|
|
console.log(e);
|
|
|
},
|
|
|
|
|
|
chooseIdCard() {
|
|
|
var that = this;
|
|
|
if (that.agencyStatus != 1) {
|
|
|
this.setData({
|
|
|
iosDialog: true
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
uni.chooseImage({
|
|
|
count: 1,
|
|
|
sizeType: ['original', 'compressed'],
|
|
|
sourceType: ['album', 'camera'],
|
|
|
success(res) {
|
|
|
console.log(res);
|
|
|
uni.navigateTo({
|
|
|
url: `../newEnroll/enroll/index?applyType=1&imgUrl=${res.tempFilePaths[0]}`
|
|
|
});
|
|
|
// that.uploadIdcardImg(res);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
navigatorToRecord() {
|
|
|
if (this.agencyStatus != 1) {
|
|
|
this.setData({
|
|
|
iosDialog: true
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
uni.navigateTo({
|
|
|
url: `../newEnroll/enroll/index?applyType=1`
|
|
|
});
|
|
|
},
|
|
|
|
|
|
PageScroll(e) {
|
|
|
let that = this;
|
|
|
const query = uni.createSelectorQuery().in(this);
|
|
|
query
|
|
|
.select('.sticky')
|
|
|
.boundingClientRect(function (res) {
|
|
|
console.log(res);
|
|
|
if (res.top <= 5) {
|
|
|
that.setData({
|
|
|
isScrollTop: true
|
|
|
});
|
|
|
} else if (res.top > 0 && res.top < 90) {
|
|
|
that.setData({
|
|
|
isScrollTop: false
|
|
|
});
|
|
|
} else if (res.top >= 90) {
|
|
|
that.setData({
|
|
|
isScrollTop: false
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
.exec();
|
|
|
},
|
|
|
|
|
|
collectedStoreJobList() {
|
|
|
var that = this;
|
|
|
uni.request({
|
|
|
url: app.globalData.ip + '/store/job/collected/list?ujc=1',
|
|
|
method: 'GET',
|
|
|
data: {},
|
|
|
header: app.globalData.headers,
|
|
|
success: function (res) {
|
|
|
console.log(res);
|
|
|
let collectList = res.data.data.pageBean.recordList;
|
|
|
let jobs = that.recordList;
|
|
|
if (
|
|
|
collectList != null &&
|
|
|
collectList != '' &&
|
|
|
collectList != undefined &&
|
|
|
collectList.length != 0 &&
|
|
|
jobs != null &&
|
|
|
jobs != '' &&
|
|
|
jobs != undefined &&
|
|
|
jobs.length != 0
|
|
|
) {
|
|
|
for (var j = 0; j != jobs.length; ++j) {
|
|
|
jobs[j].collected = 2;
|
|
|
}
|
|
|
for (var i = 0; i != collectList.length; ++i) {
|
|
|
for (var j = 0; j != jobs.length; ++j) {
|
|
|
if (collectList[i].storeJobId - jobs[j].id == 0) {
|
|
|
jobs[j].collected = 1;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
that.setData({
|
|
|
recordList: jobs
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
fail: function (res) {}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
getHopeJobLabels() {
|
|
|
var that = this;
|
|
|
uni.request({
|
|
|
url: app.globalData.ip + '/labels/findAllHopeJobLabels',
|
|
|
// ?category=4
|
|
|
method: 'GET',
|
|
|
data: {},
|
|
|
success: function (res0) {
|
|
|
console.log('感兴趣职位 ↓↓↓');
|
|
|
console.log(res0);
|
|
|
if (res0.data.data != null) {
|
|
|
res0.data.data.forEach((item, index) => {
|
|
|
item['title'] = item.name;
|
|
|
item['checked'] = false;
|
|
|
if (index == 0 || index == 1) {
|
|
|
item['checked'] = true;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
that.setData({
|
|
|
labelItems: res0.data.data == null ? [] : res0.data.data
|
|
|
});
|
|
|
that.initData();
|
|
|
console.log('感兴趣职位 赋值title↓↓↓');
|
|
|
console.log(res0);
|
|
|
},
|
|
|
fail: function (res) {
|
|
|
console.log(res);
|
|
|
uni.showToast({
|
|
|
title: '获取失败',
|
|
|
icon: 'none',
|
|
|
duration: 2000
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
makePhoneCall() {
|
|
|
var that = this;
|
|
|
uni.makePhoneCall({
|
|
|
phoneNumber: '13937184434'
|
|
|
});
|
|
|
},
|
|
|
|
|
|
goScreen() {
|
|
|
uni.navigateTo({
|
|
|
url: '../screen/index'
|
|
|
});
|
|
|
},
|
|
|
|
|
|
goCity() {
|
|
|
let that = this;
|
|
|
console.log('search');
|
|
|
if (!that.isLogin) {
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/login/index'
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
uni.navigateTo({
|
|
|
url: '../city/index?from=search'
|
|
|
});
|
|
|
uni.setStorageSync('SEARCH_VAL', that.storeJobListSearchForm.keys);
|
|
|
},
|
|
|
|
|
|
initData() {
|
|
|
var that = this;
|
|
|
try {
|
|
|
// 获取手机基础信息(头状态栏和标题栏高度)
|
|
|
let systemInfo = uni.getSystemInfoSync();
|
|
|
let getMenuButtonBoundingClientRect = uni.getMenuButtonBoundingClientRect();
|
|
|
console.log(uni.getMenuButtonBoundingClientRect());
|
|
|
this.setData({
|
|
|
systemInfo,
|
|
|
getMenuButtonBoundingClientRect
|
|
|
});
|
|
|
} catch (e) {
|
|
|
console.log('CatchClause', e);
|
|
|
console.log('CatchClause', e);
|
|
|
console.log(e);
|
|
|
uni.alert({
|
|
|
title: '温馨提示',
|
|
|
content: 'onLoad 执行异常'
|
|
|
});
|
|
|
}
|
|
|
let res0 = uni.getStorageSync('checkedlabelItems');
|
|
|
console.log(app.globalData.isNotEmptyCheck(res0.data));
|
|
|
that.tabs2 = [
|
|
|
{
|
|
|
name: '打勾推荐',
|
|
|
category: -1,
|
|
|
id: 406,
|
|
|
checked: true,
|
|
|
title: '打勾推荐'
|
|
|
}
|
|
|
];
|
|
|
if (app.globalData.isNotEmptyCheck(res0.data)) {
|
|
|
for (var i = 0; i < res0.data.length; i++) {
|
|
|
res0.data[i]['title'] = res0.data[i].name;
|
|
|
// that.data.tabs2.push(res0.data[i]);
|
|
|
}
|
|
|
console.log('获取缓存'); // res0.data.unshift();
|
|
|
// console.log(res.data.unshift({name: "打勾推荐", category: 3, id: 406, checked: true, title: "打勾推荐"}));
|
|
|
} else {
|
|
|
console.log('无感兴趣职位 push两个职位 ↓↓↓');
|
|
|
console.log(that.labelItems);
|
|
|
that.labelItems.forEach((item) => {
|
|
|
if (item.name == '理货员' || item.name == '餐饮服务员') {
|
|
|
// that.data.tabs2.push(item);
|
|
|
}
|
|
|
}); // that.data.tabs2.push(that.data.labelItems[0], that.data.labelItems[1])
|
|
|
}
|
|
|
that.setData({
|
|
|
tabs2: that.tabs2
|
|
|
});
|
|
|
let res = uni.getStorageSync('sex'); //性别
|
|
|
if (app.globalData.isNotEmptyCheck(res.data)) {
|
|
|
that.storeJobListSearchForm.sex = res.data;
|
|
|
that.storeJobListSearchForm.pageNum = 1;
|
|
|
} else {
|
|
|
// res.data = [];
|
|
|
}
|
|
|
let res2 = uni.getStorageSync('checkedJobItems'); //筛选职位
|
|
|
let workTypeStrCurr = '';
|
|
|
if (app.globalData.isNotEmptyCheck(res2.data)) {
|
|
|
res2.data.forEach((item, index) => {
|
|
|
workTypeStrCurr += item.value + ',';
|
|
|
});
|
|
|
if (workTypeStrCurr.length > 0) {
|
|
|
workTypeStrCurr = workTypeStrCurr.substr(0, workTypeStrCurr.length - 1);
|
|
|
}
|
|
|
that.storeJobListSearchForm.workTypeStr = workTypeStrCurr;
|
|
|
that.storeJobListSearchForm.pageNum = 1;
|
|
|
} else {
|
|
|
that.storeJobListSearchForm.workTypeStr = '';
|
|
|
that.storeJobListSearchForm.pageNum = 1;
|
|
|
}
|
|
|
console.log(res.data + '===' + res2.data);
|
|
|
if (res.data == -1 && (res2.data == null || res2.data == '')) {
|
|
|
that.setData({
|
|
|
chooseActive: false
|
|
|
});
|
|
|
} else {
|
|
|
that.setData({
|
|
|
chooseActive: true
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// this.getJobList();
|
|
|
},
|
|
|
|
|
|
getJobList(e) {
|
|
|
console.log(e);
|
|
|
var that = this;
|
|
|
// debugger
|
|
|
return new Promise(function (resolve, reject) {
|
|
|
if (that.storeJobListSearchForm.sortTag == 2) {
|
|
|
//如果按照距离排序,拼接上坐标
|
|
|
that.storeJobListSearchForm.lng = app.globalData.lng;
|
|
|
that.storeJobListSearchForm.lat = app.globalData.lat;
|
|
|
}
|
|
|
console.log(that.inputVal);
|
|
|
console.log(that.searchCityParamStorage);
|
|
|
that.storeJobListSearchForm.cityName = that.searchCityParamStorage.name;
|
|
|
if (app.globalData.isEmptyCheck(that.searchCityParamStorage.name)) {
|
|
|
that.storeJobListSearchForm.cityName = '';
|
|
|
}
|
|
|
that.storeJobListSearchForm.keys = that.inputVal == '' ? '' : that.inputVal;
|
|
|
// debugger;
|
|
|
uni.showLoading({
|
|
|
title: '加载中...'
|
|
|
});
|
|
|
console.log(that.storeJobListSearchForm);
|
|
|
uni.request({
|
|
|
url: app.globalData.ip + '/yishoudan/custom/job/listApp',
|
|
|
method: 'POST',
|
|
|
header: app.globalData.headers,
|
|
|
data: that.storeJobListSearchForm,
|
|
|
success: function (res) {
|
|
|
console.log('职位列表↓↓↓↓');
|
|
|
console.log(res);
|
|
|
that.setData({
|
|
|
totalPage: res.data.data.pageBean.pageCount,
|
|
|
currPage: res.data.data.pageBean.currentPage
|
|
|
});
|
|
|
setTimeout(function () {
|
|
|
that.setData({
|
|
|
triggered: false
|
|
|
});
|
|
|
}, 1000);
|
|
|
if (
|
|
|
res.data.data.pageBean.recordList == null ||
|
|
|
res.data.data.pageBean.recordList.length == 0 ||
|
|
|
res.data.data.pageBean.recordList.length < that.storeJobListSearchForm.pageSize
|
|
|
) {
|
|
|
var jobListTemp = commonUtil.disposeJobListData(res.data.data.pageBean.recordList);
|
|
|
that.recordList = that.recordList.concat(jobListTemp);
|
|
|
that.setData({
|
|
|
recordList: that.recordList,
|
|
|
hasMoreData: false,
|
|
|
isTrigger: false
|
|
|
});
|
|
|
} else {
|
|
|
var jobListTemp = commonUtil.disposeJobListData(res.data.data.pageBean.recordList);
|
|
|
that.recordList = that.recordList.concat(jobListTemp);
|
|
|
that.setData({
|
|
|
recordList: that.recordList,
|
|
|
hasMoreData: true,
|
|
|
isTrigger: false
|
|
|
});
|
|
|
}
|
|
|
uni.hideLoading({
|
|
|
success: (res) => {}
|
|
|
});
|
|
|
that.setData({
|
|
|
loading: false,
|
|
|
pageShow: true,
|
|
|
storeJobListSearchForm: that.storeJobListSearchForm
|
|
|
});
|
|
|
resolve();
|
|
|
that.getTag();
|
|
|
that.recordList.forEach((item, index) => {
|
|
|
if (app.globalData.isNotEmptyCheck(item.returnFeeType) || item.returnFeeType == '0' || item.returnFee == '0') {
|
|
|
item['fuWuFei'] = commonUtil.getReturnFeeTypeName1ById(item.returnFeeType, item.returnFee);
|
|
|
} else {
|
|
|
item['fuWuFei'] = '';
|
|
|
}
|
|
|
});
|
|
|
that.setData({
|
|
|
recordList: that.recordList,
|
|
|
isWannaShow: that.searchCityParamStorage ? false : true
|
|
|
});
|
|
|
setTimeout(() => {
|
|
|
var query = uni.createSelectorQuery();
|
|
|
query.select('.navigator').boundingClientRect();
|
|
|
query.exec(function (res) {
|
|
|
//res就是 所有标签为v1的元素的信息 的数组
|
|
|
console.log(res);
|
|
|
//取高度
|
|
|
console.log(res[0].height);
|
|
|
that.setData({
|
|
|
navigatorBarHeight: res[0].height
|
|
|
});
|
|
|
console.log(that.navigatorBarHeight);
|
|
|
});
|
|
|
}, 300);
|
|
|
// if (that.data.recordList.length < res.data.data.pageBean.recordCount) {
|
|
|
// that.setData({
|
|
|
// hasMoreData: true,
|
|
|
// });
|
|
|
// } else {
|
|
|
// that.setData({
|
|
|
// hasMoreData: false,
|
|
|
// });
|
|
|
// }
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
|
|
|
onScrollRefresh() {
|
|
|
this.recordList = [];
|
|
|
this.storeJobListSearchForm.pageNum = 1;
|
|
|
this.getJobList();
|
|
|
},
|
|
|
|
|
|
getTag() {
|
|
|
let that = this;
|
|
|
let query = uni.createSelectorQuery().in(that);
|
|
|
query
|
|
|
.selectAll('.tttg')
|
|
|
.boundingClientRect()
|
|
|
.exec(function (res) {
|
|
|
res.forEach((item) => {
|
|
|
item.forEach((element, index) => {
|
|
|
if (element.width > 200) {
|
|
|
// that.data.recordList[index].isTagShow = true;
|
|
|
var age = 'recordList[' + index + '].isTagShow';
|
|
|
that.setData({
|
|
|
[age]: true
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
// if(){
|
|
|
|
|
|
// }
|
|
|
// console.log(res);
|
|
|
});
|
|
|
},
|
|
|
|
|
|
// 下拉加载更多
|
|
|
onScrollToLower() {
|
|
|
console.log('====================================================');
|
|
|
var that = this;
|
|
|
if (app.globalData.isLogin) {
|
|
|
that.storeJobListSearchForm.pageNum = that.storeJobListSearchForm.pageNum + 1;
|
|
|
if (that.hasMoreData) {
|
|
|
that.getJobList();
|
|
|
}
|
|
|
// 根据实际数据加载情况设定 loadMore 的值即可,分别为 load 和 over
|
|
|
|
|
|
this.setData({
|
|
|
loadMore: 'load'
|
|
|
// loading:true
|
|
|
});
|
|
|
} else {
|
|
|
// if (that.data.pullNum == 0) {
|
|
|
// that.openIOS1();
|
|
|
// }
|
|
|
}
|
|
|
that.pullNum = that.pullNum + 1;
|
|
|
},
|
|
|
|
|
|
handleTabClick(e) {
|
|
|
var that = this;
|
|
|
var index = e.detail.index;
|
|
|
console.log(e.detail.index);
|
|
|
let categoryCurr = that.tabs2[index].category; // that.data.tabs2.forEach((item,index2) => {
|
|
|
// if (index == index2) {
|
|
|
// categoryCurr = item.category
|
|
|
// }
|
|
|
// if( index == 0){
|
|
|
// categoryCurr = -1
|
|
|
// }
|
|
|
// })
|
|
|
|
|
|
this.setData({
|
|
|
// [tabsName]: index,
|
|
|
contentIndex: index
|
|
|
});
|
|
|
console.log(categoryCurr);
|
|
|
that.storeJobListSearchForm.jobClassify = categoryCurr;
|
|
|
that.storeJobListSearchForm.pageNum = 1;
|
|
|
that.setData({
|
|
|
recordList: []
|
|
|
});
|
|
|
that.getJobList();
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 标准详情
|
|
|
*
|
|
|
*
|
|
|
*/
|
|
|
goDetail(e) {
|
|
|
console.log(e);
|
|
|
var that = this;
|
|
|
if (this.isLogin) {
|
|
|
uni.navigateTo({
|
|
|
url: '../detail/index?storeJobId=' + e.currentTarget.dataset.id + '&wxCode=' + that.wxCode
|
|
|
});
|
|
|
} else {
|
|
|
uni.navigateTo({
|
|
|
url: '../login/index'
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
|
|
|
backIndex() {
|
|
|
console.log(123);
|
|
|
uni.reLaunch({
|
|
|
url: '/pages/firstBill/index',
|
|
|
success: (result) => {},
|
|
|
fail: () => {},
|
|
|
complete: () => {}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 简版抽屉
|
|
|
*
|
|
|
*
|
|
|
*/
|
|
|
goDrawer(event) {
|
|
|
let that = this;
|
|
|
console.log(event.currentTarget.dataset.item);
|
|
|
event.currentTarget.dataset.item['jobDesp'] = event.currentTarget.dataset.item.jobDesp.replace(/\*\*\*\*\*/g, '').split('————————')[0];
|
|
|
event.currentTarget.dataset.item['jobDesp1'] = event.currentTarget.dataset.item.jobDesp.replace(
|
|
|
'⚠',
|
|
|
"<i class='t-icon t-icon-zhuyi' style='margin-bottom:-2px;width:17px;height:17px;background-repeat:no-repeat;background-size:100% 100%'></i>"
|
|
|
);
|
|
|
event.currentTarget.dataset.item['jobDesp1'] = event.currentTarget.dataset.item.jobDesp1.replace(
|
|
|
'[红包]',
|
|
|
"<i class='t-icon t-icon-hongbao' style='margin-bottom:-2px;width:17px;height:17px;background-repeat:no-repeat;background-size:100% 100%'></i>"
|
|
|
);
|
|
|
that.setData({
|
|
|
currentJobDrawer: {
|
|
|
...event.currentTarget.dataset.item,
|
|
|
index: event.currentTarget.dataset.index
|
|
|
},
|
|
|
drawerShow: true
|
|
|
});
|
|
|
console.log(this.currentJobDrawer);
|
|
|
},
|
|
|
|
|
|
copyClose() {
|
|
|
var that = this;
|
|
|
var contentInfo;
|
|
|
const query = uni.createSelectorQuery().in(this);
|
|
|
query
|
|
|
.select('.contactInfo')
|
|
|
.boundingClientRect(function (res) {
|
|
|
contentInfo = res.dataset.info;
|
|
|
var text = that.currentJobDrawer.jobDesp + contentInfo;
|
|
|
uni.setClipboardData({
|
|
|
data: text,
|
|
|
success(res) {
|
|
|
uni.getClipboardData({
|
|
|
success(res) {
|
|
|
console.log(res.data); // data
|
|
|
uni.showToast({
|
|
|
title: '内容已复制',
|
|
|
icon: 'none',
|
|
|
duration: 1500
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
})
|
|
|
.exec();
|
|
|
},
|
|
|
|
|
|
// showDrawer() {
|
|
|
// this.setData({
|
|
|
// });
|
|
|
// },
|
|
|
hideDrawer() {
|
|
|
let that = this;
|
|
|
that.setData({
|
|
|
drawerShow: false
|
|
|
});
|
|
|
setTimeout(() => {
|
|
|
uni.showTabBar({
|
|
|
success(e) {}
|
|
|
});
|
|
|
}, 300);
|
|
|
},
|
|
|
|
|
|
goEnroll(e) {
|
|
|
console.log(e);
|
|
|
// wx.navigateTo({
|
|
|
// url: "../newEnroll/index?applyType=0"
|
|
|
// });
|
|
|
var that = this;
|
|
|
uni.removeStorageSync('townsManInfo');
|
|
|
uni.removeStorageSync('townsManInfoJob');
|
|
|
uni.removeStorageSync('storeInfoJob');
|
|
|
|
|
|
// if(app.isNotEmptyCheck(wx.getStorage('townsManInfo'))){
|
|
|
// wx.removeStorageSync('townsManInfo')
|
|
|
// }
|
|
|
// if(app.isNotEmptyCheck(wx.getStorage('townsManInfoJob'))){
|
|
|
// wx.removeStorageSync('townsManInfoJob')
|
|
|
// }
|
|
|
// if(app.isNotEmptyCheck(wx.getStorage('storeInfoJob'))){
|
|
|
// wx.removeStorageSync('storeInfoJob')
|
|
|
// }
|
|
|
// wx.removeStorageSync('townsManInfoJob')
|
|
|
console.log(app.globalData.loginUserInfo.tel);
|
|
|
uni.setStorageSync('jobDetailStorage', that.recordList[e.currentTarget.dataset.idx]);
|
|
|
let argument;
|
|
|
argument = JSON.stringify(e.currentTarget.dataset.info).replace(/\=|\&/g, '3D');
|
|
|
uni.navigateTo({
|
|
|
url: `../newEnroll/enroll/index?applyType=1&info=${argument}`
|
|
|
});
|
|
|
},
|
|
|
|
|
|
wxLogin() {
|
|
|
var that = this;
|
|
|
uni.login({
|
|
|
success(res) {
|
|
|
if (res.code) {
|
|
|
that.setData({
|
|
|
wxCode: res.code
|
|
|
});
|
|
|
} else {
|
|
|
console.log('获取code失败!' + res.errMsg);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
changeRecordBillType(e) {
|
|
|
let that = this;
|
|
|
console.log(e);
|
|
|
that.setData({
|
|
|
recordBillType: e.currentTarget.dataset.type
|
|
|
});
|
|
|
},
|
|
|
|
|
|
getPhoneNumber(e) {
|
|
|
var that = this;
|
|
|
console.log(e);
|
|
|
console.log(e.detail.errMsg);
|
|
|
/*wx.setStorageSync({
|
|
|
key: "jobDetailStorage",
|
|
|
data: that.data.recordList[e.currentTarget.dataset.idx]
|
|
|
});*/
|
|
|
|
|
|
uni.setStorageSync('jobDetailStorage', that.recordList[e.currentTarget.dataset.idx]);
|
|
|
|
|
|
// console.log(e);
|
|
|
// console.log(e.detail.errMsg)
|
|
|
// console.log(e.detail.iv)
|
|
|
// console.log(e.detail.encryptedData)
|
|
|
if ('getPhoneNumber:ok' == e.detail.errMsg) {
|
|
|
//同意
|
|
|
var iv = e.detail.iv;
|
|
|
var encryptedData = e.detail.encryptedData;
|
|
|
console.log(iv, '=-=========', encryptedData);
|
|
|
uni.checkSession({
|
|
|
success() {
|
|
|
//session_key 未过期,并且在本生命周期一直有效
|
|
|
uni.request({
|
|
|
url: app.globalData.ip + '/getWechatTel',
|
|
|
data: {
|
|
|
code: that.wxCode,
|
|
|
iv: iv,
|
|
|
encryptedData: encryptedData,
|
|
|
type: 'yishoudan'
|
|
|
},
|
|
|
success: function (res) {
|
|
|
console.log(res);
|
|
|
app.globalData.openId = res.data.data.pageBean.openId;
|
|
|
let promise = app.globalData.setLoginUserTokenInfo(res.data.data.pageBean.phoneNumber, null);
|
|
|
var collected = e.currentTarget.dataset.collected;
|
|
|
if (collected) {
|
|
|
promise.then((res) => {
|
|
|
that.setData({
|
|
|
isLogin: app.globalData.isLogin
|
|
|
});
|
|
|
that.doCollected(collected, e.currentTarget.dataset.jobid);
|
|
|
// that.collectedStoreJobList();
|
|
|
});
|
|
|
} else {
|
|
|
if (that.recordBillType == 'photo' || that.recordBillType == 'record') {
|
|
|
promise.then((res) => {
|
|
|
if (that.recordBillType == 'photo') {
|
|
|
that.chooseIdCard();
|
|
|
} else {
|
|
|
that.navigatorToRecord();
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
promise.then((res) => {
|
|
|
let argument;
|
|
|
argument = JSON.stringify(e.currentTarget.dataset.info).replace(/\=|\&/g, '3D');
|
|
|
uni.navigateTo({
|
|
|
url: `../newEnroll/enroll/index?applyType=1&info=${argument}`
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
fail: function (res) {
|
|
|
console.log('获取用户手机号错误');
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
fail() {
|
|
|
// session_key 已经失效,需要重新执行登录流程
|
|
|
uni.login({
|
|
|
success(res) {
|
|
|
if (res.code) {
|
|
|
console.log(res.code);
|
|
|
//发起网络请求
|
|
|
uni.request({
|
|
|
url: app.globalData.ip + '/getWechatTel',
|
|
|
data: {
|
|
|
code: res.code,
|
|
|
iv: iv,
|
|
|
encryptedData: encryptedData,
|
|
|
type: 'yishoudan'
|
|
|
},
|
|
|
success: function (res) {
|
|
|
console.log(res);
|
|
|
let promise = app.globalData.setLoginUserTokenInfo(res.data.data.pageBean.phoneNumber, null);
|
|
|
var collected = e.currentTarget.dataset.collected;
|
|
|
if (collected) {
|
|
|
promise.then((res) => {
|
|
|
that.setData({
|
|
|
isLogin: app.globalData.isLogin
|
|
|
});
|
|
|
that.doCollected(collected, e.currentTarget.dataset.jobid);
|
|
|
});
|
|
|
} else {
|
|
|
promise.then((res) => {
|
|
|
uni.navigateTo({
|
|
|
url: '../enroll/index?applyType=1'
|
|
|
//url: "../enroll/index?applyType=1&tel=" + res.data.data.pageBean.phoneNumber
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
fail: function (res) {
|
|
|
console.log('获取用户手机号错误');
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
console.log('获取手机号失败!' + res.errMsg);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
//拒绝
|
|
|
var collected = e.currentTarget.dataset.collected;
|
|
|
if (collected) {
|
|
|
try {
|
|
|
uni.setStorageSync('comeFromPage', 'index');
|
|
|
} catch (e) {
|
|
|
console.log('CatchClause', e);
|
|
|
console.log('CatchClause', e);
|
|
|
console.log('index-页面跳转,设置参数错误:', e);
|
|
|
}
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/login/index'
|
|
|
});
|
|
|
} else {
|
|
|
uni.navigateTo({
|
|
|
url: '../enroll/index?applyType=1'
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
return false;
|
|
|
},
|
|
|
|
|
|
getPhoneNumber1(e) {
|
|
|
var that = this;
|
|
|
console.log(e);
|
|
|
console.log(e.detail.errMsg);
|
|
|
that.close();
|
|
|
// console.log(e);
|
|
|
// console.log(e.detail.errMsg)
|
|
|
// console.log(e.detail.iv)
|
|
|
// console.log(e.detail.encryptedData)
|
|
|
|
|
|
if ('getPhoneNumber:ok' == e.detail.errMsg) {
|
|
|
//同意
|
|
|
var iv = e.detail.iv;
|
|
|
var encryptedData = e.detail.encryptedData;
|
|
|
uni.checkSession({
|
|
|
success() {
|
|
|
//session_key 未过期,并且在本生命周期一直有效
|
|
|
uni.request({
|
|
|
url: app.globalData.ip + '/getWechatTel',
|
|
|
data: {
|
|
|
code: that.wxCode,
|
|
|
iv: iv,
|
|
|
encryptedData: encryptedData,
|
|
|
type: 'yishoudan'
|
|
|
},
|
|
|
success: function (res) {
|
|
|
console.log(res);
|
|
|
let promise = app.globalData.setLoginUserTokenInfo(res.data.data.pageBean.phoneNumber, null);
|
|
|
promise.then((res) => {
|
|
|
that.setData({
|
|
|
isLogin: app.globalData.isLogin
|
|
|
});
|
|
|
that.onScrollToLower();
|
|
|
});
|
|
|
},
|
|
|
fail: function (res) {
|
|
|
console.log('获取用户手机号错误');
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
fail() {
|
|
|
// session_key 已经失效,需要重新执行登录流程
|
|
|
uni.login({
|
|
|
success(res) {
|
|
|
if (res.code) {
|
|
|
console.log(res.code);
|
|
|
//发起网络请求
|
|
|
uni.request({
|
|
|
url: app.globalData.ip + '/getWechatTel',
|
|
|
data: {
|
|
|
code: res.code,
|
|
|
iv: iv,
|
|
|
encryptedData: encryptedData,
|
|
|
type: 'yishoudan'
|
|
|
},
|
|
|
success: function (res) {
|
|
|
console.log(res);
|
|
|
let promise = app.globalData.setLoginUserTokenInfo(res.data.data.pageBean.phoneNumber, null);
|
|
|
promise.then((res) => {
|
|
|
that.setData({
|
|
|
isLogin: app.globalData.isLogin
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
fail: function (res) {
|
|
|
console.log('获取用户手机号错误');
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
console.log('获取手机号失败!' + res.errMsg);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
//拒绝
|
|
|
if (e.currentTarget.dataset.type != 'close') {
|
|
|
try {
|
|
|
uni.setStorageSync('comeFromPage', 'index');
|
|
|
} catch (e) {
|
|
|
console.log('CatchClause', e);
|
|
|
console.log('CatchClause', e);
|
|
|
console.log('index-页面跳转,设置参数错误:', e);
|
|
|
}
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/login/index'
|
|
|
});
|
|
|
} else {
|
|
|
that.close();
|
|
|
}
|
|
|
}
|
|
|
return false;
|
|
|
},
|
|
|
|
|
|
getAgencyUserId(id) {
|
|
|
var that = this;
|
|
|
uni.request({
|
|
|
url: app.globalData.ip + '/channel/contact/getAgencyUserId',
|
|
|
method: 'GET',
|
|
|
header: app.globalData.header,
|
|
|
data: {
|
|
|
channelContactId: id
|
|
|
},
|
|
|
success: function (res) {
|
|
|
console.log('获取来源对应的代理人,来源ID:', id);
|
|
|
console.log(res);
|
|
|
try {
|
|
|
if (app.globalData.isNotEmptyCheck(res.data.data)) {
|
|
|
uni.setStorageSync('storageSyncAgencyUserId', res.data.data);
|
|
|
}
|
|
|
//先设置代理人缓存人再登录
|
|
|
app.globalData.getLoginUserTokenInfo();
|
|
|
} catch (e) {
|
|
|
console.log('CatchClause', e);
|
|
|
console.log('CatchClause', e);
|
|
|
console.log('0-扫描微信二维码,设置参数错误:', e);
|
|
|
//先设置代理人缓存人再登录
|
|
|
app.globalData.getLoginUserTokenInfo();
|
|
|
}
|
|
|
},
|
|
|
fail: function (res0) {
|
|
|
console.log('获取来源对应的代理人错误', id);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
collectPaste(e) {
|
|
|
var txt;
|
|
|
var that = this;
|
|
|
if (!this.isLogin) {
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/login/index'
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
var collected = e.currentTarget.dataset.collected;
|
|
|
var storeJobId = e.currentTarget.dataset.jobid;
|
|
|
that.doCollected(collected, storeJobId);
|
|
|
// console.log(collected);
|
|
|
// if(!this.data.isCollect){
|
|
|
// that.setData({
|
|
|
// isCollect: true,
|
|
|
// collectTxt:'已收藏'
|
|
|
// })
|
|
|
// txt = '收藏成功'
|
|
|
// }else{
|
|
|
// that.setData({
|
|
|
// isCollect: false,
|
|
|
// collectTxt:'收藏'
|
|
|
// })
|
|
|
// }
|
|
|
},
|
|
|
|
|
|
doCollected(collected, storeJobId) {
|
|
|
var that = this;
|
|
|
var url = '/yishoudan/custom/job/collect/' + storeJobId;
|
|
|
// if (collected - 1 == 0) {
|
|
|
// url = "/user/collect/job/remove";
|
|
|
// }
|
|
|
// console.log(app.globalData.headers);
|
|
|
//发起网络请求
|
|
|
uni.request({
|
|
|
url: app.globalData.ip + url,
|
|
|
// data: {
|
|
|
// jobId: storeJobId,
|
|
|
// classify:0
|
|
|
// },
|
|
|
header: app.globalData.headers,
|
|
|
method: 'GET',
|
|
|
success: function (res) {
|
|
|
var txt;
|
|
|
if (collected - 1 == 0) {
|
|
|
//取消收藏
|
|
|
for (var i = 0; i != that.recordList.length; ++i) {
|
|
|
if (that.recordList[i].id - storeJobId == 0) {
|
|
|
that.recordList[i].collected = 0;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
txt = '取消收藏';
|
|
|
} else {
|
|
|
//收藏
|
|
|
for (var i = 0; i != that.recordList.length; ++i) {
|
|
|
if (that.recordList[i].id - storeJobId == 0) {
|
|
|
that.recordList[i].collected = 1;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
txt = '收藏成功';
|
|
|
}
|
|
|
that.setData({
|
|
|
recordList: that.recordList,
|
|
|
currentJobDrawer: that.currentJobDrawer,
|
|
|
isLogin: app.globalData.isLogin
|
|
|
});
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
|
title: txt
|
|
|
});
|
|
|
},
|
|
|
fail: function (res) {
|
|
|
console.log('操作失败');
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
getUserInfoBtn: function (e) {
|
|
|
console.log(e);
|
|
|
let that = this;
|
|
|
let type = e.currentTarget.dataset.type;
|
|
|
var collected = e.currentTarget.dataset.collected;
|
|
|
var storeJobId = e.currentTarget.dataset.jobid;
|
|
|
let idx = e.currentTarget.dataset.idx;
|
|
|
console.log(type);
|
|
|
uni.getUserProfile({
|
|
|
desc: '用于完善会员资料',
|
|
|
// 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
|
|
|
success: (res) => {
|
|
|
console.log(res);
|
|
|
//发起网络请求
|
|
|
uni.request({
|
|
|
url: app.globalData.ip + '/updateUserWechatInfo',
|
|
|
data: {
|
|
|
nickName: res.userInfo.nickName,
|
|
|
avatarUrl: res.userInfo.avatarUrl,
|
|
|
gender: res.userInfo.gender,
|
|
|
country: res.userInfo.country,
|
|
|
province: res.userInfo.province,
|
|
|
city: res.userInfo.city
|
|
|
},
|
|
|
method: 'POST',
|
|
|
header: app.globalData.headers,
|
|
|
success: function (res) {
|
|
|
console.log(res);
|
|
|
app.globalData.hasUserInfo = 1;
|
|
|
that.setData({
|
|
|
hasUserInfo: 1
|
|
|
});
|
|
|
that.doMenuClick(type, collected, storeJobId, idx);
|
|
|
},
|
|
|
fail: function (res) {
|
|
|
that.doMenuClick(type, collected, storeJobId, idx);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
fail: (res) => {
|
|
|
console.log(res);
|
|
|
that.doMenuClick(type, collected, storeJobId, idx);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
doMenuClick: function (_type, _collected, _storeJobId, _idx) {
|
|
|
let that = this;
|
|
|
if (_type - 1 == 0) {
|
|
|
//点击全国
|
|
|
that.goCity();
|
|
|
} else if (_type - 2 == 0) {
|
|
|
//搜索
|
|
|
that.showInput();
|
|
|
} else if (_type - 3 == 0) {
|
|
|
//筛选
|
|
|
that.goScreen();
|
|
|
} else if (_type - 4 == 0) {
|
|
|
//收藏
|
|
|
that.doCollected(_collected, _storeJobId);
|
|
|
} else if (_type - 5 == 0) {
|
|
|
//报名
|
|
|
uni.setStorageSync('jobDetailStorage', that.recordList[_idx]);
|
|
|
uni.navigateTo({
|
|
|
url: '../enroll/index?applyType=1&tel=' + app.globalData.loginUserInfo.tel
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
|
|
|
changSign(e) {
|
|
|
let that = this;
|
|
|
console.log(e);
|
|
|
that.storeJobListSearchForm.pageNum = 1;
|
|
|
if (e.target.dataset.type == 0 && that.signType != 0) {
|
|
|
that.storeJobListSearchForm.signType = '';
|
|
|
that.setData({
|
|
|
signType: e.target.dataset.type,
|
|
|
recordList: [],
|
|
|
storeJobListSearchForm: that.storeJobListSearchForm
|
|
|
});
|
|
|
that.getJobList();
|
|
|
} else if (e.target.dataset.type == 1 && that.signType != 1) {
|
|
|
that.storeJobListSearchForm.signType = 1;
|
|
|
that.setData({
|
|
|
signType: e.target.dataset.type,
|
|
|
recordList: [],
|
|
|
storeJobListSearchForm: that.storeJobListSearchForm
|
|
|
});
|
|
|
that.getJobList();
|
|
|
} else if (e.target.dataset.type == 2 && that.signType != 2) {
|
|
|
that.storeJobListSearchForm.signType = 2;
|
|
|
that.setData({
|
|
|
signType: e.target.dataset.type,
|
|
|
recordList: [],
|
|
|
storeJobListSearchForm: that.storeJobListSearchForm
|
|
|
});
|
|
|
that.getJobList();
|
|
|
}
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 收藏的切换
|
|
|
*
|
|
|
*
|
|
|
*/
|
|
|
collectChange(e) {
|
|
|
let that = this;
|
|
|
if (that.isLogin || (!that.isLogin && e.currentTarget.dataset.id == 0)) {
|
|
|
if (e.currentTarget.dataset.id) {
|
|
|
that.choiceCollect = e.currentTarget.dataset.id;
|
|
|
that.storeJobListSearchForm.ujc = e.currentTarget.dataset.id;
|
|
|
that.storeJobListSearchForm.pageNum = 1;
|
|
|
that.setData({
|
|
|
choiceCollect: that.choiceCollect,
|
|
|
storeJobListSearchForm: that.storeJobListSearchForm,
|
|
|
recordList: [],
|
|
|
hasMoreData: true
|
|
|
});
|
|
|
that.getJobList();
|
|
|
}
|
|
|
} else {
|
|
|
// if(e.currentTarget.dataset.id == 1){
|
|
|
that.setData({
|
|
|
recordList: [],
|
|
|
choiceCollect: 1
|
|
|
});
|
|
|
// }
|
|
|
}
|
|
|
},
|
|
|
|
|
|
choiceFilter(e) {
|
|
|
var that = this;
|
|
|
// let str = that.data.activez
|
|
|
let str = e.currentTarget.dataset.id;
|
|
|
if (str == 'all') {
|
|
|
that.storeJobListSearchForm.sortTag = 0;
|
|
|
that.setData({
|
|
|
firstMenu: '排序',
|
|
|
// storeJobListSearchForm: that.data.storeJobListSearchForm,
|
|
|
recordList: []
|
|
|
});
|
|
|
that.getJobList().then(() => {
|
|
|
that.setData({
|
|
|
siv: 'menu'
|
|
|
});
|
|
|
});
|
|
|
} else if (str == 'zuijin') {
|
|
|
//距离最近
|
|
|
if (that.storeJobListSearchForm.lng && that.storeJobListSearchForm.lat) {
|
|
|
that.storeJobListSearchForm.sortTag = 2;
|
|
|
that.setData({
|
|
|
firstMenu: '距离',
|
|
|
// storeJobListSearchForm: tha t.data.storeJobListSearchForm,
|
|
|
recordList: []
|
|
|
});
|
|
|
that.getJobList().then(() => {
|
|
|
that.setData({
|
|
|
siv: 'menu'
|
|
|
});
|
|
|
});
|
|
|
} else {
|
|
|
uni.getLocation({
|
|
|
type: 'gcj02',
|
|
|
success(res1) {
|
|
|
console.log('获取位置1');
|
|
|
app.globalData.lng = res1.longitude;
|
|
|
app.globalData.lat = res1.latitude;
|
|
|
that.storeJobListSearchForm.lng = res1.longitude;
|
|
|
that.storeJobListSearchForm.lat = res1.latitude;
|
|
|
that.storeJobListSearchForm.sortTag = 2;
|
|
|
that.storeJobListSearchForm.pageNum = 1;
|
|
|
that.setData({
|
|
|
firstMenu: '距离',
|
|
|
storeJobListSearchForm: that.storeJobListSearchForm,
|
|
|
recordList: []
|
|
|
});
|
|
|
that.getJobList().then(() => {
|
|
|
that.setData({
|
|
|
siv: 'menu'
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
fail() {
|
|
|
console.log('获取位置失败,打开位置设置界面');
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
} else if (str == 'zuigao') {
|
|
|
//工价最高
|
|
|
that.storeJobListSearchForm.sortTag = 1;
|
|
|
that.storeJobListSearchForm.pageNum = 1;
|
|
|
that.setData({
|
|
|
storeJobListSearchForm: that.storeJobListSearchForm,
|
|
|
firstMenu: '工价',
|
|
|
recordList: []
|
|
|
});
|
|
|
that.getJobList().then(() => {
|
|
|
that.setData({
|
|
|
siv: 'menu'
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
that.setData({
|
|
|
activez: str
|
|
|
});
|
|
|
that.setData({
|
|
|
whichOneShow: '',
|
|
|
siv: ''
|
|
|
});
|
|
|
// setTimeout(() => {
|
|
|
// that.setData({
|
|
|
// whichOneShow: "",
|
|
|
// });
|
|
|
// console.log(this.data.whichOneShow);
|
|
|
// console.log("112233");
|
|
|
// }, 1);
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 清除所有的筛选项
|
|
|
*
|
|
|
*
|
|
|
*/
|
|
|
clearFilter() {
|
|
|
let that = this;
|
|
|
that.jobSpecialLabelList.forEach((item) => {
|
|
|
// console.log(item);
|
|
|
if (item.checked) {
|
|
|
item.checked = false;
|
|
|
}
|
|
|
});
|
|
|
that.brandList.forEach((item) => {
|
|
|
if (item.checked) {
|
|
|
item.checked = false;
|
|
|
}
|
|
|
});
|
|
|
that.storeJobListSearchForm.jobSpecialLabelIds = '';
|
|
|
// that.data.storeJobListSearchForm.ujc =
|
|
|
// that.data.storeJobListSearchForm.brandIds = "";
|
|
|
that.storeJobListSearchForm.jobCategoryLabelIds = '';
|
|
|
that.storeJobListSearchForm.pageNum = 1;
|
|
|
that.storeJobListSearchForm.sortTag = 0;
|
|
|
that.storeJobListSearchForm.sex = -1;
|
|
|
that.setData({
|
|
|
jobSpecialLabelList: that.jobSpecialLabelList,
|
|
|
tagArray0: that.tagArray0,
|
|
|
tagArray1: that.tagArray1,
|
|
|
tagArray2: that.tagArray2,
|
|
|
tagArray3: that.tagArray3,
|
|
|
brandList: that.brandList,
|
|
|
selectJobList: [],
|
|
|
selectBrandList: [],
|
|
|
recordList: [],
|
|
|
whichOneShow: '',
|
|
|
firstMenu: '排序',
|
|
|
secondMenu: '不限',
|
|
|
sexid: -1,
|
|
|
activez: 'all'
|
|
|
});
|
|
|
if (!that.isWannaShow) {
|
|
|
// that.choiceFilter({
|
|
|
// currentTarget: {
|
|
|
// dataset: {
|
|
|
// id: "all",
|
|
|
// },
|
|
|
// },
|
|
|
// });
|
|
|
// that.choiceSex({
|
|
|
// currentTarget: {
|
|
|
// dataset: {
|
|
|
// id: "-1",
|
|
|
// },
|
|
|
// },
|
|
|
// });
|
|
|
that.getJobList('isWannaShow');
|
|
|
}
|
|
|
},
|
|
|
|
|
|
scroll(e) {
|
|
|
e.preventDefault();
|
|
|
e.stopPropagation();
|
|
|
},
|
|
|
|
|
|
stoptap(e) {
|
|
|
e.preventDefault();
|
|
|
e.stopPropagation();
|
|
|
},
|
|
|
|
|
|
changeContact() {
|
|
|
console.log(2123);
|
|
|
uni.navigateTo({
|
|
|
url: `/pages/configAnnunciate/index`
|
|
|
});
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 简版报名
|
|
|
*
|
|
|
*
|
|
|
*/
|
|
|
hidedrawershow(e) {
|
|
|
console.log(e);
|
|
|
this.setData({
|
|
|
[e.detail.type]: false
|
|
|
});
|
|
|
uni.showTabBar({
|
|
|
animation: false,
|
|
|
success: (result) => {},
|
|
|
fail: () => {},
|
|
|
complete: () => {}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
hideDrawer() {
|
|
|
let that = this;
|
|
|
this.getTabBar().setData({
|
|
|
isShow: true
|
|
|
});
|
|
|
that.setData({
|
|
|
drawerShow: false
|
|
|
});
|
|
|
// this.getJobList();
|
|
|
// setTimeout(() => {
|
|
|
// wx.showTabBar({
|
|
|
// success(e) {},
|
|
|
// });
|
|
|
// }, 300);
|
|
|
},
|
|
|
|
|
|
recordBill(e) {
|
|
|
// if (!this.data.isLogin) {
|
|
|
// wx.navigateTo({
|
|
|
// url: "/pages/login/index",
|
|
|
// });
|
|
|
// return;
|
|
|
// }
|
|
|
console.log(e.currentTarget.dataset.job);
|
|
|
this.setData({
|
|
|
recordShow: true,
|
|
|
currentInfo: e.currentTarget.dataset.job
|
|
|
});
|
|
|
console.log(this.recordShow);
|
|
|
uni.hideTabBar({
|
|
|
animation: false,
|
|
|
success: (result) => {},
|
|
|
fail: () => {},
|
|
|
complete: () => {}
|
|
|
});
|
|
|
return;
|
|
|
console.log(e.currentTarget.dataset.job);
|
|
|
console.log(123);
|
|
|
let middleInfo = e.currentTarget.dataset.job;
|
|
|
let info = JSON.stringify({
|
|
|
id: middleInfo.id,
|
|
|
jobName: middleInfo.jobName,
|
|
|
storeName: middleInfo.storeName,
|
|
|
aliasName: middleInfo.aliasName,
|
|
|
storeId: middleInfo.storeId
|
|
|
});
|
|
|
console.log(info);
|
|
|
uni.navigateTo({
|
|
|
url: `../../newEnroll/enroll/index?applyType=1&info=${info}`
|
|
|
});
|
|
|
// wx.navigateTo({
|
|
|
// url: `../newEnroll/enroll/index?applyType=1&info=${info}`,
|
|
|
// });
|
|
|
},
|
|
|
|
|
|
imageLoad() {
|
|
|
this.setData({
|
|
|
isLoading: false
|
|
|
});
|
|
|
},
|
|
|
|
|
|
setKey(e) {
|
|
|
console.log(e);
|
|
|
let data = e.currentTarget.dataset.key;
|
|
|
this.storeJobListSearchForm.keys = data;
|
|
|
this.setData({
|
|
|
inputVal: data,
|
|
|
isWannaShow: false
|
|
|
});
|
|
|
this.setHistoryList();
|
|
|
this.getJobList();
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 存最近搜索调用的函数
|
|
|
*
|
|
|
*
|
|
|
*/
|
|
|
funQC(arr) {
|
|
|
let newsArr = [];
|
|
|
for (let i = 0; i < arr.length; i++) {
|
|
|
if (app.globalData.isEmptyCheck(arr[i])) {
|
|
|
continue;
|
|
|
}
|
|
|
if (newsArr.indexOf(arr[i]) === -1) {
|
|
|
newsArr.push(arr[i]);
|
|
|
}
|
|
|
}
|
|
|
return newsArr;
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 删除最近搜索
|
|
|
*
|
|
|
*
|
|
|
*/
|
|
|
closeDialog() {
|
|
|
this.setData({
|
|
|
iosDialog: false
|
|
|
});
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 阻止滑动穿透
|
|
|
*
|
|
|
*
|
|
|
*/
|
|
|
clearNearSearch() {
|
|
|
let that = this;
|
|
|
uni.showModal({
|
|
|
title: '删除最近搜索',
|
|
|
content: '确定删除所有的最近搜索吗?',
|
|
|
contentColor: '#ccc',
|
|
|
confirmColor: '#ff4400',
|
|
|
confirmText: '确定',
|
|
|
cancelText: '取消',
|
|
|
success(res) {
|
|
|
console.log(res);
|
|
|
if (res.confirm) {
|
|
|
that.setData({
|
|
|
historyList: []
|
|
|
});
|
|
|
uni.removeStorageSync('projectSearch');
|
|
|
uni.showToast({
|
|
|
title: '已删除',
|
|
|
icon: 'none'
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
modalMove() {
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
<style>
|
|
|
@import './index.css';
|
|
|
</style>
|