You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
217 lines
6.2 KiB
Vue
217 lines
6.2 KiB
Vue
|
8 months ago
|
<template>
|
||
|
|
<view class="p-bil-index g_w_all g_h_all g_bg_f_5 g_kuaishou" :data-env="ENV_VERSION">
|
||
|
|
<scroll-view class="m-list" :style="{ height: `calc(100vh - 86px)` }" :scroll-y="true" @scrolltolower="reachBottom">
|
||
|
|
<view class="m-search flex_center g_bg_f g_pr_10 g_pt_8 g_mb_10" :class="ENV_VERSION == 'develop' || ENV_VERSION == 'trial' ? '' : 'g_pb_8'">
|
||
|
|
<view class="g_flex_row_between">
|
||
|
|
<u-search bar-width="0" class="g_flex_1 g_pl_10" @btnSearch="getSearch" height="40" v-model="keyword" :placeholder="placeholder" bg-color="#f5f5f5" :show-action="false" @change="getSearch" @clear="getSearch" @custom="getSearch" @search="getSearch" search-icon-color="#cccccc" :maxlength="20"></u-search>
|
||
|
|
<view class="g_flex_column_center flex_center g_ml_8 g_w_40 g_h_40 g_radius_20 g_bg_f_5" hover-class="thover" @click="goPage('/root/merchantManagement/jobForm')" v-if="ENV_VERSION == 'develop' || ENV_VERSION == 'trial'">
|
||
|
|
<g-panel-image :url="fadanBaseImg + 'add_job.svg'" size="80" />
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
<view class="g_bg_f" v-if="ENV_VERSION == 'develop' || ENV_VERSION == 'trial'">
|
||
|
|
<u-tabs bg-color="transparent" :list="tabInfo.list" :is-scroll="false" :current="tabInfo.active" :active-color="appid != 'wxb0c590fd696b79be' ? '#3578f6' : '#ff4400'" bar-width="64" bar-height="6" @change="handleUpdateTab" font-size="32" duration="0.1" height="76"></u-tabs>
|
||
|
|
|
||
|
|
<!-- <u-tabs bg-color="transparent" from="index" :list="tabInfo.list" :is-scroll="true" :current="tabInfo.active" active-color="#3578f6" bar-width="64" bar-height="6" @change="handleUpdateTab" font-size="34" duration="0.05" height="76"></u-tabs> -->
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
<g-yi-list-job from="tob" class="g_h_all" :list="query.list" @clickCard="goDetail" :loading="loading" :speed="speed" :query="query" emptyText="暂无数据" pt="0" />
|
||
|
|
</scroll-view>
|
||
|
|
</view>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
export default {
|
||
|
|
onReady() {
|
||
|
|
this.G.setNavStyle();
|
||
|
|
},
|
||
|
|
onShareAppMessage() {
|
||
|
|
return this.G.shareFun();
|
||
|
|
},
|
||
|
|
onLoad(options) {
|
||
|
|
console.log(options);
|
||
|
|
this.navInfo = this.G.getNavInfo();
|
||
|
|
// this.placeholder = "搜索职位名称";
|
||
|
|
},
|
||
|
|
onShow() {
|
||
|
|
let that = this;
|
||
|
|
that.navInfo = that.G.getNavInfo();
|
||
|
|
},
|
||
|
|
created() {
|
||
|
|
console.log(this.show);
|
||
|
|
this.getList();
|
||
|
|
},
|
||
|
|
mounted() {},
|
||
|
|
|
||
|
|
props: {
|
||
|
|
show: {
|
||
|
|
type: Boolean,
|
||
|
|
default: () => {
|
||
|
|
return false;
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
watch: {
|
||
|
|
show: {
|
||
|
|
handler(newVal) {
|
||
|
|
console.log(newVal);
|
||
|
|
if (newVal) {
|
||
|
|
this.getList();
|
||
|
|
}
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
// 组件状态值
|
||
|
|
data() {
|
||
|
|
return {
|
||
|
|
ENV_VERSION: uni.getAccountInfoSync().miniProgram.envVersion,
|
||
|
|
appid: uni.getAccountInfoSync().miniProgram.appId,
|
||
|
|
// ENV_VERSION: "develop",
|
||
|
|
fadanBaseImg: this.G.store().fadanBaseImg,
|
||
|
|
whichPage: "home",
|
||
|
|
keyword: "",
|
||
|
|
loading: false,
|
||
|
|
speed: -1,
|
||
|
|
applyType: 0,
|
||
|
|
query: {
|
||
|
|
page: 1,
|
||
|
|
size: 50,
|
||
|
|
list: [],
|
||
|
|
isFinish: -1,
|
||
|
|
jobType: "",
|
||
|
|
},
|
||
|
|
placeholder: "搜索职位名称",
|
||
|
|
navInfo: {},
|
||
|
|
tabInfo: {
|
||
|
|
list: [
|
||
|
|
{
|
||
|
|
name: "全部",
|
||
|
|
tip: "",
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: "自有",
|
||
|
|
tip: 2,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: "平台",
|
||
|
|
tip: 1,
|
||
|
|
},
|
||
|
|
],
|
||
|
|
active: 0,
|
||
|
|
},
|
||
|
|
};
|
||
|
|
},
|
||
|
|
// 计算属性
|
||
|
|
computed: {},
|
||
|
|
|
||
|
|
// 组件方法
|
||
|
|
methods: {
|
||
|
|
goPage($path) {
|
||
|
|
uni.navigateTo({
|
||
|
|
url: $path,
|
||
|
|
});
|
||
|
|
},
|
||
|
|
handleUpdateTab(e) {
|
||
|
|
this.tabInfo.active = e;
|
||
|
|
this.query.jobType = this.tabInfo.list[e].tip;
|
||
|
|
this.speed = -1;
|
||
|
|
this.query.page = 1;
|
||
|
|
this.getList();
|
||
|
|
},
|
||
|
|
goDetail($item) {
|
||
|
|
console.log("前往详情页", $item);
|
||
|
|
if (uni.getStorageSync("apply-userinfo")) {
|
||
|
|
uni.navigateTo({
|
||
|
|
url: "/root/detail/work?id=" + $item.id,
|
||
|
|
});
|
||
|
|
} else {
|
||
|
|
uni.navigateTo({
|
||
|
|
url: "/pages/login/index",
|
||
|
|
});
|
||
|
|
}
|
||
|
|
},
|
||
|
|
reachBottom() {
|
||
|
|
let that = this;
|
||
|
|
console.log("tolow");
|
||
|
|
// if (!uni.getStorageSync("apply-token") && that.tabInfo.active == 1) {
|
||
|
|
// return false;
|
||
|
|
// }
|
||
|
|
that.query.page++;
|
||
|
|
that.getList("concat");
|
||
|
|
},
|
||
|
|
getSearch(e) {
|
||
|
|
console.log(e);
|
||
|
|
this.speed = -1;
|
||
|
|
this.keyword = e;
|
||
|
|
this.query.page = 1;
|
||
|
|
console.log(this.whichPage);
|
||
|
|
this.getList();
|
||
|
|
},
|
||
|
|
backPrev() {
|
||
|
|
console.log("backPrev");
|
||
|
|
uni.navigateBack({
|
||
|
|
delta: 1,
|
||
|
|
});
|
||
|
|
},
|
||
|
|
getList($type = "init") {
|
||
|
|
let that = this;
|
||
|
|
that.G.Post(
|
||
|
|
that.api.job_myJobList,
|
||
|
|
{
|
||
|
|
pageNum: that.query.page,
|
||
|
|
pageSize: that.query.size,
|
||
|
|
keys: that.keyword,
|
||
|
|
jobType: that.query.jobType,
|
||
|
|
agencyId: uni.getStorageSync("AGENCY_ID"),
|
||
|
|
},
|
||
|
|
(res) => {
|
||
|
|
console.log("一才职位列表:", res);
|
||
|
|
that.computeCode = 1;
|
||
|
|
if (res.pageBean.recordCount == 0) {
|
||
|
|
that.loading = false;
|
||
|
|
} else {
|
||
|
|
that.loading = true;
|
||
|
|
}
|
||
|
|
that.speed = res.pageBean.recordCount;
|
||
|
|
that.query.isFinish = res.pageBean.recordList.length;
|
||
|
|
if (res.pageBean.recordList && res.pageBean.recordList.length > 0) {
|
||
|
|
res.pageBean.recordList = that.G.toGetAddress(res.pageBean.recordList);
|
||
|
|
res.pageBean.recordList = that.G.toGetAge(res.pageBean.recordList);
|
||
|
|
res.pageBean.recordList = that.G.yijobCopy(res.pageBean.recordList);
|
||
|
|
}
|
||
|
|
if ($type == "init") {
|
||
|
|
that.query.list = [];
|
||
|
|
that.query.list =
|
||
|
|
res.pageBean.recordList && res.pageBean.recordList.length > 0
|
||
|
|
? res.pageBean.recordList.map((item, index) => {
|
||
|
|
return {
|
||
|
|
...item,
|
||
|
|
collected: item.collected ? true : false,
|
||
|
|
cus_price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValueHtml(item.salaryClassify, item.salaryClassifyValue) : "月薪",
|
||
|
|
fuWuFei: that.G.setReturnFee(item.returnFee / 100, item.returnFeeType, 1),
|
||
|
|
};
|
||
|
|
})
|
||
|
|
: [];
|
||
|
|
} else {
|
||
|
|
that.query.list = that.query.list.concat(
|
||
|
|
res.pageBean.recordList && res.pageBean.recordList.length > 0
|
||
|
|
? res.pageBean.recordList.map((item, index) => {
|
||
|
|
return {
|
||
|
|
...item,
|
||
|
|
collected: item.collected ? true : false,
|
||
|
|
cus_price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValueHtml(item.salaryClassify, item.salaryClassifyValue) : "月薪",
|
||
|
|
fuWuFei: that.G.setReturnFee(item.returnFee / 100, item.returnFeeType, 1),
|
||
|
|
};
|
||
|
|
})
|
||
|
|
: []
|
||
|
|
);
|
||
|
|
}
|
||
|
|
console.log("that.query.list ", that.query.list);
|
||
|
|
}
|
||
|
|
);
|
||
|
|
},
|
||
|
|
},
|
||
|
|
};
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style lang="less"></style>
|