...
|
...
|
@@ -14,6 +14,8 @@ function bindListPageEvent() { |
|
|
const $searchKey = $('#search-key');
|
|
|
const $statusSwitch = $('#status-switch');
|
|
|
const $publishForm = $('#publish-form');
|
|
|
const $noticeModal = $('#notice-modal');
|
|
|
const $noticeInput = $noticeModal.find('.notice-input');
|
|
|
|
|
|
const searchFn = function() {
|
|
|
let val = $searchKey.val();
|
...
|
...
|
@@ -81,10 +83,11 @@ function bindListPageEvent() { |
|
|
tips[this.name] = this.value;
|
|
|
});
|
|
|
|
|
|
if (error) {
|
|
|
alert('请填写完整各端提示信息后进行开奖');
|
|
|
return;
|
|
|
}
|
|
|
// 暂时不限制必填
|
|
|
// if (error) {
|
|
|
// alert('请填写完整各端提示信息后进行开奖');
|
|
|
// return;
|
|
|
// }
|
|
|
|
|
|
$.ajax({
|
|
|
method: 'post',
|
...
|
...
|
@@ -104,6 +107,47 @@ function bindListPageEvent() { |
|
|
});
|
|
|
};
|
|
|
|
|
|
const noticeFn = function() {
|
|
|
let noticeVal = $noticeInput.val();
|
|
|
|
|
|
if (!noticeVal) {
|
|
|
alert('请填写悬浮内容');
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
$.ajax({
|
|
|
method: 'post',
|
|
|
url: '/admin/activity/zerobuy/notice',
|
|
|
data: {
|
|
|
id: $noticeModal.data('id'),
|
|
|
notice: noticeVal
|
|
|
}
|
|
|
}).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
location.reload();
|
|
|
} else {
|
|
|
alert(res.message);
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
|
|
|
const joinnumFn = function() {
|
|
|
$.ajax({
|
|
|
method: 'post',
|
|
|
url: '/admin/activity/zerobuy/joinnum',
|
|
|
data: {
|
|
|
id: $(this).data('id')
|
|
|
}
|
|
|
}).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
$alert.find('.modal-text').text(`该活动当前参与人数为 ${res.data} 人`);
|
|
|
$alert.modal('show');
|
|
|
} else {
|
|
|
alert(res.message);
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
|
|
|
$('#search-btn').on('click', searchFn);
|
|
|
$('.status-switch').on('click', statusFn);
|
|
|
|
...
|
...
|
@@ -116,7 +160,15 @@ function bindListPageEvent() { |
|
|
$confirm.data('channel', $(this).data('channel'));
|
|
|
$confirm.modal('show');
|
|
|
});
|
|
|
$('.btn-notice').on('click', function() {
|
|
|
$noticeInput.text('');
|
|
|
$noticeModal.data('id', $(this).data('id'));
|
|
|
$noticeModal.modal('show');
|
|
|
});
|
|
|
$('.btn-joinnum').on('click', joinnumFn);
|
|
|
|
|
|
$('.sure-publish-btn').on('click', publishFn);
|
|
|
$('.sure-notice-btn').on('click', noticeFn);
|
|
|
}
|
|
|
|
|
|
let uploadedFn;
|
...
|
...
|
|