|
@@ -25,7 +25,7 @@
|
25
|
25
|
<img :src="item.BookTypeImg" alt>
|
26
|
26
|
<span>{{item.BookTypeName}}</span>
|
27
|
27
|
</a>
|
28
|
|
- <a v-if="(navList || []).length >8 " @click="moreNav()">
|
|
28
|
+ <a v-if="(navList || []).length > 8 " @click="moreNav()">
|
29
|
29
|
<img src="https://spaceofcheng.oss-cn-beijing.aliyuncs.com/test-icon8.png" alt>
|
30
|
30
|
<span>更多</span>
|
31
|
31
|
</a>
|
|
@@ -34,7 +34,7 @@
|
34
|
34
|
<h1>精选推荐</h1>
|
35
|
35
|
<ul>
|
36
|
36
|
<li v-for="(item, index) in books.list" :key="index">
|
37
|
|
- <libraryListItem :data="item" @appointmentBook="appointmentBook"></libraryListItem>
|
|
37
|
+ <libraryListItem :data="item" :status="mineBookStatus(item)" @appointmentBook="appointmentBook"></libraryListItem>
|
38
|
38
|
</li>
|
39
|
39
|
</ul>
|
40
|
40
|
</div>
|
|
@@ -144,6 +144,7 @@ export default {
|
144
|
144
|
'getRecommendBook',
|
145
|
145
|
'getMineBook',
|
146
|
146
|
'reserveBook',
|
|
147
|
+ 'updateRecommendBookLeftNum',
|
147
|
148
|
]),
|
148
|
149
|
selectCaseId () { // 选择案场
|
149
|
150
|
if (this.currentCaseId !== this.caseId) {
|
|
@@ -170,6 +171,10 @@ export default {
|
170
|
171
|
this.onInfinite()
|
171
|
172
|
},
|
172
|
173
|
onInfinite () {
|
|
174
|
+ this.getMineBook({
|
|
175
|
+ page: 1,
|
|
176
|
+ pagesize: 1000,
|
|
177
|
+ })
|
173
|
178
|
this.page++
|
174
|
179
|
let more = this.$el.querySelector('.load-more')
|
175
|
180
|
this.getRecommendBook({
|
|
@@ -187,10 +192,6 @@ export default {
|
187
|
192
|
this.scrollData.noFlag = true
|
188
|
193
|
}
|
189
|
194
|
})
|
190
|
|
- this.getMineBook({
|
191
|
|
- page: 1,
|
192
|
|
- pagesize: 1000,
|
193
|
|
- })
|
194
|
195
|
},
|
195
|
196
|
appointmentBook (id) { // 预约图书
|
196
|
197
|
this.reserveBookId = id
|
|
@@ -200,6 +201,7 @@ export default {
|
200
|
201
|
this.reserveBook({
|
201
|
202
|
bookid: this.reserveBookId,
|
202
|
203
|
}).then(() => {
|
|
204
|
+ this.updateRecommendBookLeftNum(this.reserveBookId)
|
203
|
205
|
this.getMineBook({
|
204
|
206
|
page: 1,
|
205
|
207
|
pagesize: 1000,
|