|
@@ -15,6 +15,12 @@
|
|
|
<div class="book-list__multi">
|
|
|
<block for="book in list">
|
|
|
<div class="book-item">
|
|
|
+ <div style="width:60px;margin-right:15px">
|
|
|
+ <image if="$idx<3" src="{{img[$idx]}}" class="book-index"></image>
|
|
|
+ <div else class="book-index_follow">
|
|
|
+ <text>{{$idx+1}}</text>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<x-book multi="{{true}}" width="{{150}}" book="{{book}}">
|
|
|
<div class="book-info__multi">
|
|
|
<text class="name">{{book.book_name}}</text>
|
|
@@ -30,6 +36,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { getRank } from "../../api";
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
@@ -44,53 +51,24 @@ export default {
|
|
|
index: 1
|
|
|
},
|
|
|
],
|
|
|
- list: [{
|
|
|
- "book_id": "DZ18V4EoMXNAkgqopVKrjLzebmWvdYPQ",
|
|
|
- "book_name": "最后赢家",
|
|
|
- "book_summary": "我为了钱做了上门女婿。我为了钱做了上门女婿。我为了钱做了上门女婿。我为了钱做了上门女婿。我为了钱做了上门女婿。我为了钱做了上门女婿。我为了钱做了上门女婿。我为了钱做了上门女婿。",
|
|
|
- "book_author": "小豌豆",
|
|
|
- "cover_url": "https://cdn-novel.iycdm.com/book/cover/201907241708063365.jpeg?x-oss-process=image/resize,w_200/format,jpg",
|
|
|
- "book_word_count": 3872962,
|
|
|
- "book_chapter_total": 1806,
|
|
|
- "book_category_id": 40,
|
|
|
- "book_category": "女婿文",
|
|
|
- "book_end_status": 1,
|
|
|
- "book_published_time": "",
|
|
|
- "copyright": "",
|
|
|
- "charge_type": "CHAPTER",
|
|
|
- "force_subscribe_chapter_id": 8,
|
|
|
- "update_time": null,
|
|
|
- "is_on_shelf": 2,
|
|
|
- "book_price": "8.99",
|
|
|
- "keyword": "",
|
|
|
- "recommend_index": "100.00",
|
|
|
- "is_show_index_content": 1,
|
|
|
- "click_count": 0,
|
|
|
- "product_id": 3375,
|
|
|
- "sex_preference": "男频",
|
|
|
- "last_cid": 1413448,
|
|
|
- "last_chapter": "后续一百七十四章",
|
|
|
- "first_cid": 1414575,
|
|
|
- "is_on_user_shelf": null,
|
|
|
- "last_chapter_is_vip": null,
|
|
|
- "is_need_charge": 0,
|
|
|
- "record_chapter_id": null,
|
|
|
- "record_chapter_name": null
|
|
|
- }],
|
|
|
- current: 0
|
|
|
- }
|
|
|
- },
|
|
|
- onInit() {
|
|
|
- for (var i = 0; i < 5; i++) {
|
|
|
- this.list.push(this.list[0])
|
|
|
+ list: [],
|
|
|
+ current: 0,
|
|
|
+ img: ['../../assets/imgs/rank_1.png', '../../assets/imgs/rank_2.png', '../../assets/imgs/rank_3.png']
|
|
|
}
|
|
|
},
|
|
|
- onShow() {
|
|
|
-
|
|
|
+ async onInit() {
|
|
|
+ await this.getCityListByTabChange();
|
|
|
+ this.$watch('current', 'getCityListByTabChange')
|
|
|
},
|
|
|
+ onShow() { },
|
|
|
typeChange(index) {
|
|
|
this.current = index;
|
|
|
},
|
|
|
+ async getCityListByTabChange(index = 0) {
|
|
|
+ let sex = index ? "1" : "2";
|
|
|
+ let ret = await getRank(sex);
|
|
|
+ this.list = ret;
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|