const _Http = getApp().globalData.http;

Page({
    data: {
        deletereason: "",
    },
    onLoad(options) {
        if (options.item) this.setData({
            ...JSON.parse(options.item)
        })
    },
    onInput(e) {
        this.setData({
            deletereason: e.detail.value
        })
    },
    handleDetele() {
        if(!this.data.deletereason) return;
        _Http.basic({
            "id": 20220930121701,
            "content": {
                ...this.data
            }
        }).then(res => {
            console.log("删除", res);
            if (res.msg != '成功') return wx.showToast({
                title: res.data,
                icon: "none"
            });
            wx.navigateBack();
            const pages = getCurrentPages();
            console.log(pages[pages.length - 2].selectComponent("#Trace").setDelete(this.data.sys_datafollowupid))
        })
    }
})