let operate = (obj, status)=>{
    let data = $(obj).parent('td').data()
    let text = status == 1 ?
            `确定 "拒绝" 用户${data.uid} 的删除账号申请？” `:
            `确定 "通过" 用户${data.uid} 的删除账号申请？\n 确定后将 “删除该用户账号” `;
    if(confirm(text)){
        showLoading()
        $.post('/customer/delAccountOperate', {uid : data.uid, status : status}, (response)=>{
            hideLoading()
            response = jsonParse(response)
            alert(response.msg)
            if(response.ret == 1)window.location.reload()
        })
    }
}

let init = ()=>{
    $.each($('.row-data'), (i, o)=>{
        if($(o).data().status == 2){
            $(o).html(`<span>请求已通过</span>`)
        }
        if($(o).data().status == 1){
            $(o).html(`<span>请求已拒绝</span>`)
        }
    })
}
init();
