diff --git a/pages/detail/index.wxml b/pages/detail/index.wxml index 4853986..d12b574 100644 --- a/pages/detail/index.wxml +++ b/pages/detail/index.wxml @@ -20,10 +20,8 @@ - {{jobDetail.genderRestrict}} 丨{{jobDetail.age}} - diff --git a/pages/mine/myJob/index.js b/pages/mine/myJob/index.js index a1a0d46..40053b7 100644 --- a/pages/mine/myJob/index.js +++ b/pages/mine/myJob/index.js @@ -1,5 +1,6 @@ // pages/mine/myJob/index.js const app = getApp(); +const commonUtil = require("../../../utils/commonUtil"); Page({ /** @@ -7,7 +8,7 @@ Page({ */ data: { recordList:[], - inputVal:'' + inputVal:'', }, /** * 生命周期函数--监听页面加载 @@ -37,13 +38,34 @@ Page({ header: app.globalData.headers, success: function (res) { console.log(res); + res.data.data.forEach((item,index) => { + item['citys'] = commonUtil.setJobInfoPosition(item.customJob.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 + "岁以下"; + } + }) + + + + that.setData({ recordList:res.data.data }) } }) }, - + goDetail (e) { + console.log(e.currentTarget.dataset.id); + var that = this; + wx.navigateTo({ + url: "../../detail/index?storeJobId=" + e.currentTarget.dataset.id, + }); + }, /** * 生命周期函数--监听页面隐藏 */ diff --git a/pages/mine/myJob/index.wxml b/pages/mine/myJob/index.wxml index 4d084f8..03487bc 100644 --- a/pages/mine/myJob/index.wxml +++ b/pages/mine/myJob/index.wxml @@ -13,11 +13,11 @@ --> - - + + - {{recordList}} - 27元/小时 + {{item.customJob.jobName}} + {{(item.citys && item.citys != '-') ? item.citys + ' | ' : ''}} {{item.age}} 2023-08-31 18:02