mirror of
https://gitee.com/bookshelfplus/bookshelfplus
synced 2025-10-21 22:56:41 +08:00
添加测试类,去除多余的import
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
postRequest('/debug/status', { token: localStorage.token })
|
||||
.then(function (response) {
|
||||
var axiosData = response.data;
|
||||
var status = axiosData.status;
|
||||
var data = axiosData.data;
|
||||
|
||||
if (status === "success") {
|
||||
console.log(data);
|
||||
$(".main").html("请在 F12 查看");
|
||||
} else {
|
||||
alert(`出错啦!${data.errMsg} (错误码: ${data.errCode}) `);
|
||||
}
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
@@ -79,6 +79,9 @@ router.get('/dashboard/:group/:page', function (req, res) {
|
||||
}, {
|
||||
name: "用户管理",
|
||||
url: "/dashboard/admin/UserManage"
|
||||
}, {
|
||||
name: "调试",
|
||||
url: "/dashboard/admin/Debug"
|
||||
}
|
||||
];
|
||||
} else if (req.params.group === "user") {
|
||||
@@ -110,7 +113,7 @@ router.get('/dashboard/:group/:page', function (req, res) {
|
||||
}
|
||||
|
||||
// 后台管理 其他管理页面
|
||||
if ((req.params.group === "admin" && ["UserManage", "BookManage", "CategoryManage"].indexOf(req.params.page) > -1) ||
|
||||
if ((req.params.group === "admin" && ["UserManage", "BookManage", "CategoryManage", "Debug"].indexOf(req.params.page) > -1) ||
|
||||
(req.params.group === "user" && ["myBookshelf", "myCollection"].indexOf(req.params.page) > -1)) {
|
||||
res.render(`dashboard/${req.params.group}/manage`, {
|
||||
title: getPageTitle(req.params.group === "admin" ? "后台管理" : "用户中心"),
|
||||
@@ -119,6 +122,7 @@ router.get('/dashboard/:group/:page', function (req, res) {
|
||||
"UserManage": "用户管理",
|
||||
"BookManage": "书籍管理",
|
||||
"CategoryManage": "分类管理",
|
||||
"Debug": "调试",
|
||||
// 用户
|
||||
"myBookshelf": "我的书架",
|
||||
"myCollection": "我的收藏",
|
||||
|
Reference in New Issue
Block a user