|
@@ -23,7 +23,7 @@
|
|
|
<text class="toggle" @click="toggleTextStatus">{{showLongText ? '收起' : '展开'}}</text>
|
|
|
</stack>
|
|
|
</div>
|
|
|
- <text class="lastest-chapter" @click="toRead(book.last_cid)">最新章节:{{book.last_chapter}}</text>
|
|
|
+ <text class="lastest-chapter" @click="toRead(book.last_cid,book.is_need_charge)">最新章节:{{book.last_chapter}}</text>
|
|
|
<div class="box-wrap short-chapter__list">
|
|
|
<div class="small-title">
|
|
|
<div class="wrap-left">
|
|
@@ -35,7 +35,7 @@
|
|
|
</div>
|
|
|
<div class="chapter-list">
|
|
|
<block for="chapters">
|
|
|
- <text class="chapter-item" @click="toRead($item.chapter_id)">{{$item.chapter_name}}</text>
|
|
|
+ <text class="chapter-item" @click="toRead($item.chapter_id,$item.is_need_charge)">{{$item.chapter_name}}</text>
|
|
|
</block>
|
|
|
</div>
|
|
|
<text class="more-chapters" @click="toBookCatalog">更多目录 ></text>
|
|
@@ -86,7 +86,17 @@ export default {
|
|
|
if (ret) this.book.is_on_user_shelf = 1, prompt.showToast({ message: "添加成功" });
|
|
|
}
|
|
|
},
|
|
|
- toRead(cid = "") {
|
|
|
+ toRead(cid = "", needCharge = 0) {
|
|
|
+ if (needCharge == 1) {
|
|
|
+ this.chapter_sequence = needCharge
|
|
|
+ router.push({
|
|
|
+ uri: "/views/Pay",
|
|
|
+ params: {
|
|
|
+ bid: this.book.book_id,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
let chapter_id = cid;
|
|
|
router.push({
|
|
|
uri: "/views/Reader",
|
|
@@ -113,10 +123,14 @@ export default {
|
|
|
this.chapters = await getShortCatalog(bid);
|
|
|
this.similar = await getSimilarBooks(this.book.book_category_id, bid);
|
|
|
},
|
|
|
- onInit() {
|
|
|
+ onShow() {
|
|
|
console.log("book bid", this.bid);
|
|
|
this.getBooksInfo(this.bid);
|
|
|
},
|
|
|
+ onInit() {
|
|
|
+ // console.log("book bid", this.bid);
|
|
|
+ // this.getBooksInfo(this.bid);
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
|