Files
ulthon_admin/extend/base/admin/view/system/notice/read.js

22 lines
705 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

$(function(){
ua.listen();
// 无 resend 权限时隐藏行内重发按钮(与框架按钮保守隐藏口径一致)
if (ua.auth('resend') === false) {
$('.notice-resend-btn').remove();
}
// 失败投递行内重发:POST target_id,服务端原子重置 status=3 行后刷新明细
$(document).on('click', '.notice-resend-btn', function () {
var btn = $(this);
ua.request.post({
url: ua.url('system.notice/resend'),
data: {target_id: btn.data('target-id')},
}, function (res) {
ua.msg.success(res.msg || '已重发', function () {
location.reload();
});
});
});
})