会员级别与会员权益修改
This commit is contained in:
@@ -39,12 +39,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
|
||||
// 为表格绑定事件
|
||||
Table.api.bindevent(table);
|
||||
|
||||
|
||||
// 添加跳转按钮函数
|
||||
function addJumpButtons() {
|
||||
var tbody = document.querySelector('table tbody');
|
||||
if (!tbody) return;
|
||||
|
||||
|
||||
var rows = tbody.querySelectorAll('tr');
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var row = rows[i];
|
||||
@@ -59,23 +59,23 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
jumpBtn.setAttribute('data-id', rowData.id);
|
||||
jumpBtn.style.marginLeft = '5px';
|
||||
jumpBtn.innerHTML = '<i class="fa fa-external-link"></i> 权益';
|
||||
|
||||
|
||||
// 绑定点击事件
|
||||
jumpBtn.onclick = (function(id) {
|
||||
return function() {
|
||||
window.location.href = 'rights?id=' + id;
|
||||
window.location.href = 'rights?level_id=' + id;
|
||||
};
|
||||
})(rowData.id);
|
||||
|
||||
|
||||
lastTd.appendChild(jumpBtn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 延迟执行确保表格已加载
|
||||
setTimeout(addJumpButtons, 500);
|
||||
|
||||
|
||||
// 监听表格刷新完成事件
|
||||
table.on('load-success.bs.table', function() {
|
||||
setTimeout(addJumpButtons, 100);
|
||||
@@ -94,4 +94,4 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -11,8 +11,8 @@ define(["jquery", "bootstrap", "backend", "table", "form"], function (
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: "wdsxh/member/rights/index" + location.search,
|
||||
add_url: "wdsxh/member/rights/add",
|
||||
edit_url: "wdsxh/member/rights/edit",
|
||||
add_url: "wdsxh/member/rights/add" + location.search,
|
||||
edit_url: "wdsxh/member/rights/edit" + location.search,
|
||||
del_url: "wdsxh/member/rights/del",
|
||||
table: "wdsxh_member_rights",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user