switch (sta) {
case '1':
var msg = '通过';
break;
case '4':
var msg = '拒绝通过';
break;
}
if (window.confirm('确定' +msg +'该评论吗?') == true) {
$.ajax({
type: 'post',
url: '/admin.php/Sshop/status',
data: {id: id, status: status},
success: function (data) {
data ? alert('状态修改成功') : alert('状态修改失败');
location.reload();
},
error: function () {
}
})
}
ajax 前置判断
最新推荐文章于 2021-09-20 23:06:06 发布