|
|
@ -41,7 +41,7 @@ $(document).ready(function () { |
|
|
|
$('.img_list2').removeClass('pd84') |
|
|
|
|
|
|
|
$('.normal-input').val(res.data.refer); |
|
|
|
$('.char-count').text(res.data.refer.length + '/100'); |
|
|
|
$('.char-count').text(res.data.refer.length + '/200'); |
|
|
|
if(res.data.refer.length>0){ |
|
|
|
$('.normal-form').show(); |
|
|
|
$('.normal-input').addClass('h74') |
|
|
@ -61,7 +61,7 @@ $(document).ready(function () { |
|
|
|
} |
|
|
|
|
|
|
|
$('.answer-input').val(res.data.text); |
|
|
|
$('.char-count1').text(res.data.text.length + '/100'); |
|
|
|
$('.char-count1').text(res.data.text.length + '/200'); |
|
|
|
|
|
|
|
if ($('.modal').hasClass('addmodal')) { |
|
|
|
$('.modal').removeClass('addmodal') |
|
|
@ -105,6 +105,7 @@ $(document).ready(function () { |
|
|
|
$('.modal').addClass('addmodal') |
|
|
|
} |
|
|
|
|
|
|
|
$('#id').val('') |
|
|
|
$('#header_title').html('新增自录入') |
|
|
|
$('.modal, .modal-overlay').fadeIn(); |
|
|
|
}); |
|
|
@ -138,13 +139,13 @@ $(document).ready(function () { |
|
|
|
// 关闭弹框
|
|
|
|
$('#cancel, .modal-overlay').click(function () { |
|
|
|
$('.modal, .modal-overlay').fadeOut(); |
|
|
|
$('.edit-input').val('') |
|
|
|
$('.wordNum').html('0/100') |
|
|
|
// $('.edit-input').val('')
|
|
|
|
// $('.wordNum').html('0/200')
|
|
|
|
}); |
|
|
|
$('#close_modal').click(function () { |
|
|
|
$('.modal, .modal-overlay').fadeOut(); |
|
|
|
$('.edit-input').val('') |
|
|
|
$('.wordNum').html('0/100') |
|
|
|
// $('.edit-input').val('')
|
|
|
|
// $('.wordNum').html('0/200')
|
|
|
|
}); |
|
|
|
|
|
|
|
// 上传图片
|
|
|
@ -500,11 +501,11 @@ $(document).ready(function () { |
|
|
|
</div> |
|
|
|
`;
|
|
|
|
} |
|
|
|
html1 += `<div class="list_item ">
|
|
|
|
html1 += `<div class="list_item item_index_${item.id}">
|
|
|
|
<div class="list_item_top flex"> |
|
|
|
<div class="list_item_top_l"> |
|
|
|
<span class="${item.wid != '' ? 'green' : 'blue'}">${item.wid != '' ? '微博' :'自录入'}</span> |
|
|
|
${item.refer ? `<b>${item.refer}</b>` :''} |
|
|
|
<b class="refer_text">${item.refer}</b> |
|
|
|
<span class="name">` + item.name + `</span> |
|
|
|
<span>录入:` + item.created_at + `</span> |
|
|
|
${item.wid ? `<a href="https://m.weibo.cn/detail/`+ item.wid + `" target="_blank">微博地址</a>` :''} |
|
|
@ -654,27 +655,18 @@ $(document).ready(function () { |
|
|
|
answer |
|
|
|
}, |
|
|
|
success: function (res) { |
|
|
|
if(!res.status){ |
|
|
|
alert(res.info) |
|
|
|
if(res.status){ |
|
|
|
} |
|
|
|
if(id){ |
|
|
|
$('.item_index_'+id).find('.refer_text').html(desc) |
|
|
|
$('.item_index_'+id).find('.desc_text').html(answer) |
|
|
|
}else{ |
|
|
|
window.location.reload(); |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
// if ($('.modal').hasClass('editmodal')) { //编辑
|
|
|
|
// var desc = $('.normal-input').val().trim()
|
|
|
|
// var answer = $('.answer-input').val().trim()
|
|
|
|
// // cur_editdata.id //当前编辑数据 后续用其他参数也可
|
|
|
|
//
|
|
|
|
// } else if ($('.modal').hasClass('addmodal')) { //新增
|
|
|
|
// var radio_val = $('.radio-wrap').find('.radio_box_active input').val();
|
|
|
|
// // 区分信息段、问答
|
|
|
|
// if (radio_val == '1') {
|
|
|
|
//
|
|
|
|
// } else {
|
|
|
|
//
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
$('.modal, .modal-overlay').fadeOut(); |
|
|
|
|
|
|
|
}) |
|
|
@ -695,10 +687,15 @@ $(document).ready(function () { |
|
|
|
status |
|
|
|
}, |
|
|
|
success: function (res) { |
|
|
|
if(!res.status){ |
|
|
|
alert(res.info) |
|
|
|
if(res.status){ |
|
|
|
window.location.reload(); |
|
|
|
} |
|
|
|
|
|
|
|
$('.item_index_'+id).fadeOut(300, function() { |
|
|
|
$(this).remove(); |
|
|
|
}); |
|
|
|
|
|
|
|
$('.index-nav-wrap-li[type="2"]').click(); |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
@ -719,8 +716,6 @@ $(document).ready(function () { |
|
|
|
$('.modal, .modal-overlay').fadeOut(); |
|
|
|
}) |
|
|
|
$('.list_all').on('click','.deleteBtn',function(){ |
|
|
|
if (!confirm("你确定要删除这条数据吗?")) return false; |
|
|
|
|
|
|
|
const id = $(this).data('id'); |
|
|
|
const that = $(this); |
|
|
|
// 列表删除
|
|
|
@ -744,8 +739,6 @@ $(document).ready(function () { |
|
|
|
}) |
|
|
|
}) |
|
|
|
$('.list_all').on('click','.passBtn',function(){ |
|
|
|
if (!confirm("你确定要通过这条数据吗?")) return false; |
|
|
|
|
|
|
|
const id = $(this).data('id'); |
|
|
|
const that = $(this); |
|
|
|
// 列表通过
|
|
|
@ -769,8 +762,6 @@ $(document).ready(function () { |
|
|
|
}) |
|
|
|
}) |
|
|
|
$('.list_all').on('click','.checkBtn',function(){ |
|
|
|
if (!confirm("你确定要通过这条数据吗?")) return false; |
|
|
|
|
|
|
|
const id = $(this).data('id'); |
|
|
|
const that = $(this); |
|
|
|
// 恢复待审批
|
|
|
|