|
@@ -3,8 +3,18 @@
|
|
|
<template>
|
|
|
<div class="shelfs">
|
|
|
<div class="shelf_title"><text>书架</text></div>
|
|
|
+ <div class="book_detail">
|
|
|
+ <div class="shelf-first__content">
|
|
|
+ <image src="{{firstBook.cover_url}}"></image>
|
|
|
+ <div class="book-info__multi">
|
|
|
+ <text class="name">{{ firstBook.book_name }}</text>
|
|
|
+ <text class="intro">{{ firstBook.intro }}</text>
|
|
|
+ <text> {{firstBook.author+"·"+(firstBook.status ==0 ? "连载·":"完结·")+(firstBook.size < 10000 ? firstBook.size : (firstBook.size/10000).toFixed(2)+"万")}} </text>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<stack class="shelf">
|
|
|
- <div class="shelf-wrap">
|
|
|
+ <div class="shelf-wrap">>
|
|
|
<!-- <div class="type-bar">
|
|
|
<div class="search-bar__wrap">
|
|
|
<text @click="toSearch">请输入书名或者作者名</text
|
|
@@ -13,7 +23,6 @@
|
|
|
></image>
|
|
|
</div>
|
|
|
</div> -->
|
|
|
-
|
|
|
<div
|
|
|
class="shelf-total {{current === 1 ? 'shelf-total__inRecent' : ''}}"
|
|
|
if="{{mockList.length>0}}"
|
|
@@ -142,12 +151,13 @@ export default {
|
|
|
name: '最近阅读',
|
|
|
index: 1
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ firstBook:{}
|
|
|
}
|
|
|
},
|
|
|
onInit() {
|
|
|
console.log('tabindex:', this.tabindex)
|
|
|
- // this.getUserShelfBooks()
|
|
|
+ this.getUserShelfBooks();
|
|
|
this.$watch('isDelMode', 'listenMode')
|
|
|
this.$watch('tabindex', 'watchPropsChange')
|
|
|
this.$on('refreshData', this.broadevt)
|
|
@@ -174,9 +184,16 @@ export default {
|
|
|
delete m.cid
|
|
|
})
|
|
|
this.booksize = r.length
|
|
|
+ // 获取书架的第一本书
|
|
|
+ r.forEach((element,index) => {
|
|
|
+ index === 0 ? this.firstBook = element : this.firstBook;
|
|
|
+ return;
|
|
|
+ });
|
|
|
+ console.log("this.firstBook:",this.firstBook);
|
|
|
this.mockList = r
|
|
|
this.isinit = true
|
|
|
- console.log(this.mockList)
|
|
|
+ console.log(this.mockList);
|
|
|
+ // console.log("firstBook:",this.firstBook);
|
|
|
})
|
|
|
},
|
|
|
deleteBook(book) {
|