|
@@ -2,20 +2,20 @@
|
|
|
<import name="wechat-page" src="../../components/wechat/index.ux"></import>
|
|
|
<template>
|
|
|
<div id="reader-content">
|
|
|
- <list class="reader-wrap" id='list'>
|
|
|
- <list-item type='title' class="reader-title">
|
|
|
+ <div class="reader-wrap" id='list'>
|
|
|
+ <div 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">
|
|
|
+ </div>
|
|
|
+ <div type='content' class="reader-content">
|
|
|
<text class="chapter-text" for='content'>{{$item}}</text>
|
|
|
- </list-item>
|
|
|
- <list-item type='button' class="reader-operator">
|
|
|
+ </div>
|
|
|
+ <div 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>
|
|
|
+ </div>
|
|
|
<short-page if="{{showShortPop}}"></short-page>
|
|
|
<!-- <wechat-page></wechat-page> -->
|
|
|
</div>
|
|
@@ -44,8 +44,8 @@ export default {
|
|
|
this.showShortPop = true;
|
|
|
}
|
|
|
},
|
|
|
- onShow(){
|
|
|
- it.getShortCut(()=>{
|
|
|
+ onShow() {
|
|
|
+ it.getShortCut(() => {
|
|
|
this.showShortPop = true;
|
|
|
|
|
|
})
|
|
@@ -60,7 +60,7 @@ export default {
|
|
|
getChapters({ bid: bid, chapter_id: chapter_id }).then(r => {
|
|
|
this.content = r.chapter_content.trim().split(/\n/)
|
|
|
this.bookinfo = r
|
|
|
- this.$element('list').scrollTo({ index: 0 })
|
|
|
+ // this.$element('list').scrollTo({ index: 0 })
|
|
|
}).catch(e => {
|
|
|
console.log('e code')
|
|
|
console.log(e.data)
|
|
@@ -69,7 +69,7 @@ export default {
|
|
|
chapterOrders({ bid: bid, chapter_id: chapter_id }).then(r => {
|
|
|
this.content = r.chapter_content.trim().split(/\n/)
|
|
|
this.bookinfo = r
|
|
|
- this.$element('list').scrollTo({ index: 0 })
|
|
|
+ // this.$element('list').scrollTo({ index: 0 })
|
|
|
}).catch(f => {
|
|
|
console.log('f code')
|
|
|
console.log(f.data)
|
|
@@ -107,7 +107,14 @@ export default {
|
|
|
},
|
|
|
getPrevChapter() {
|
|
|
console.log("get prev chapter");
|
|
|
- this.getChapters(this.bookinfo.bid, this.bookinfo.prev_cid)
|
|
|
+ // this.getChapters(this.bookinfo.bid, this.bookinfo.prev_cid)
|
|
|
+ router.replace({
|
|
|
+ uri: "/views/Reader",
|
|
|
+ params: {
|
|
|
+ bid: this.bookinfo.bid,
|
|
|
+ chapter_id: this.bookinfo.prev_cid
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
getNextChapter() {
|
|
|
console.log("get next chapter");
|
|
@@ -120,7 +127,14 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- this.getChapters(this.bookinfo.bid, this.bookinfo.next_cid)
|
|
|
+ // this.getChapters(this.bookinfo.bid, this.bookinfo.next_cid)
|
|
|
+ router.replace({
|
|
|
+ uri: "/views/Reader",
|
|
|
+ params: {
|
|
|
+ bid: this.bookinfo.bid,
|
|
|
+ chapter_id: this.bookinfo.next_cid
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
</script>
|