修正友链

This commit is contained in:
liyukun 2022-02-28 15:15:48 +08:00
parent 0b499f60ce
commit 81e16ecec4
2 changed files with 7 additions and 7 deletions

View File

@ -52,7 +52,7 @@
<div class="card-toolbar clearfix">
<div class="toolbar-btn-action">
<button id="btn_add" type="button" class="btn btn-primary m-r-5"
onclick="iframe.createIframe('添加友链','/admin/friendlink/add')">
onclick="iframe.createIframe('添加友链','/admin/friend_link/add')">
<span class="mdi mdi-plus" aria-hidden="true"></span>新增
</button>
<a class="btn btn-warning" href="#!" onclick="delSelect()"><i class="mdi mdi-window-close"></i>
@ -144,14 +144,14 @@
},
events: {
'click .btn-edit': function (event, value, row, index) {
iframe.createIframe('修改友链', '/admin/friendlink/edit?id=' + row.id)
iframe.createIframe('修改友链', '/admin/friend_link/edit?id=' + row.id)
},
}
}],
onEditableSave: function (field, row) {
$.ajax({
type: "post",
url: "/admin/friendlink/save",
url: "/admin/friend_link/save",
data: row,
success: function (res) {
if (res.code == 200 || res.status == 200) {
@ -185,7 +185,7 @@
var newstate = (value == 1) ? 0 : 1; // 发送参数值跟当前参数值相反
$.ajax({
type: "post",
url: "/admin/friendlink/field?id=" + id,
url: "/admin/friend_link/field?id=" + id,
data: {field: field, value: newstate},
dataType: 'json',
success: function (res) {
@ -210,7 +210,7 @@
text: '确认',
btnClass: 'btn-danger',
action: function () {
$.post("/admin/friendlink/del", data = {id: id}, function (res) {
$.post("/admin/friend_link/del", data = {id: id}, function (res) {
if (res.status == 200 || res.code == 200) lightyear.notify(res.msg, 'success', 3000, 'mdi mdi-emoticon-happy', 'top', 'center');
else lightyear.notify(res.msg, 'danger', 3000, 'mdi mdi-emoticon-neutral', 'top', 'center');
location.reload();
@ -242,7 +242,7 @@
text: '确认',
btnClass: 'btn-danger',
action: function () {
$.post("/admin/friendlink/del", data = {id: checkID}, function (res) {
$.post("/admin/friend_link/del", data = {id: checkID}, function (res) {
if (res.status == 200 || res.code == 200) {
lightyear.notify(res.msg, 'success', 3000, 'mdi mdi-emoticon-happy', 'top', 'center');
location.reload();

View File

@ -106,7 +106,7 @@ INSERT INTO `ape_admin_auth` VALUES (26, '主题管理', 'mdi mdi-store', 0, 'ad
INSERT INTO `ape_admin_auth` VALUES (27, '主题管理', '', 26, 'admin', 'theme', 'index', '', '', 0, 0, 1, '/admin/theme/index', 0, 1, '1', '', 1613400349, 1582093161);
INSERT INTO `ape_admin_auth` VALUES (28, '主题商店', '', 26, 'admin', 'theme', 'store', '', '', 0, 0, 0, '/admin/theme/store', 0, 1, '1', '1', 1613400389, 1642946978);
INSERT INTO `ape_admin_auth` VALUES (29, '友链管理', 'mdi mdi-account-card-details', 0, 'admin', 'friend_link', 'index', '', '', 0, 0, 1, '/admin/friend_link/index', 0, 1, '1', '1', 1613400510, 1642947636);
INSERT INTO `ape_admin_auth` VALUES (30, '友链列表', '', 34, 'admin', 'friendlink', 'index', '', '', 0, 0, 1, '/admin/friendlink/index', 0, 1, '1', '', 1613400539, 1582093161);
INSERT INTO `ape_admin_auth` VALUES (30, '友链列表', '', 34, 'admin', 'friendlink', 'index', '', '', 0, 0, 1, '/admin/friend_link/index', 0, 1, '1', '', 1613400539, 1582093161);
INSERT INTO `ape_admin_auth` VALUES (31, '数据库管理', '', 8, 'admin', 'databases', 'index', '', '', 0, 0, 1, '/admin/databases/index', 0, 1, '1', '', 1635572569, 1635572671);
INSERT INTO `ape_admin_auth` VALUES (32, '友链管理', '', 29, 'admin', 'friend_link', 'index', '', '', 0, 0, 1, '/admin/friend_link/index', 0, 1, '1', '1', 1642089882, 1642947643);