const _Http = getApp().globalData.http;
Page({
    data: {

    },
    onLoad(options) {
        let content = JSON.parse(options.content);
        this.setData({
            content
        })
        this.getList();
    },
    getList(init = false) {
        let content = this.data.content;
        if (init) content.pageNumber = 1;
        if (content.pageNumber > content.pageTotal) return;
        _Http.basic({
            "id": 20221128144904,
            content
        }).then(res => {
            console.log("工作评估历史", res)
            if (res.msg != '成功') return wx.showToast({
                title: res.msg,
                icon: "none"
            });
            this.setData({
                list: res.data,
                "content.pageNumber": res.pageNumber + 1,
                "content.pageTotal": res.pageTotal,
                total: res.total,
            })
        })
    },
    onReachBottom() {
        this.getList();
    },
})