|
@@ -1,18 +1,23 @@
|
|
|
+<import name="short-page" src="../../components/short/index.ux"></import>
|
|
|
<template>
|
|
|
- <list class="reader-wrap" id='list'>
|
|
|
- <list-item type='title' class="reader-title">
|
|
|
- <text class="title">{{bookinfo.chapter_name}}</text>
|
|
|
- <!-- <text class="add-shelf" @click="addShelf">加入书架</text> -->
|
|
|
- </list-item>
|
|
|
- <list-item type='content' class="reader-content">
|
|
|
- <text class="chapter-text" for='content'>{{$item}}</text>
|
|
|
- </list-item>
|
|
|
- <list-item type='button' class="reader-operator">
|
|
|
- <text class="operator prev" @click="getPrevChapter">上一章</text>
|
|
|
- <text class="operator catalog" @click="toCatalog">目录</text>
|
|
|
- <text class="operator next" @click="getNextChapter">下一章</text>
|
|
|
- </list-item>
|
|
|
- </list>
|
|
|
+ <div id="reader-content">
|
|
|
+ <list class="reader-wrap" id='list'>
|
|
|
+ <list-item type='title' class="reader-title">
|
|
|
+ <text class="title">{{bookinfo.chapter_name}}</text>
|
|
|
+ <!-- <text class="add-shelf" @click="addShelf">加入书架</text> -->
|
|
|
+ </list-item>
|
|
|
+ <list-item type='content' class="reader-content">
|
|
|
+ <text class="chapter-text" for='content'>{{$item}}</text>
|
|
|
+ </list-item>
|
|
|
+ <list-item type='button' class="reader-operator">
|
|
|
+ <text class="operator prev" @click="getPrevChapter">上一章</text>
|
|
|
+ <text class="operator catalog" @click="toCatalog">目录</text>
|
|
|
+ <text class="operator next" @click="getNextChapter">下一章</text>
|
|
|
+ </list-item>
|
|
|
+ </list>
|
|
|
+ <short-page if="{{showShortPop}}"></short-page>
|
|
|
+ </div>
|
|
|
+
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
@@ -26,14 +31,18 @@ export default {
|
|
|
},
|
|
|
private: {
|
|
|
bookinfo: {},
|
|
|
- content: []
|
|
|
+ content: [],
|
|
|
+ showShortPop: false
|
|
|
},
|
|
|
onInit() {
|
|
|
getChapters({ bid: this.bid, chapter_id: this.chapter_id }).then(r => {
|
|
|
this.content = r.chapter_content.trim().split(/\n/)
|
|
|
this.bookinfo = r
|
|
|
})
|
|
|
- this.addShelf()
|
|
|
+ this.addShelf();
|
|
|
+ if (this.$app.$def.data.backClickCount === 0) {
|
|
|
+ this.showShortPop = true;
|
|
|
+ }
|
|
|
},
|
|
|
addShelf() {
|
|
|
console.log("add shelf");
|