| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 | const _Http = getApp().globalData.http,    getHeight = require("../../../../../utils/getRheRemainingHeight");Page({    data: {        content: {            "sa_projectid": 1,            "pageNumber": 1,            "pageTotal": 1,            "pageSize": 20,            "where": {                "condition": ""            }        },    },    onLoad(options) {        console.log(options)    },    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": 20221111131004,            content        }).then(res => {            console.log("项目联系人搜索", res)            this.selectComponent('#ListBox').RefreshToComplete();            if (res.msg != '成功') return wx.showToast({                title: res.data,                icon: "none"            })            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)            })        })    },    /* 开始搜索 */    onSearch({        detail    }) {        if (this.data.content.where.condition == detail) return;        this.setData({            'content.where.condition': detail        });        this.getList(true)    },    onClear() {        this.setData({            'content.where.condition': ""        });        this.getList(true)    },    onReady() {        getHeight.getHeight('.total', this).then(res => this.setData({            listHeight: res        }));    },})
 |