From 9f9048748ad015887bdf21d78d4492d7491b8f3b Mon Sep 17 00:00:00 2001
From: zsk <710162063@qq.com>
Date: Mon, 4 Mar 2024 16:41:25 +0800
Subject: [PATCH] =?UTF-8?q?=E7=AD=9B=E9=80=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/index/index.js | 46 ++++++++++++++++++++++++++++++++--------------
pages/index/index.wxml | 8 ++++----
2 files changed, 36 insertions(+), 18 deletions(-)
diff --git a/pages/index/index.js b/pages/index/index.js
index 36ea258..bd4acd1 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -398,6 +398,30 @@ Page({
});
}
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) {
var id = e.currentTarget.dataset.id;
@@ -597,17 +621,14 @@ Page({
getListByTypeAndIndustry: function () {
var that = this;
wx.request({
- url: app.globalData.ip + "/labels/getListByTypeAndIndustry",
- data: {
- type: 90,
- industry: 2,
- },
+ url: app.globalData.ip + "/yishoudan/labels/type/app/90",
+
header: app.globalData.header,
method: "GET",
success: function (res) {
- console.log(res.data.data);
- wx.setStorageSync("FILTER_LIST", res.data.data);
- res.data.data.forEach((item) => {
+ console.log(res.data.data.labels);
+ wx.setStorageSync("FILTER_LIST", res.data.data.labels);
+ res.data.data.labels.forEach((item) => {
if (item.typeClassify == "0") {
that.data.tagArray0.push(item);
} else if (item.typeClassify == "1") {
@@ -631,7 +652,7 @@ Page({
var jobSpecialLabelIdArray =
that.data.storeJobListSearchForm.jobSpecialLabelIds.split(",");
- res.data.data.forEach((item) => {
+ res.data.data.labels.forEach((item) => {
item["checked"] = false;
jobSpecialLabelIdArray.forEach((item1) => {
if (item.id == item1) {
@@ -641,7 +662,7 @@ Page({
});
that.setData({
- jobSpecialLabelList: res.data.data,
+ jobSpecialLabelList: res.data.data.labels,
});
},
});
@@ -1016,7 +1037,6 @@ Page({
[jobFilter]: this.data.filterData.jobFilter,
});
}
-
if (wx.getStorageSync("CLASSIFY_LIST")) {
this.data.filterData.classifyList = wx.getStorageSync("CLASSIFY_LIST");
this.data.filterData.classifyList.forEach((item) => {
@@ -1027,6 +1047,7 @@ Page({
[classifyList]: this.data.filterData.classifyList,
});
}
+
this.setData({
copyList: JSON.parse(JSON.stringify(this.data.filterData)),
});
@@ -2916,9 +2937,6 @@ Page({
filter.jobFilter["tagArray" + data.typeClassify].indexOf(item);
console.log(filter.jobFilter["tagArray" + data.typeClassify][ind]);
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();
}
});
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 36aaf1f..1098726 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -135,19 +135,19 @@
- 4.薪资福利
+ 4.薪资待遇
{{item.name}}
- 5.宿舍保障
+ 5.吃住福利
{{item.name}}
- 6.班制休息
+ 6.工作休息
{{item.name}}
@@ -159,7 +159,7 @@
- 8.其他特色
+ 8.其它特色
{{item.name}}