diff --git a/api/book.js b/api/book.js index a6e5b65..5dd8a87 100644 --- a/api/book.js +++ b/api/book.js @@ -1,6 +1,7 @@ import request from '../utils/request'; // 查询读者当前借阅(群) +// http://192.168.99.63:14000/api/screenSetting/rdloanlist?rdid=420703GD0000748&sm4Key=86ACEF6CE6A65A4A&thirdAppid=feitian_gdlib&thirdSecret=edi56b6p5hi69dwk03so86uv2olhszqp&thirdUrl=http://218.200.95.251:8088/openlib export function FetchRdloanlist(data) { return request({ url: '/api/screenSetting/rdloanlist', @@ -8,6 +9,25 @@ export function FetchRdloanlist(data) { }) } +// 查询读者历史借阅 +// http://192.168.99.63:14000/api/screenSetting/historyloan?rdid=420703GD0000748&sm4Key=86ACEF6CE6A65A4A&thirdAppid=feitian_gdlib&thirdSecret=edi56b6p5hi69dwk03so86uv2olhszqp&thirdUrl=http://218.200.95.251:8088/openlib +export function FetchHistoryloan(data) { + return request({ + url: '/api/screenSetting/historyloan', + data + }) +} + + +// 续借(群) +// http://192.168.99.63:14000/api/screenSetting/renewbook?barcode=420703GD00004461&logtype=30007&opuser=JH001&rdid=420703GD0000748&sm4Key=86ACEF6CE6A65A4A&thirdAppid=feitian_gdlib&thirdSecret=edi56b6p5hi69dwk03so86uv2olhszqp&thirdUrl=http://218.200.95.251:8088/openlib +export function FetchRenewbook(data) { + return request({ + url: '/api/screenSetting/renewbook', + data + }) +} + // 图书推荐 export function FetchInitScreenBookRecommend(data) { @@ -17,10 +37,50 @@ export function FetchInitScreenBookRecommend(data) { }) } +// 图书检索接口 +// http://192.168.99.63:14000/api/screenSetting/bookSearch?opacUrl=http%3A%2F%2F218.200.95.251%3A8081%2Fopac%2F&page=1&query=%E5%BE%AE%E4%BF%A1&rows=10&scWay=dim&searchWay=title&sortOrder=desc&sortWay=score + +// opacUrl / page:'1' / query / rows:'10' / scWay / searchWay / sortOrder desc / sortWay +export function FetchBookSearch(data) { + return request({ + url: '/api/screenSetting/bookSearch', + data + }) +} + + +// 书目记录号获取书目信息接口 +// /api/screenSetting/findbookByQuery?opacUrl=http://218.200.95.251:8081/opac/&bookrecno= + +export function FetchFindbookByQuery(data) { + return request({ + url: '/api/screenSetting/findbookByQuery', + data + }) +} + +// 通过isbn获取图书封面 +export function FetchCoverByISBN(data) { + return request({ + url: '/dxhtsg/getCoverByISBN', + data + }) +} + + +// 文献排行榜 +// /api/screenSetting/sync36 + +// 读者借阅排行榜 +export function FetchBookRanking(data) { + return request({ + url: '/api/screenSetting/sync36', + data + }) +} + +// 馆藏量 +// /api/screenSetting/sync35 -// export function FetchInitScreenBookRecommend(data) { -// return request({ -// url: '/qyzt/getNewBook', -// data -// }) -// } \ No newline at end of file +// 累计借出 +// /api/screenSetting/sync82 \ No newline at end of file diff --git a/components/book-list-item/book-list-item.vue b/components/book-list-item/book-list-item.vue index 85ecef4..cbaf45e 100644 --- a/components/book-list-item/book-list-item.vue +++ b/components/book-list-item/book-list-item.vue @@ -9,12 +9,13 @@ /> --> - {{ data.name || '暂无标题' }} + {{ data.title || data.name || '暂无标题' }} {{ data.author || '佚名' }} {{ data.publisher || '暂无出版社数据' }} @@ -45,6 +46,9 @@ export default { } }, methods: { + onImgError(e) { + e.target.src = "/static/images/default-book.png"; + }, hotNumber(num) { if (!num) return "0"; if (num >= 10000) { diff --git a/components/lending-list-item/lending-list-item.vue b/components/lending-list-item/lending-list-item.vue index 410d2e0..4265829 100644 --- a/components/lending-list-item/lending-list-item.vue +++ b/components/lending-list-item/lending-list-item.vue @@ -4,31 +4,39 @@ {{ data.title || '暂无标题' }} - {{ data.nickname || '佚名' }} - {{ data.publish || '暂无出版社数据' }} + {{ data.author || '佚名' }} - {{ data.desc || '暂无简介' }} + {{ data.localname || data.oplocalname }} + - 借阅开始时间:{{ data.startTime || '' }} - 最后归还时间:{{ data.returnTime || '' }} - 实际归还时间:{{ data.realityTime }} + 借书时间:{{ data.loantime || '' }} + 应还时间:{{ data.returntime || '' }} - - - - - - + + + + @@ -40,10 +48,44 @@ export default { data: { type: Object, required: true + }, + // 父组件传:是否是在借列表 + isLending: { + type: Boolean, + default: false + } + }, + computed: { + status() { + if (!this.isLending || !this.data.returntime) return ''; + + const now = Date.now(); + const returnTime = new Date(this.data.returntime).getTime(); + + // 相差毫秒数 + const diffTime = returnTime - now; + // 换算成天数 + const day = diffTime / (1000 * 60 * 60 * 24); + + // 1. 已经过期 → 逾期 + if (day < 0) { + return 'overdue'; + } + + // 2. 没过期,但 ≤3 天 → 临期 + if (day <= 3) { + return 'warning'; + } + + // 3. 大于3天 → 正常,不显示 + return ''; } }, methods: { - } + onImgError(e) { + e.target.src = "/static/images/default-book.png"; + } + }, }; @@ -54,40 +96,44 @@ export default { border-radius: 6px; border-bottom: 1px solid #f4f4f4; margin-bottom: 10px; + .book-item-box { display: flex; justify-content: flex-start; align-items: flex-start; + .item-box-left { margin-right: 10px; - .img-item{ + + .img-item { width: 64px; height: 90px; border-radius: 5px; } } + .item-box-right { display: flex; flex-direction: column; justify-content: flex-start; flex: 1; + .item-title { font-size: 15px; font-weight: bold; color: #000; - padding-bottom: 6px; + margin-bottom: 6px; } - .item-author, - .item-publish { + + .item-author { font-size: 12px; color: #191A1A; padding: 2px 4px; border-radius: 2px; background-color: #F4F6FC; - } - .item-author{ margin-right: 6px; } + .item-desc { font-size: 12px; color: #191A1A; @@ -96,20 +142,39 @@ export default { } } } -.lending-info{ + +.lending-info { display: flex; justify-content: space-between; align-items: center; padding: 10px 10px 10px 0; - .lending-time{ + + .lending-time { font-size: 12px; display: flex; flex-direction: column; justify-content: flex-start; line-height: 22px; } - .lending-status{ + + .lending-status { height: 50px; } + + .type-tag { + padding: 4px 10px; + border-radius: 12px; + font-size: 12px; + color: #fff; + font-weight: bold; + } + + .tag-lend { + background-color: #409eff; + } + + .tag-return { + background-color: #ff3871; + } } \ No newline at end of file diff --git a/pages.json b/pages.json index 5de74b1..9b18b57 100644 --- a/pages.json +++ b/pages.json @@ -150,12 +150,6 @@ "style": { "navigationBarTitleText": "" } - }, - { - "path": "pages/unbind-card/unbind-card", - "style": { - "navigationBarTitleText": "" - } } ] } diff --git a/pages/home/home.vue b/pages/home/home.vue index de824db..a622c63 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -16,7 +16,7 @@ 在借中 - + + - 借阅清单 + 历史借阅 @@ -54,19 +54,25 @@ 书目检索 - + 图书续借 - + + + + + + 电子证 - + @@ -84,12 +90,6 @@ 读者留言 - - - - - 电子证 - @@ -262,8 +262,9 @@ export default { } }, goToBookDetail(item) { + // 把整个图书对象 转成字符串 带过去 uni.navigateTo({ - url: "/subpkg/pages/book-detail/book-detail?isbn=" + item.isbn + url: "/subpkg/pages/book-detail/book-detail?bookData=" + encodeURIComponent(JSON.stringify(item)) }) }, @@ -279,6 +280,12 @@ export default { url: "/pages/search/search" }); }, + // 去图书借阅车页 + onToLendCar() { + uni.switchTab({ + url: "/pages/lendCar/lendCar" + }); + }, // 点击未绑定借阅证区域 触发跳转 toCheckLogin() { uni.navigateTo({ diff --git a/pages/lendCar/lendCar copy.vue b/pages/lendCar/lendCar copy.vue new file mode 100644 index 0000000..a75097f --- /dev/null +++ b/pages/lendCar/lendCar copy.vue @@ -0,0 +1,273 @@ + + + + + \ No newline at end of file diff --git a/pages/lendCar/lendCar.vue b/pages/lendCar/lendCar.vue index 4bb161b..45cceba 100644 --- a/pages/lendCar/lendCar.vue +++ b/pages/lendCar/lendCar.vue @@ -1,151 +1,170 @@ @@ -157,13 +176,8 @@ export default { } .count-text { margin-bottom: 10px; - display: flex; - justify-content: space-between; /* 数量左,设置右 */ - align-items: center; -} -.edit-btn { - color: #01a4fe; font-size: 14px; + color: #333; } .car-list { display: flex; @@ -188,58 +202,27 @@ export default { border-radius: 6px; } } - .item-box-right { - flex: 1; - } - .item-title { - font-weight: bold; - margin-bottom: 4px; - } - .item-author, - .item-publish { - font-size: 12px; - background: #f4f6fc; - padding: 2px 6px; - border-radius: 4px; - margin-right: 6px; - } - .item-desc { - font-size: 12px; - color: #999; - margin-top: 6px; + .item-box-right { flex: 1; } + .item-title { font-weight: bold; margin-bottom: 4px; } + .item-author { + font-size: 12px; background: #f4f6fc; + padding: 2px 6px; border-radius: 4px; margin-right: 6px; } + .item-desc { font-size: 12px; color: #999; margin-top: 6px; } } -.bottom-placeholder { - height: 60px; -} +.bottom-placeholder { height: 60px; } .car-bottom { - position: fixed; - left: 0; - bottom: 0; - right: 0; - background: #fff; - padding: 12px 15px; - display: flex; - justify-content: space-between; - align-items: center; - box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05); -} -.all-check { - display: flex; - align-items: center; + position: fixed; left: 0; bottom: 0; right: 0; + background: #fff; padding: 12px 15px; + display: flex; justify-content: space-between; align-items: center; + box-shadow: 0 -2px 5px rgba(0,0,0,0.05); } +.all-check { display: flex; align-items: center; } .join-btn { - font-size: 14px; - color: #fff; - margin: 0 !important; - background-color: #01a4fe !important; - border-radius: 23px; + font-size: 14px; color: #fff; + background: #01a4fe !important; border-radius: 23px; padding: 0 30px; - &::after{ - border: none !important; - } - &[disabled] { - background: #ccc !important; - } + &::after{ border: none !important; } + &[disabled] { background: #ccc !important; } } \ No newline at end of file diff --git a/pages/search/search.vue b/pages/search/search.vue index 60867ef..8e1ef92 100644 --- a/pages/search/search.vue +++ b/pages/search/search.vue @@ -32,141 +32,210 @@ - + - - - - 搜索到 {{ total }} 条记录,共 {{ totalPage }} 页,当前第 {{ page }} 页 - - 筛选 - + + + 搜索到 {{ total }} 条记录,共 {{ totalPage }} 页,当前第 {{ page }} 页 + + + - - - - - - - 上拉加载更多... - - - 没有更多数据了 - - - + + + + + + 上拉加载更多... + + + 没有更多数据了 + + + + + + + 没有检索到相关数据 + \ No newline at end of file diff --git a/pages/user/user.vue b/pages/user/user.vue index 38ccde9..6a3cd8d 100644 --- a/pages/user/user.vue +++ b/pages/user/user.vue @@ -263,7 +263,6 @@ export default { font-weight: 40; color: #fff; line-height: 17px; - opacity: 0.9; } } } diff --git a/static/iconfont.css b/static/iconfont.css index 5862b0d..dcde0dd 100644 --- a/static/iconfont.css +++ b/static/iconfont.css @@ -11,6 +11,10 @@ -moz-osx-font-smoothing: grayscale; } +.icon-kongshuju:before { + content: "\e61c"; +} + .icon-tuichu:before { content: "\e7ed"; } diff --git a/static/iconfont.ttf b/static/iconfont.ttf index 486df6f..b35479f 100644 Binary files a/static/iconfont.ttf and b/static/iconfont.ttf differ diff --git a/static/images/default-book.png b/static/images/default-book.png new file mode 100644 index 0000000..9d6579a Binary files /dev/null and b/static/images/default-book.png differ diff --git a/subpkg/pages/activity-list/activity-list copy.vue b/subpkg/pages/activity-list/activity-list copy.vue new file mode 100644 index 0000000..f93579a --- /dev/null +++ b/subpkg/pages/activity-list/activity-list copy.vue @@ -0,0 +1,157 @@ + + + + + \ No newline at end of file diff --git a/subpkg/pages/activity-list/activity-list.vue b/subpkg/pages/activity-list/activity-list.vue index f93579a..e5accee 100644 --- a/subpkg/pages/activity-list/activity-list.vue +++ b/subpkg/pages/activity-list/activity-list.vue @@ -9,15 +9,17 @@ @scrolltolower="onLoadMore" lower-threshold="100" > + + {{ item.title }} - - - {{ item.time }} - + + + {{ item.time }} + - - - - - + + + diff --git a/subpkg/pages/book-list/book-list.vue b/subpkg/pages/book-list/book-list.vue index 5e3b4ef..e68ee34 100644 --- a/subpkg/pages/book-list/book-list.vue +++ b/subpkg/pages/book-list/book-list.vue @@ -62,12 +62,12 @@ export default { } }, - // 跳详情 goToDetail(item) { + // 把整个图书对象 转成字符串 带过去 uni.navigateTo({ - url: "/subpkg/pages/book-detail/book-detail?isbn=" + item.isbn - }); - } + url: "/subpkg/pages/book-detail/book-detail?bookData=" + encodeURIComponent(JSON.stringify(item)) + }) + }, } }; diff --git a/subpkg/pages/feedback-list/feedback-list.vue b/subpkg/pages/feedback-list/feedback-list.vue index fbea0e5..4a63bb6 100644 --- a/subpkg/pages/feedback-list/feedback-list.vue +++ b/subpkg/pages/feedback-list/feedback-list.vue @@ -2,6 +2,14 @@ + + + + + 暂无留言 + + + - - + + @@ -48,58 +56,17 @@ export default { data() { return { - // 留言列表数据(可从接口获取) - feedbackList: [ - { - nickname: "用户1", - avatar: "/static/images/avatar.png", - content: "这篇文章充满了激情,从字里行间能体会到作者的喜爱之情,全文层次清晰,语句流畅,叙事生动具体,趣味性强。", - createTime: "2026-04-23 10:23:01", - likeNum: 12, - isLike: false - }, - { - nickname: "热情读者", - avatar: "/static/images/avatar.png", - content: "写得非常棒!情感真挚,结构完整,非常有感染力,值得大家阅读学习。", - createTime: "2026-04-23 11:10:05", - likeNum: 8, - isLike: false - }, - { - nickname: "热情读者", - avatar: "/static/images/avatar.png", - content: "写得非常棒!情感真挚,结构完整,非常有感染力,值得大家阅读学习。", - createTime: "2026-04-23 11:10:05", - likeNum: 8, - isLike: false - }, - { - nickname: "热情读者", - avatar: "/static/images/avatar.png", - content: "写得非常棒!情感真挚,结构完整,非常有感染力,值得大家阅读学习。", - createTime: "2026-04-23 11:10:05", - likeNum: 8, - isLike: false - } - ] + feedbackList: [] // 测试空数据 + // feedbackList: [你的数据] }; }, methods: { - // 点赞功能 likeComment(index) { const item = this.feedbackList[index]; - if (item.isLike) { - // 取消点赞 - item.likeNum--; - } else { - // 点赞 - item.likeNum++; - } + item.isLike ? item.likeNum-- : item.likeNum++; item.isLike = !item.isLike; }, - // 写留言 goWriteComment() { uni.navigateTo({ url: '/subpkg/pages/feedback/feedback' @@ -119,6 +86,18 @@ export default { .feedback-list { height: calc(100vh - 80px); overflow-y: scroll; + padding: 10px; +} + +/* 空状态 */ +.empty-box { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + height: calc(100vh - 200px); + color: #999; + font-size: 15px; } /* 单条留言 */ @@ -130,7 +109,6 @@ export default { box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06); } -/* 顶部:头像 + 用户名 + 点赞 */ .feedback-item-top { display: flex; justify-content: space-between; @@ -156,7 +134,6 @@ export default { font-weight: 500; } -/* 点赞 */ .like-box { display: flex; align-items: center; @@ -168,7 +145,6 @@ export default { margin-left: 4px; } -/* 留言内容 */ .feedback-content { line-height: 1.6; } diff --git a/subpkg/pages/myLending/myLending copy.vue b/subpkg/pages/myLending/myLending copy.vue new file mode 100644 index 0000000..1a89dfd --- /dev/null +++ b/subpkg/pages/myLending/myLending copy.vue @@ -0,0 +1,335 @@ + + + + + \ No newline at end of file diff --git a/subpkg/pages/myLending/myLending.vue b/subpkg/pages/myLending/myLending.vue index 0d33f75..3202c77 100644 --- a/subpkg/pages/myLending/myLending.vue +++ b/subpkg/pages/myLending/myLending.vue @@ -1,5 +1,6 @@ \ No newline at end of file diff --git a/subpkg/pages/ranking/ranking.vue b/subpkg/pages/ranking/ranking.vue index b643a2f..39db3e0 100644 --- a/subpkg/pages/ranking/ranking.vue +++ b/subpkg/pages/ranking/ranking.vue @@ -9,13 +9,19 @@ - 借阅排行 + 读者借阅排行 - 由本图书馆累计借阅而定期生成排行榜单 - + 由本图书馆近30天读者借阅次数生成排行榜单 + + + + + 暂无读者排行数据 + + @@ -32,129 +38,106 @@ - + {{ index + 1 }} - + + - {{ item.title }} - {{ item.author }} - {{ item.desc }} + {{ item.TITLE || '暂无书名' }} + {{ item.AUTHOR || '佚名' }} + + 借阅次数:{{ item.TOTALNUM || 0 }} 次 + + + \ No newline at end of file