...
|
...
|
@@ -5,9 +5,15 @@ const _ = require('lodash'); |
|
|
const $alert = $('#alert-modal');
|
|
|
const $confirm = $('#confirm-modal');
|
|
|
|
|
|
$alert.showMsg = function(msg) {
|
|
|
this.find('.modal-text').text(msg);
|
|
|
this.modal('show');
|
|
|
};
|
|
|
|
|
|
function bindListPageEvent() {
|
|
|
const $searchKey = $('#search-key');
|
|
|
const $statusSwitch = $('#status-switch');
|
|
|
const $publishForm = $('#publish-form');
|
|
|
|
|
|
const searchFn = function() {
|
|
|
let val = $searchKey.val();
|
...
|
...
|
@@ -62,12 +68,30 @@ function bindListPageEvent() { |
|
|
};
|
|
|
|
|
|
const publishFn = function() {
|
|
|
let t = $publishForm.serializeArray();
|
|
|
let tips = {};
|
|
|
let error;
|
|
|
|
|
|
$.each(t, function() {
|
|
|
if (!this.value) {
|
|
|
error = true;
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
tips[this.name] = this.value;
|
|
|
});
|
|
|
|
|
|
if (error) {
|
|
|
alert('请填写完整各端提示信息后进行开奖');
|
|
|
}
|
|
|
|
|
|
$.ajax({
|
|
|
method: 'post',
|
|
|
url: '/admin/activity/zerobuy/publish',
|
|
|
data: {
|
|
|
id: $confirm.data('id'),
|
|
|
channel: $confirm.data('channel')
|
|
|
channel: $confirm.data('channel'),
|
|
|
lotteryInfo: JSON.stringify(tips)
|
|
|
}
|
|
|
}).then(res => {
|
|
|
if (res.code === 200) {
|
...
|
...
|
|