master
zsk 2 years ago
parent fd43cf75ea
commit 9f9048748a

@ -398,6 +398,30 @@ Page({
}); });
} }
this.hideLeft(); this.hideLeft();
that.getType();
},
getType(){
var that = this;
wx.request({
url: app.globalData.ip + "/yishoudan/labels/type/app/95",
method: "get",
header: app.globalData.headers,
success: function (res) {
console.log(res);
let classifyList = "filterData.classifyList";
that.setData({
[classifyList]: res.data.data.labels,
});
// that.data.storeJobListSearchForm['jobCategoryLabelIds'] = res.data.data.labels[0].id
// that.setData({
// list:res.data.data.labels,
// storeJobListSearchForm: that.data.storeJobListSearchForm
// })
}
})
}, },
toSpecialArea: function (e) { toSpecialArea: function (e) {
var id = e.currentTarget.dataset.id; var id = e.currentTarget.dataset.id;
@ -597,17 +621,14 @@ Page({
getListByTypeAndIndustry: function () { getListByTypeAndIndustry: function () {
var that = this; var that = this;
wx.request({ wx.request({
url: app.globalData.ip + "/labels/getListByTypeAndIndustry", url: app.globalData.ip + "/yishoudan/labels/type/app/90",
data: {
type: 90,
industry: 2,
},
header: app.globalData.header, header: app.globalData.header,
method: "GET", method: "GET",
success: function (res) { success: function (res) {
console.log(res.data.data); console.log(res.data.data.labels);
wx.setStorageSync("FILTER_LIST", res.data.data); wx.setStorageSync("FILTER_LIST", res.data.data.labels);
res.data.data.forEach((item) => { res.data.data.labels.forEach((item) => {
if (item.typeClassify == "0") { if (item.typeClassify == "0") {
that.data.tagArray0.push(item); that.data.tagArray0.push(item);
} else if (item.typeClassify == "1") { } else if (item.typeClassify == "1") {
@ -631,7 +652,7 @@ Page({
var jobSpecialLabelIdArray = var jobSpecialLabelIdArray =
that.data.storeJobListSearchForm.jobSpecialLabelIds.split(","); that.data.storeJobListSearchForm.jobSpecialLabelIds.split(",");
res.data.data.forEach((item) => { res.data.data.labels.forEach((item) => {
item["checked"] = false; item["checked"] = false;
jobSpecialLabelIdArray.forEach((item1) => { jobSpecialLabelIdArray.forEach((item1) => {
if (item.id == item1) { if (item.id == item1) {
@ -641,7 +662,7 @@ Page({
}); });
that.setData({ that.setData({
jobSpecialLabelList: res.data.data, jobSpecialLabelList: res.data.data.labels,
}); });
}, },
}); });
@ -1016,7 +1037,6 @@ Page({
[jobFilter]: this.data.filterData.jobFilter, [jobFilter]: this.data.filterData.jobFilter,
}); });
} }
if (wx.getStorageSync("CLASSIFY_LIST")) { if (wx.getStorageSync("CLASSIFY_LIST")) {
this.data.filterData.classifyList = wx.getStorageSync("CLASSIFY_LIST"); this.data.filterData.classifyList = wx.getStorageSync("CLASSIFY_LIST");
this.data.filterData.classifyList.forEach((item) => { this.data.filterData.classifyList.forEach((item) => {
@ -1027,6 +1047,7 @@ Page({
[classifyList]: this.data.filterData.classifyList, [classifyList]: this.data.filterData.classifyList,
}); });
} }
this.setData({ this.setData({
copyList: JSON.parse(JSON.stringify(this.data.filterData)), copyList: JSON.parse(JSON.stringify(this.data.filterData)),
}); });
@ -2916,9 +2937,6 @@ Page({
filter.jobFilter["tagArray" + data.typeClassify].indexOf(item); filter.jobFilter["tagArray" + data.typeClassify].indexOf(item);
console.log(filter.jobFilter["tagArray" + data.typeClassify][ind]); console.log(filter.jobFilter["tagArray" + data.typeClassify][ind]);
filter.jobFilter["tagArray" + data.typeClassify][ind].active = 0; filter.jobFilter["tagArray" + data.typeClassify][ind].active = 0;
// let ind = filter.classifyList.indexOf(item);
// console.log(filter.classifyList[ind]);
// filter.classifyList[ind].active = false;
this.toList(); this.toList();
} }
}); });

@ -135,19 +135,19 @@
</view> </view>
</view> </view>
<view class="sub" hover-class="none" hover-stop-propagation="false"> <view class="sub" hover-class="none" hover-stop-propagation="false">
<view class="title">4.薪资福利</view> <view class="title">4.薪资待遇</view>
<view class="content"> <view class="content">
<span wx:for="{{filterData.jobFilter.tagArray1}}" catchtap="setActive" wx:key="index" data-type="jobFilter" data-arr="tagArray1" data-id="{{item.id}}" class="{{item.active ? 'active':''}}" hover-class="none" hover-stop-propagation="false">{{item.name}}</span> <span wx:for="{{filterData.jobFilter.tagArray1}}" catchtap="setActive" wx:key="index" data-type="jobFilter" data-arr="tagArray1" data-id="{{item.id}}" class="{{item.active ? 'active':''}}" hover-class="none" hover-stop-propagation="false">{{item.name}}</span>
</view> </view>
</view> </view>
<view class="sub" hover-class="none" hover-stop-propagation="false"> <view class="sub" hover-class="none" hover-stop-propagation="false">
<view class="title">5.宿舍保障</view> <view class="title">5.吃住福利</view>
<view class="content"> <view class="content">
<span wx:for="{{filterData.jobFilter.tagArray3}}" catchtap="setActive" wx:key="index" data-type="jobFilter" data-arr="tagArray3" data-id="{{item.id}}" class="{{item.active ? 'active':''}}" hover-class="none" hover-stop-propagation="false">{{item.name}}</span> <span wx:for="{{filterData.jobFilter.tagArray3}}" catchtap="setActive" wx:key="index" data-type="jobFilter" data-arr="tagArray3" data-id="{{item.id}}" class="{{item.active ? 'active':''}}" hover-class="none" hover-stop-propagation="false">{{item.name}}</span>
</view> </view>
</view> </view>
<view class="sub" hover-class="none" hover-stop-propagation="false"> <view class="sub" hover-class="none" hover-stop-propagation="false">
<view class="title">6.班制休息</view> <view class="title">6.工作休息</view>
<view class="content"> <view class="content">
<span wx:for="{{filterData.jobFilter.tagArray0}}" catchtap="setActive" wx:key="index" data-type="jobFilter" data-arr="tagArray0" data-id="{{item.id}}" class="{{item.active ? 'active':''}}" hover-class="none" hover-stop-propagation="false">{{item.name}}</span> <span wx:for="{{filterData.jobFilter.tagArray0}}" catchtap="setActive" wx:key="index" data-type="jobFilter" data-arr="tagArray0" data-id="{{item.id}}" class="{{item.active ? 'active':''}}" hover-class="none" hover-stop-propagation="false">{{item.name}}</span>
</view> </view>
@ -159,7 +159,7 @@
</view> </view>
</view> </view>
<view class="sub" hover-class="none" hover-stop-propagation="false"> <view class="sub" hover-class="none" hover-stop-propagation="false">
<view class="title">8.其特色</view> <view class="title">8.其特色</view>
<view class="content"> <view class="content">
<span wx:for="{{filterData.jobFilter.tagArray2}}" catchtap="setActive" wx:key="index" data-type="jobFilter" data-arr="tagArray2" data-id="{{item.id}}" class="{{item.active ? 'active':''}}" hover-class="none" hover-stop-propagation="false">{{item.name}}</span> <span wx:for="{{filterData.jobFilter.tagArray2}}" catchtap="setActive" wx:key="index" data-type="jobFilter" data-arr="tagArray2" data-id="{{item.id}}" class="{{item.active ? 'active':''}}" hover-class="none" hover-stop-propagation="false">{{item.name}}</span>
</view> </view>

Loading…
Cancel
Save