记得上下班打卡 | git大法好,push需谨慎

Commit 21c86e5f authored by wangyifan's avatar wangyifan

下架增加loading状态

parent dd1f7480
......@@ -222,10 +222,20 @@
// ---------- 下架 ----------
function changeStatus(topicId, status) {
$.modal.confirm("确认要将该专题下架吗?", function() {
$.modal.loading("正在下架,请稍候...");
$.ajax({
type: 'post', url: prefix + "/status",
data: { topicId: topicId, status: status },
success: function() { $.table.refresh(); }
success: function(res) {
$.modal.closeLoading();
if (res.code == 0) {
$.modal.msgSuccess("下架成功");
$.table.refresh();
} else {
$.modal.alertError(res.msg);
}
},
error: function() { $.modal.closeLoading(); }
});
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment