add confirm modal to video apply

dev_aliyun
p31729568 5 years ago
parent 405def5313
commit 8cf704f1fc

@ -59,20 +59,22 @@
<script type="text/javascript"> <script type="text/javascript">
function video_authorization_gree(id){ function video_authorization_gree(id){
if(window.confirm("确认同意该视频发布吗?")){
$.ajax({ $.ajax({
url: '/managements/video_applies/' + id + '/agree', url: '/managements/video_applies/' + id + '/agree',
type: 'post', type: 'post',
success: function(data){ success: function(data){
if (data && data.status != -1) { if (data && data.status != -1) {
$('#authentication_list .admin-con-box.apply-' + id).remove(); $('#authentication_list .admin-con-box.apply-' + id).remove();
if($('#authentication_list .admin-con-box').length == 0){ if($('#authentication_list .admin-con-box').length == 0){
location.reload(); location.reload();
}
} else {
alert(data.message);
} }
} else {
alert(data.message);
} }
}
}) })
}
} }
</script> </script>
Loading…
Cancel
Save