function is_top(obj,news_id,type,st){

    var flag = 'y';
    var msg = '确认设置新闻为审核通过';
    var text = '已审核';

    switch (type){
        case 'is_top':
            if (st=='y'){
                msg = '确认从置顶中移除？';
                flag = 'n';
                text = '未置顶';
            }else{
                msg = '确认加入置顶？';
                flag = 'y';
                text = '已置顶';
            }
            break;

        case 'is_slide':
            if (st=='y'){
                msg = '确认从轮播中移除？';
                flag = 'n';
                text = '未轮播';
            }else{
                msg = '确认加入轮播？';
                flag = 'y';
                text = '已轮播';
            }
        case 'is_hot':
            if (st=='y'){
                msg = '确认从首页推荐中移除？';
                flag = 'n';
                text = '推未顶';
            }else{
                msg = '确认设置为首页推荐？';
                flag = 'y';
                text = '推已顶';
            }
            break;
    }


    $.confirm({
        // confirmButtonClass: 'btn-info',
        // cancelButtonClass: 'btn-info',
        cancelButtonClass: 'btn-info',
        confirmButtonClass: 'btn-danger',
        confirmButton: '确认',
        cancelButton: '取消',
        content:'确认要'+msg,


        confirm: function () {


            var opts = new FormData();

            opts.append('news_id', news_id);
            opts.append('st', flag);
            opts.append('type', type);

            //发异步删除数据

            fetch_response('POST','/web/news/is_top',opts).then(function(response){
                console.log('response',response)

                if (response['code'] == 200) {

                    $('body').toast({
                        position: 'fixed',
                        content: response.msg,
                        duration: 1000,
                        top: '50%'
                    });
                    setTimeout(function () {
                        window.location.href = '/web/mynews';
                    }, 2000)


                } else {

                    $('body').toast({
                        position:'fixed',
                        content:response.msg,
                        duration:1000,
                        top:'50%'
                    });

                }
            })

        },
        cancel: function () {
            $('body').toast({
                position:'fixed',
                content:'已取消',
                duration:1000,
                top:'50%'
            });
        }
    });
}