Authored by yyq

notice 复填

... ... @@ -735,7 +735,7 @@ class AdminModel extends global.yoho.BaseModel {
}
editZerobuyNotice(params) {
if (!params.id || !params.notice) {
if (!params.id) {
return Promise.resolve({
code: 400,
message: '缺少参数'
... ...
... ... @@ -56,7 +56,7 @@
<td class="text-center">
<image src="{{cover_img}}" class="cover-img">
</td>
<td class="text-center">
<td class="text-center" data-notice="{{notice}}">
{{# btns}}
<button class="btn btn-{{color}} btn-{{type}}" data-id="{{../id}}" data-channel="{{../channel}}">{{name}}</button>
{{/ btns}}
... ...
... ... @@ -108,12 +108,7 @@ function bindListPageEvent() {
};
const noticeFn = function() {
let noticeVal = $noticeInput.val();
if (!noticeVal) {
alert('请填写悬浮内容');
return;
}
let noticeVal = $noticeInput.val() || '';
$.ajax({
method: 'post',
... ... @@ -161,7 +156,7 @@ function bindListPageEvent() {
$confirm.modal('show');
});
$('.btn-notice').on('click', function() {
$noticeInput.text('');
$noticeInput.val($(this).parent().data('notice') || '');
$noticeModal.data('id', $(this).data('id'));
$noticeModal.modal('show');
});
... ...