From 2c2cef52c5b76ce48ae40eab87b4f9268b846627 Mon Sep 17 00:00:00 2001 From: zsk <710162063@qq.com> Date: Thu, 29 Feb 2024 16:47:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=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 | 160 ++++++++++++++++++++++++++++++++++++++++++++++++- pages/index/index.wxss | 3 +- 2 files changed, 161 insertions(+), 2 deletions(-) diff --git a/pages/index/index.js b/pages/index/index.js index 599c0f9..cf144dc 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -120,7 +120,136 @@ Page({ scrollTo: "", // 列表滚动的控制 bannerList: [], - + filterData: { + + sex: [ + { + name: "男", + id: 1, + active: 0, + icon: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/nan912.png", + selectIcon: + "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/nan912-1.png", + }, + { + name: "女", + id: 2, + active: 0, + icon: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/nv912.png", + selectIcon: + "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/nv912-1.png", + }, + { + name: "男女不限", + id: -1, + active: -1, + }, + ], + jobFilter: { + tagArray0: [], + tagArray1: [], + tagArray2: [], + tagArray3: [], + tagArray4: [], + }, + classifyList: [], + }, + //智能筛选数据 + smartObj: { + tattoo: [ + { + name: "无", + id: 1, + active: 0, + }, + { + name: "小面积", + id: 2, + active: 0, + }, + { + name: "大面积", + id: 3, + active: 0, + }, + ], + criminal: [ + { + name: "无", + id: 1, + active: 0, + }, + { + name: "有", + id: 2, + active: 0, + }, + ], + blacklist: [ + { + name: "是", + id: 1, + active: 0, + }, + { + name: "否", + id: 2, + active: 0, + }, + ], + idCardType: [ + { + name: "原件正常", + id: 1, + active: 0, + }, + { + name: "临时", + id: 2, + active: 0, + }, + { + name: "消磁", + id: 3, + active: 0, + }, + { + name: "过期", + id: 4, + active: 0, + }, + { + name: "复印件", + id: 5, + active: 0, + }, + ], + sex: [ + { + name: "男", + id: 1, + active: 0, + icon: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/nan912.png", + selectIcon: + "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/nan912-1.png", + }, + { + name: "女", + id: 2, + active: 0, + icon: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/nv912.png", + selectIcon: + "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/nv912-1.png", + }, + { + name: "男女不限", + id: -1, + active: -1, + }, + ], + nativePlace: "", + nation: "", + }, copyList: {}, innerFilter: false, // 年龄筛选参数 @@ -536,6 +665,35 @@ Page({ }, getBrandNameAllList: function () { var that = this; + wx.request({ + url: app.globalData.ip + "/labels/type/95", // 分类列表获取接口 + header: app.globalData.header, + method: "GET", + success: function (res) { + console.log(res); + if (res.data.status == 200) { + if (that.data.storeJobListSearchForm.brandIds) { + var brandIdArray = + that.data.storeJobListSearchForm.brandIds.split(","); + } + console.log(res.data.data.labels); + wx.setStorageSync("CLASSIFY_LIST", res.data.data.labels); + res.data.data.labels.forEach((item) => { + item["checked"] = false; + if (brandIdArray) { + brandIdArray.forEach((item1) => { + if (item.id == item1) { + item["checked"] = true; + } + }); + } + }); + that.setData({ + brandList: res.data.data.labels, + }); + } + }, + }); }, selectBrand: function (e) { diff --git a/pages/index/index.wxss b/pages/index/index.wxss index 3e8e3eb..770bcc6 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -379,7 +379,8 @@ height: 746rpx; text-align: right; white-space: nowrap; color: var(--color-f40); - font-weight: 601; + font-weight: 601; + margin-top: 2px; } .weui-btn { margin-left: 0 !important;