zhaoxiaohai 2 years ago
parent
commit
8a1d0d2322

+ 0 - 73
packageA/project/search.js

@@ -1,73 +0,0 @@
-const _Http = getApp().globalData.http,
-    getHeight = require("../../utils/getRheRemainingHeight");
-
-Page({
-    data: {
-        content: {
-            "type": 0,
-            "pageNumber": 1,
-            "pageSize": 20,
-            "where": {
-                "condition": "",
-                "status": "",
-                "startdate": "",
-                "enddate": ""
-            },
-            "sort": [{
-                sortname: "默认",
-                sorted: 1,
-                sortid: 68,
-                reversed: 0
-            }]
-        },
-    },
-    onLoad(options) {
-        this.getList();
-    },
-    startSearch({
-        detail
-    }) {
-        this.setData({
-            "content.where.condition": detail
-        })
-        this.getList(true);
-    },
-    onClear() {
-        this.setData({
-            "content.where.condition": ""
-        })
-        this.getList(true);
-    },
-    getList(init = false) {
-        if (init.detail != undefined) init = init.detail;
-        let content = this.data.content;
-        if (init) content.pageNumber = 1;
-        if (content.pageNumber > content.pageTotal) return;
-        _Http.basic({
-            "id": 20221020143502,
-            content
-        }).then(res => {
-            console.log("客户商机列表", res)
-            this.selectComponent('#ListBox').RefreshToComplete();
-            if (res.msg != '成功') return wx.showToast({
-                title: res.data,
-                icon: "none"
-            })
-            res.data = res.data.map(v => {
-                v.winrate = parseFloat(v.winrate.substring(0, v.winrate.length - 1));
-                return v
-            })
-            this.setData({
-                'content.pageNumber': res.pageNumber + 1,
-                'content.pageTotal': res.pageTotal,
-                'content.total': res.total,
-                list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
-            })
-        })
-    },
-    onReady() {
-        getHeight.getHeight('.total', this).then(res => this.setData({
-            listHeight: res
-        }));
-    },
-})

+ 0 - 6
packageA/project/search.json

@@ -1,6 +0,0 @@
-{
-    "usingComponents": {
-        "List":"./modules/list/index"
-    },
-    "navigationBarTitleText": "搜索"
-}

+ 0 - 4
packageA/project/search.scss

@@ -1,4 +0,0 @@
-page {
-    height: 100vh;
-    overflow: hidden;
-}

+ 0 - 6
packageA/project/search.wxml

@@ -1,6 +0,0 @@
-<van-search class="total" value="{{ content.where.condition }}" shape="round" placeholder="请输入搜索关键词" bind:search='startSearch' bind:clear='onClear' />
-
-<My_listBox id='ListBox' height="{{listHeight}}" bind:getlist='getList'>
-    <view style="height: 20rpx;" />
-    <List list='{{list}}' />
-</My_listBox>