|
@@ -3,7 +3,7 @@
|
|
<template>
|
|
<template>
|
|
<div class="shelfs">
|
|
<div class="shelfs">
|
|
<div class="shelf_title"><text>书架</text></div>
|
|
<div class="shelf_title"><text>书架</text></div>
|
|
- <div class="book_detail">
|
|
|
|
|
|
+ <div if="{{Object.keys(firstBook).length > 0}}" class="book_detail">
|
|
<div class="shelf-first__content">
|
|
<div class="shelf-first__content">
|
|
<image src="{{firstBook.cover_url}}"></image>
|
|
<image src="{{firstBook.cover_url}}"></image>
|
|
<div class="book-info__multi">
|
|
<div class="book-info__multi">
|
|
@@ -183,13 +183,18 @@ export default {
|
|
delete m.cover
|
|
delete m.cover
|
|
delete m.cid
|
|
delete m.cid
|
|
})
|
|
})
|
|
|
|
+
|
|
this.booksize = r.length
|
|
this.booksize = r.length
|
|
// 获取书架的第一本书
|
|
// 获取书架的第一本书
|
|
- r.forEach((element,index) => {
|
|
|
|
- index === 0 ? this.firstBook = element : this.firstBook;
|
|
|
|
- return;
|
|
|
|
- });
|
|
|
|
- console.log("this.firstBook:",this.firstBook);
|
|
|
|
|
|
+ // r.forEach((element,index) => {
|
|
|
|
+ // index === 0 ? this.firstBook = element : this.firstBook;
|
|
|
|
+ // return;
|
|
|
|
+ // });
|
|
|
|
+ if(this.booksize > 0){
|
|
|
|
+ this.firstBook = r[0];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // console.log("this.firstBook:",this.firstBook,"this.firstBook.length",Object.keys(this.firstBook).length);
|
|
this.mockList = r
|
|
this.mockList = r
|
|
this.isinit = true
|
|
this.isinit = true
|
|
console.log(this.mockList);
|
|
console.log(this.mockList);
|