|
@@ -34,9 +34,28 @@ export default {
|
|
|
chapter_sequence_index: 0,
|
|
|
startpage: 1,
|
|
|
loading: false,
|
|
|
- end: false
|
|
|
+ end: false,
|
|
|
},
|
|
|
onInit() {
|
|
|
+ // let page = 1
|
|
|
+ // var chapter_sequence_index = 0
|
|
|
+ // if (this.chapter_sequence) {
|
|
|
+ // var chapter_sequence = this.chapter_sequence
|
|
|
+ // chapter_sequence_index = chapter_sequence % PER_PAGE_NUM - 1
|
|
|
+ // this.chapter_sequence_index = chapter_sequence_index
|
|
|
+ // page = Math.ceil(chapter_sequence / PER_PAGE_NUM)
|
|
|
+ // }
|
|
|
+ // this.startpage = page;
|
|
|
+ // getCatalog({ bid: this.bid, page: page, page_size: PER_PAGE_NUM }).then(r => {
|
|
|
+ // this.list = r.list
|
|
|
+ // this.meta = r.meta
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.$element('catalog').scrollTo({ index: chapter_sequence_index })
|
|
|
+ // }, 500)
|
|
|
+
|
|
|
+ // })
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
let page = 1
|
|
|
var chapter_sequence_index = 0
|
|
|
if (this.chapter_sequence) {
|
|
@@ -57,6 +76,7 @@ export default {
|
|
|
},
|
|
|
jumpReader(info) {
|
|
|
if (info.is_need_charge == 1) {
|
|
|
+ this.chapter_sequence = info.chapter_sequence
|
|
|
router.push({
|
|
|
uri: "/views/Pay",
|
|
|
params: {
|
|
@@ -80,7 +100,7 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
let params = {
|
|
|
- bid: '5pNo6A7wqQmB1WgQygDjkOM9VZn2vXeY',
|
|
|
+ bid: this.bid,
|
|
|
page: this.meta.current_page + 1,
|
|
|
page_size: PER_PAGE_NUM
|
|
|
}
|
|
@@ -95,7 +115,7 @@ export default {
|
|
|
console.log("get prev catalog");
|
|
|
if ((this.startpage - 1) < 1) return prompt.showToast({ message: '已经到顶啦' });
|
|
|
let params = {
|
|
|
- bid: '5pNo6A7wqQmB1WgQygDjkOM9VZn2vXeY',
|
|
|
+ bid: this.bid,
|
|
|
page: this.startpage - 1,
|
|
|
page_size: PER_PAGE_NUM
|
|
|
}
|