From b02540aef65fa1bc2af72cff2d7f444108a5865e Mon Sep 17 00:00:00 2001
From: zhaoxiaoqiang
Date: Mon, 17 May 2021 09:20:54 +0800
Subject: [PATCH] 添加参数

---
 pages/businessData/businessData.js |   52 ++++++++++++++++++++++++++++++++--------------------
 1 files changed, 32 insertions(+), 20 deletions(-)

diff --git a/pages/businessData/businessData.js b/pages/businessData/businessData.js
index dc291a4..5396b9f 100644
--- a/pages/businessData/businessData.js
+++ b/pages/businessData/businessData.js
@@ -4,9 +4,10 @@
 Page({
   data: {
     isNomore: false,
+    isgoOut:true,
     amt: 0,
     num: 0,
-    url: '/sib/xcx/order/hbListInit',//初始化接口地址为花呗
+    url: '/zic/order/hbListInit',//初始化接口地址为花呗
     queryObj: {
       prodType: 200015,//初始化产品为花呗
     },
@@ -56,17 +57,23 @@
   onShow() {
     this.getFilter()
     this.getList()
+    this.setData({
+      isgoOut: true,
+    })
   },
   onHide() {
     // 页面被关闭
     this.setData({
       showRight: false,
       activeTab2: 0,
-      url: '/sib/xcx/order/hbListInit',
+      url: '/zic/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:[]
+        url: '/zic/order/hbListInit',
+        list: []
       })
     } else if (index == 1) {
       this.setData({
         queryObj: { prodType: 200008 },
-        url: '/sib/xcx/order/dmfListInit',
-        list:[]
+        url: '/zic/order/dmfListInit',
+        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
       },
     })
@@ -146,7 +158,7 @@
   // 获取列表
   getList() {
     $api.ajax(
-      '/sib/xcx/order/list',
+      '/zic/order/list',
       'POST',
       (res) => {
         this.setData({
@@ -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