From ee998d76985146af4f78d5eabe4e31500cb35980 Mon Sep 17 00:00:00 2001 From: TM <923727421@qq.com> Date: Tue, 15 Dec 2020 14:47:28 +0800 Subject: [PATCH] 修改bug --- pages/businessData/businessData.js | 42 +++++++++++++++++++++++++++--------------- 1 files changed, 27 insertions(+), 15 deletions(-) diff --git a/pages/businessData/businessData.js b/pages/businessData/businessData.js index dc291a4..a1bf07c 100644 --- a/pages/businessData/businessData.js +++ b/pages/businessData/businessData.js @@ -4,6 +4,7 @@ Page({ data: { isNomore: false, + isgoOut:true, amt: 0, num: 0, url: '/sib/xcx/order/hbListInit',//初始化接口地址为花呗 @@ -56,6 +57,9 @@ onShow() { this.getFilter() this.getList() + this.setData({ + isgoOut: true, + }) }, onHide() { // 页面被关闭 @@ -64,9 +68,12 @@ activeTab2: 0, url: '/sib/xcx/order/hbListInit', queryObj: { prodType: 200015 }, + value: '', + list: [], + isgoOut:false, }) }, - test({ index, tabsName }){ + test({ index, tabsName }) { console.log(222333) this.handleTabClick({ index, tabsName }) }, @@ -75,36 +82,41 @@ this.setData({ [tabsName]: index, isNomore: false, - value:'' + value: '' }); if (index == 0) { this.setData({ queryObj: { prodType: 200015 }, url: '/sib/xcx/order/hbListInit', - list:[] + list: [] }) } else if (index == 1) { this.setData({ queryObj: { prodType: 200008 }, url: '/sib/xcx/order/dmfListInit', - list:[] + list: [] }) } this.getList() this.getFilter() }, - onhandInput(value){ + onhandInput(value) { this.setData({ - value:value + value: value + }) + }, + onClear(){ + this.setData({ + value:'' }) }, // 搜索框事件 - searchMation(value){ + searchMation(value) { console.log(value) let obj = this.data.queryObj - if(value){ + if (value) { obj.userName = value - }else{ + } else { obj.userName = '' delete obj.userName } @@ -112,7 +124,7 @@ this.setData({ list: [], isNomore: false, - queryObj:{ + queryObj: { ...obj }, }) @@ -218,11 +230,11 @@ }, // 自定义筛选事件 onGetFilterInfo(data) { - if(this.data.value){ - var obj = { ...this.data.queryObj.prodType, ...data ,userName:this.data.value} - }else{ - var obj = { ...this.data.queryObj.prodType, ...data } - } + if (this.data.value) { + var obj = { prodType: this.data.queryObj.prodType, ...data, userName: this.data.value } + } else { + var obj = { prodType: this.data.queryObj.prodType, ...data } + } this.setData({ list: [], isNomore: false, -- Gitblit v1.8.0