From db354d8af3d87628a231f90e65a01eba9a4f2cbc Mon Sep 17 00:00:00 2001 From: lijun <457220798@qq.com> Date: Mon, 30 Jan 2023 15:36:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- miniProject/pages/home/index.wxml | 6 +-- miniProject/pages/index/mall/index.wxml | 2 +- miniProject/pages/zong/condition/index.wxml | 2 +- miniProject/pages/zong/selectMall/index.js | 42 +++++++++++++++++---- 4 files changed, 40 insertions(+), 12 deletions(-) diff --git a/miniProject/pages/home/index.wxml b/miniProject/pages/home/index.wxml index 29d1ebe..ebe905e 100644 --- a/miniProject/pages/home/index.wxml +++ b/miniProject/pages/home/index.wxml @@ -1,6 +1,6 @@ - + - + - + { + this.getGateList(value) + }) }, checkboxChange: function(e) { const { value } = e.detail this.setData({ selectData: value }) }, - + // 获取出入口列表 + getGateList: function(e) { + const atoken = wx.getStorageSync('atoken'); + const id = wx.getStorageSync('accountId'); + const data = { + accountId: id, + mallId: e, + status: 1, + type_arr: '1,3' + } + getIndexInfo('/report/gates', data, { 'Authorization': atoken }).then(res => { + console.log(res.data) + if (res.data.length > 0) { + this.setData({ + gateList: res.data, + gateId: [res.data[0].id], + selectGate: res.data[0].name + }) + } + }) + }, // 返回上一页 queding: function(e) { - const { selectData, accountList, reportType } = this.data + const { selectData, accountList, reportType,gateList,gateId,selectGate } = this.data let pages = getCurrentPages(); let prevPage = pages[ pages.length - 2 ]; let selectMall = '' @@ -80,8 +105,11 @@ Page({ } prevPage.setData({ - accountId: selectData, - selectMall: selectMall + accountId: selectData, + selectMall: selectMall, + gateList: gateList, + gateId: gateId, + selectGate: selectGate }) wx.navigateBack({ delta: 1 }) }