mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-11-10 13:00:49 +08:00
feat(notice): 我的消息与订阅设置个人域页面
This commit is contained in:
16
extend/base/admin/view/notice/subscribe.js
Normal file
16
extend/base/admin/view/notice/subscribe.js
Normal file
@@ -0,0 +1,16 @@
|
||||
$(function(){
|
||||
// 提交前补齐矩阵:layui 只序列化勾选的开关,
|
||||
// 这里把全部未禁用开关按当前状态补齐为 1/0,保证逐格显式 upsert
|
||||
function buildMatrix(dataField) {
|
||||
$('#subscribe-matrix input[type="checkbox"][name^="matrix["]').each(function () {
|
||||
var $input = $(this);
|
||||
if ($input.prop('disabled')) {
|
||||
return;
|
||||
}
|
||||
dataField[$input.attr('name')] = $input.prop('checked') ? 1 : 0;
|
||||
});
|
||||
return dataField;
|
||||
}
|
||||
|
||||
ua.listen(buildMatrix);
|
||||
})
|
||||
Reference in New Issue
Block a user