|
|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
// pages/mine/myJob/index.js
|
|
|
|
|
const app = getApp();
|
|
|
|
|
const commonUtil = require("../../../utils/commonUtil");
|
|
|
|
|
const dateUtil = require("../../../utils/dateUtil");
|
|
|
|
|
Page({
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -9,6 +10,10 @@ Page({
|
|
|
|
|
data: {
|
|
|
|
|
recordList:[],
|
|
|
|
|
inputVal:'',
|
|
|
|
|
jobListSearchForm:{
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 50,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
/**
|
|
|
|
|
* 生命周期函数--监听页面加载
|
|
|
|
|
@ -35,19 +40,21 @@ Page({
|
|
|
|
|
wx.request({
|
|
|
|
|
url: app.globalData.ip + "/yishoudan/common/order/list",
|
|
|
|
|
method: "Post",
|
|
|
|
|
data:that.data.jobListSearchForm,
|
|
|
|
|
header: app.globalData.headers,
|
|
|
|
|
success: function (res) {
|
|
|
|
|
console.log(res);
|
|
|
|
|
res.data.data.forEach((item,index) => {
|
|
|
|
|
item['citys'] = commonUtil.setJobInfoPosition(item.customJob.storeDistrict);
|
|
|
|
|
item['citys'] = commonUtil.setJobInfoPosition(item.storeDistrict);
|
|
|
|
|
// item['genderRestrict'] = commonUtil.getGenderByMinAge(item.customJob.customJob);
|
|
|
|
|
if (app.isNotEmptyCheck(item.customJob.minAge) && app.isNotEmptyCheck(item.customJob.maxAge)) {
|
|
|
|
|
item["age"] = item.customJob.minAge + "-" + item.customJob.maxAge + "岁";
|
|
|
|
|
} else if (app.isNotEmptyCheck(item.customJob.minAge)) {
|
|
|
|
|
item["age"] = item.customJob.minAge + "岁以上";
|
|
|
|
|
} else if (app.isNotEmptyCheck(item.customJob.maxAge)) {
|
|
|
|
|
item["age"] = item.customJob.maxAge + "岁以下";
|
|
|
|
|
if (app.isNotEmptyCheck(item.minAge) && app.isNotEmptyCheck(item.maxAge)) {
|
|
|
|
|
item["age"] = item.minAge + "-" + item.maxAge + "岁";
|
|
|
|
|
} else if (app.isNotEmptyCheck(item.minAge)) {
|
|
|
|
|
item["age"] = item.minAge + "岁以上";
|
|
|
|
|
} else if (app.isNotEmptyCheck(item.maxAge)) {
|
|
|
|
|
item["age"] = item.maxAge + "岁以下";
|
|
|
|
|
}
|
|
|
|
|
item["createTime"] = dateUtil.formatDateYMDHM(item.createTime)
|
|
|
|
|
})
|
|
|
|
|
that.setData({
|
|
|
|
|
recordList:res.data.data
|
|
|
|
|
|