|
|
@ -241,7 +241,6 @@ function renderList() { |
|
|
|
currentRow = row; |
|
|
|
const cell = row.find('td').eq(1); // 编辑第2列数据
|
|
|
|
const currentValue = cell.text(); |
|
|
|
console.log($('#editPopover').width(),'-----offset'); |
|
|
|
$('#editInput').val(currentValue); |
|
|
|
$('#editPopover').css({ |
|
|
|
top: row.offset().top - $('#editPopover').height() - row.height(), |
|
|
@ -265,10 +264,10 @@ function renderList() { |
|
|
|
}, |
|
|
|
success: function (res) { |
|
|
|
if(!res.status){ |
|
|
|
alert(`请求失败`); |
|
|
|
alert(res.info); |
|
|
|
}else{ |
|
|
|
currentRow.find('td').eq(1).html(newValue+'<img class="action-icon" src="../../images/edit.svg" alt="">'); |
|
|
|
} |
|
|
|
|
|
|
|
currentRow.find('td').eq(1).text(newValue); |
|
|
|
$('#editPopover').hide(); |
|
|
|
} |
|
|
|
}) |
|
|
@ -282,7 +281,6 @@ function renderList() { |
|
|
|
|
|
|
|
//Switch 开关切换
|
|
|
|
$('#tbody-wrap').on('change','.switch input',function () { |
|
|
|
// row.find('td').eq(2).text(status); // 更新状态列
|
|
|
|
const that = $(this); |
|
|
|
const row = that.closest('tr'); |
|
|
|
const isChecked = that.is(':checked'); |
|
|
@ -310,32 +308,6 @@ function renderList() { |
|
|
|
}) |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
function listenLogin() { |
|
|
|
if($('.addChildNumWrap, .modal-overlay').css("display") === "none"){ |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
const pageid = $('#pageid').val(); |
|
|
|
$.ajax({ |
|
|
|
type: "post", |
|
|
|
dataType: 'json', |
|
|
|
url: '/index/ajax_get_user_login', |
|
|
|
data: { |
|
|
|
pageid |
|
|
|
}, |
|
|
|
success: function (res) { |
|
|
|
if(res.status){ |
|
|
|
$('#bind_id').val(res.data.id); |
|
|
|
$('.scanSuccessText').html(res.data.nickname + ',扫码成功'); |
|
|
|
$('.scanSuccess').removeClass('hide'); |
|
|
|
}else{ |
|
|
|
setTimeout(listenLogin,3000) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
checkAddNewBtn(); |
|
|
|
function checkAddNewBtn(){ |
|
|
|
if($('#bind_id').val().length>0){ |
|
|
@ -343,12 +315,8 @@ function renderList() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// $('.addChildNumWrap, .modal-overlay').fadeIn();
|
|
|
|
// $('.addChildNumWrap, .modal-overlay').attr("display",'block')
|
|
|
|
|
|
|
|
$('.addNewBtn').click(function () { |
|
|
|
$('.addChildNumWrap, .modal-overlay').fadeIn(); |
|
|
|
// setTimeout(listenLogin,3000)
|
|
|
|
}); |
|
|
|
$('.cancelBtn').click(function(){ |
|
|
|
$('.addChildNumWrap, .modal-overlay').fadeOut(); |
|
|
|