| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 | const _Http = getApp().globalData.http;Page({    data: {    },    onLoad(options) {        this.setData({            content: JSON.parse(options.perams)        })        this.getList();    },    /* 开始搜索 */    startSearch({        detail    }) {        this.setData({            "content.where.condition": detail        });        this.getList(true);    },    onClear() {        this.setData({            "content.where.condition": ""        });        this.getList(true);    },    /* 获取地址列表 */    getList(init) {        let content = this.data.content;        if (init) content.pageNumber = 1;        if (content.pageNumber > content.pageTotal) return;        _Http.basic({            "id": "20221022165503",            content        }).then(res => {            console.log("联系人列表", res)            if (res.msg != '成功') return wx.showToast({                title: res.data,                icon: "none"            })            this.setData({                list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),                "content.pageNumber": res.pageNumber + 1,                "content.pageSize": res.pageSize,                "content.pageTotal": res.pageTotal,                "content.total": res.total            })        })    },    onReachBottom() {        this.getList();    },})
 |