wangxia 2 years ago
commit 4056fb4597

@ -20,10 +20,8 @@
<!-- {{jobDetail.store.distance}} --> <!-- {{jobDetail.store.distance}} -->
</view> </view>
<view class="f14s c045 mb4"> <view class="f14s c045 mb4">
<!-- 深圳丨龙岗区丨16-35岁 -->
<block>{{jobDetail.genderRestrict}}</block> <block>{{jobDetail.genderRestrict}}</block>
丨{{jobDetail.age}} 丨{{jobDetail.age}}
<!-- {{jobDetail.district}}{{jobDetail.age}} -->
</view> </view>
</view> </view>
</view> </view>

@ -1,5 +1,6 @@
// pages/mine/myJob/index.js // pages/mine/myJob/index.js
const app = getApp(); const app = getApp();
const commonUtil = require("../../../utils/commonUtil");
Page({ Page({
/** /**
@ -7,7 +8,7 @@ Page({
*/ */
data: { data: {
recordList:[], recordList:[],
inputVal:'' inputVal:'',
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
@ -37,13 +38,34 @@ Page({
header: app.globalData.headers, header: app.globalData.headers,
success: function (res) { success: function (res) {
console.log(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({ that.setData({
recordList:res.data.data 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,
});
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */

@ -13,11 +13,11 @@
</view> --> </view> -->
<view class="bt1"> <view class="bt1">
<view class="bgf display-flex p16 pb0" wx:for="{{recordList}}"> <view class="bgf display-flex p16 pb0" data-id="{{item.customJob.id}}" bindtap="goDetail" hover-class="g_bg_f_5" wx:for="{{recordList}}" wx:key="index" wx:item="item">
<view class="display-flex flex-1 ml8 pb16 bb1"> <view class="display-flex flex-1 pb16 bb1">
<view class="flex-1"> <view class="flex-1">
<view class="f16 fwb">{{recordList}}</view> <view class="f16 fwb">{{item.customJob.jobName}}</view>
<view class="f16 fwb color-f40 mt8">27元/小时</view> <view class="f14 c6 mt8">{{(item.citys && item.citys != '-') ? item.citys + ' | ' : ''}} {{item.age}}</view>
</view> </view>
<view class="tr"> <view class="tr">
<view class="f14 c9">2023-08-31 18:02</view> <view class="f14 c9">2023-08-31 18:02</view>

Loading…
Cancel
Save