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 @@
-