|
|
|
@ -1,12 +1,16 @@
|
|
|
|
// pages/mine/mine.js
|
|
|
|
// pages/mine/mine.js
|
|
|
|
const app = getApp();
|
|
|
|
const app = getApp();
|
|
|
|
import { timeShowXXX } from "../../utils/dateUtil";
|
|
|
|
import { timeShowXXX } from "../../utils/dateUtil";
|
|
|
|
|
|
|
|
const commonUtil = require("../../utils/commonUtil.js");
|
|
|
|
|
|
|
|
|
|
|
|
import { customRequest } from '../../utils/request.js';
|
|
|
|
import { customRequest } from '../../utils/request.js';
|
|
|
|
Page({
|
|
|
|
Page({
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 页面的初始数据
|
|
|
|
* 页面的初始数据
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
data: {
|
|
|
|
data: {
|
|
|
|
|
|
|
|
appId: app.globalData.appId,
|
|
|
|
|
|
|
|
|
|
|
|
isopen: 1, // 账户余额是否显示
|
|
|
|
isopen: 1, // 账户余额是否显示
|
|
|
|
iosDialog: false,
|
|
|
|
iosDialog: false,
|
|
|
|
iosDialogTobe: false,
|
|
|
|
iosDialogTobe: false,
|
|
|
|
@ -27,7 +31,42 @@ Page({
|
|
|
|
recordBillType: "",
|
|
|
|
recordBillType: "",
|
|
|
|
configInfo: {},
|
|
|
|
configInfo: {},
|
|
|
|
teamList: [],
|
|
|
|
teamList: [],
|
|
|
|
drawerShow: false
|
|
|
|
drawerShow: false,
|
|
|
|
|
|
|
|
tabGroup: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: '全部',
|
|
|
|
|
|
|
|
key: '0',
|
|
|
|
|
|
|
|
picked: ''
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: '在招中',
|
|
|
|
|
|
|
|
key: '1',
|
|
|
|
|
|
|
|
picked: '1'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: '已停招',
|
|
|
|
|
|
|
|
key: '2',
|
|
|
|
|
|
|
|
picked: '0'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
choiceCollect: '0',
|
|
|
|
|
|
|
|
storeJobListSearchForm: {
|
|
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
|
|
pageSize: 20,
|
|
|
|
|
|
|
|
classify: 1,
|
|
|
|
|
|
|
|
sex: -1,
|
|
|
|
|
|
|
|
workTypeStr: "",
|
|
|
|
|
|
|
|
lat: "",
|
|
|
|
|
|
|
|
lng: "",
|
|
|
|
|
|
|
|
jobClassify: "",
|
|
|
|
|
|
|
|
sortTag: 0,
|
|
|
|
|
|
|
|
jobRequestLabelIds: "",
|
|
|
|
|
|
|
|
cityName: "",
|
|
|
|
|
|
|
|
brandIds: "",
|
|
|
|
|
|
|
|
jobCategoryLabelIds: "",
|
|
|
|
|
|
|
|
ucj: 0,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
recordList: []
|
|
|
|
// agencyStatus: 0, // 是否是代理判断
|
|
|
|
// agencyStatus: 0, // 是否是代理判断
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
@ -48,6 +87,7 @@ Page({
|
|
|
|
});
|
|
|
|
});
|
|
|
|
if (app.globalData.isLogin) {
|
|
|
|
if (app.globalData.isLogin) {
|
|
|
|
this.getTeamList()
|
|
|
|
this.getTeamList()
|
|
|
|
|
|
|
|
this.getJobList()
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, 100);
|
|
|
|
}, 100);
|
|
|
|
@ -274,15 +314,6 @@ Page({
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
onPullDownRefresh: function () { },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 页面上拉触底事件的处理函数
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
onReachBottom: function () { },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 用户点击右上角分享
|
|
|
|
* 用户点击右上角分享
|
|
|
|
@ -467,4 +498,163 @@ Page({
|
|
|
|
modalMove () {
|
|
|
|
modalMove () {
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
collectChange (e) { // if (that.data.isLogin || (!that.data.isLogin && e.currentTarget.dataset.item.key == 0)) {
|
|
|
|
|
|
|
|
let that = this
|
|
|
|
|
|
|
|
if (e.currentTarget.dataset.item) {
|
|
|
|
|
|
|
|
let item = e.currentTarget.dataset.item
|
|
|
|
|
|
|
|
that.data.choiceCollect = item.key;
|
|
|
|
|
|
|
|
// that.data.storeJobListSearchForm.ucj = e.currentTarget.dataset.id;
|
|
|
|
|
|
|
|
that.data.storeJobListSearchForm.sortTag = item.key;
|
|
|
|
|
|
|
|
that.data.storeJobListSearchForm.picked = item.picked;
|
|
|
|
|
|
|
|
that.data.storeJobListSearchForm.pageNum = 1;
|
|
|
|
|
|
|
|
that.setData({
|
|
|
|
|
|
|
|
choiceCollect: that.data.choiceCollect,
|
|
|
|
|
|
|
|
storeJobListSearchForm: that.data.storeJobListSearchForm,
|
|
|
|
|
|
|
|
recordList: [],
|
|
|
|
|
|
|
|
hasMoreData: true,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
that.getJobList();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
getJobList ($type) {
|
|
|
|
|
|
|
|
let that = this
|
|
|
|
|
|
|
|
customRequest("/yishoudan/custom/job/listV2", {
|
|
|
|
|
|
|
|
method: 'post',
|
|
|
|
|
|
|
|
header: 'headers',
|
|
|
|
|
|
|
|
data: {
|
|
|
|
|
|
|
|
...that.data.storeJobListSearchForm,
|
|
|
|
|
|
|
|
// recruitment: 1
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
|
|
|
console.log("职位列表↓↓↓↓");
|
|
|
|
|
|
|
|
console.log(res);
|
|
|
|
|
|
|
|
if ($type == 'search') {
|
|
|
|
|
|
|
|
that.setData({
|
|
|
|
|
|
|
|
// isSwiper: true,
|
|
|
|
|
|
|
|
// inputVal: ''
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let data = res.data.data
|
|
|
|
|
|
|
|
that.setData({
|
|
|
|
|
|
|
|
totalPage: data.pageCount,
|
|
|
|
|
|
|
|
currPage: data.currentPage,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
|
|
|
that.setData({
|
|
|
|
|
|
|
|
triggered: false,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}, 1000);
|
|
|
|
|
|
|
|
if (data.recordList) {
|
|
|
|
|
|
|
|
data.recordList.forEach((i) => {
|
|
|
|
|
|
|
|
i.minMonthlyPay = i.minMonthlyPay / 100
|
|
|
|
|
|
|
|
i.maxMonthlyPay = i.maxMonthlyPay / 100
|
|
|
|
|
|
|
|
if (i.jobSpecialLabelNames && i.jobSpecialLabelNames.length > 0) {
|
|
|
|
|
|
|
|
i.labelGroup = i.jobSpecialLabelNames.split(', ').filter((itm, inx) => {
|
|
|
|
|
|
|
|
return inx < 6
|
|
|
|
|
|
|
|
}).map(itm => {
|
|
|
|
|
|
|
|
return itm
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
i.labelGroup = [];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
|
|
|
data.recordList == null ||
|
|
|
|
|
|
|
|
data.recordList.length == 0 ||
|
|
|
|
|
|
|
|
data.recordList.length <
|
|
|
|
|
|
|
|
that.data.storeJobListSearchForm.pageSize
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
console.log('from 搜索')
|
|
|
|
|
|
|
|
var jobListTemp = commonUtil.disposeJobListData(
|
|
|
|
|
|
|
|
data.recordList
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
that.data.recordList = that.data.recordList.concat(jobListTemp);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
that.setData({
|
|
|
|
|
|
|
|
recordList: that.data.recordList,
|
|
|
|
|
|
|
|
hasMoreData: false,
|
|
|
|
|
|
|
|
isTrigger: false,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
console.log('from 其他')
|
|
|
|
|
|
|
|
var jobListTemp = commonUtil.disposeJobListData(
|
|
|
|
|
|
|
|
data.recordList
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
that.data.recordList = that.data.recordList.concat(jobListTemp);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
that.setData({
|
|
|
|
|
|
|
|
recordList: that.data.recordList,
|
|
|
|
|
|
|
|
hasMoreData: true,
|
|
|
|
|
|
|
|
isTrigger: false,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
that.setData({
|
|
|
|
|
|
|
|
loading: false,
|
|
|
|
|
|
|
|
pageShow: true,
|
|
|
|
|
|
|
|
storeJobListSearchForm: that.data.storeJobListSearchForm,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
that.data.recordList.forEach((item, index) => {
|
|
|
|
|
|
|
|
// console.log(item);
|
|
|
|
|
|
|
|
// item.logoStr = item.jobName.slice(0,2)
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
|
|
|
app.isNotEmptyCheck(item.returnFeeType) ||
|
|
|
|
|
|
|
|
item.returnFeeType == "0" ||
|
|
|
|
|
|
|
|
item.returnFee == "0"
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
item["fuWuFei"] = commonUtil.getReturnFeeTypeName1ById(
|
|
|
|
|
|
|
|
item.returnFeeType,
|
|
|
|
|
|
|
|
item.returnFee / 100
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
item["fuWuFei"] = "";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 简版弹窗通告显示
|
|
|
|
|
|
|
|
if (item.id == that.data.currentJobDrawer.id) {
|
|
|
|
|
|
|
|
item["jobDesp"] = item.jobDesp
|
|
|
|
|
|
|
|
.replace(/\*\*\*\*\*/g, "")
|
|
|
|
|
|
|
|
.split("————————")[0];
|
|
|
|
|
|
|
|
// 展示用字段
|
|
|
|
|
|
|
|
item["jobDesp1"] = 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>"
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
item["jobDesp1"] = 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.data.currentJobDrawer = {
|
|
|
|
|
|
|
|
...item,
|
|
|
|
|
|
|
|
index: that.data.currentJobDrawer.index ?
|
|
|
|
|
|
|
|
that.data.currentJobDrawer.index : null,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
console.log(' that.data.recordList', that.data.recordList);
|
|
|
|
|
|
|
|
that.setData({
|
|
|
|
|
|
|
|
recordList: that.data.recordList,
|
|
|
|
|
|
|
|
currentJobDrawer: that.data.currentJobDrawer,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
wx.hideLoading({
|
|
|
|
|
|
|
|
success: (res) => { },
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
resolve();
|
|
|
|
|
|
|
|
that.getTag();
|
|
|
|
|
|
|
|
// if (that.data.recordList.length < data.recordCount) {
|
|
|
|
|
|
|
|
// that.setData({
|
|
|
|
|
|
|
|
// hasMoreData: true,
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// that.setData({
|
|
|
|
|
|
|
|
// hasMoreData: false,
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|