1
0
mirror of https://gitee.com/bookshelfplus/bookshelfplus synced 2025-09-21 01:10:39 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

管理员后台文件管理前端页面完成;一些小调整

This commit is contained in:
2022-04-10 16:50:08 +08:00
parent dc1e8ee810
commit 2912c09098
7 changed files with 86 additions and 32 deletions

View File

@@ -5,6 +5,15 @@
<input id="searchButton" type="button" value="搜索" />
<!-- 搜索书籍 -->
<script>
var requestParams = getParams();
var searchbox = document.getElementById("searchInput");
var keyword = (requestParams["keyword"] || "").trim();
search({
tableElementId: "book-table",
searchText: null,
categoryId: null
});
$("#searchButton").click(function () {
search({
tableElementId: "book-table",
@@ -29,18 +38,18 @@
var columnWidth = [20, 15, 10, 15, 5, 35];
renderData.push({
编号: `${element.id}`,
书名: ` <a target="_blank" href="/book?id=${element.id}">
书名: `<a target="_blank" href="/book?id=${element.id}">
<span class="overflow-omit" style="max-width: ${columnWidth[0] * mainDivWidth / 100}vw; max-height: 2em; margin: 0 auto;">
${element.bookName}
</span>
</a>`,
分类: ` <a target="_blank" href="/category?id=${element.category.id}">
分类: `<a target="_blank" href="/category?id=${element.category.id}">
<span class="overflow-omit" style="max-width: ${columnWidth[1] * mainDivWidth / 100}vw; max-height: 2em; margin: 0 auto;">
${element.category.name}
</span>
</a>`,
作者: `${element.author}`,
语言: ` <span class="overflow-omit" style="max-width: ${columnWidth[2] * mainDivWidth / 100}vw; max-height: 2em; margin: 0 auto;">
语言: `<span class="overflow-omit" style="max-width: ${columnWidth[2] * mainDivWidth / 100}vw; max-height: 2em; margin: 0 auto;">
${element.language}
</span>`,
出版社: `<span class="overflow-omit" style="max-width: ${columnWidth[3] * mainDivWidth / 100}vw; max-height: 2em; margin: 0 auto;">
@@ -75,11 +84,6 @@
} else {
renderTable({ data: renderData, tableId: tableElementId, renderTableHead: true });
}
// 渲染后重新获取一次字体
if (typeof (fontmin) === "function") {
fontmin(getPageText());
}
} else {
alert(`出错啦!${data.errMsg} (错误码: ${data.errCode}) `);
}