mess_admin.js 1.47 KB
/**
 * Created by Dell on 2018/9/5.
 */

/**
 * 删除留言 ajax实现
 * @param mid:留言ID
 * @returns {boolean}
 */
function jumpDel(mid)
{
    var delCon = confirm("确认删除该条留言?");
    if (delCon === false) {
        return false;
    }
    $.ajax({
        url:'http://lys.com/wx5019b9c455ea9c81/Message/Apicp/Message/MessDel/Del/?mid='+mid,
        type:'post',
        data:{
            'mid':mid
        },
        dataType:'json',
        success:function(data){
            if (data['result'] == 1) {
                alert("删除成功。");
                window.location.href = './list.php';
            }

        },
        error:function(e){
            alert("删除失败。");
            console.log("error:"+e);
        }
    });
}

function jumdAudit(mid)
{

    var status = 0;

    if ($('#audit_2').prop('checked') != false) {
        var reason = $('#reason').val();
        if ( reason == '') {
            alert('请填写驳回原因。');
            return false;
        }
        status = $('#audit_2').val();
    }
    if ($('#audit_3').prop('checked') != false ) {
        status = $('#audit_3').val();
    }
    if(status === 0){
        alert('请选择是否通过审核。');
        return false;
    }

    $.ajax({
        url:'',
        type:'',
        dataType:'',
        data:{
            'mid':mid,
            'status':status,
            'reason':reason
        },
        success:function(data){},
        error:function(e){}
    });
}