|
@@ -34,30 +34,28 @@ export default {
|
|
|
chapter_sequence_index: 0,
|
|
|
startpage: 1,
|
|
|
loading: false,
|
|
|
- end: false,
|
|
|
- index: 1
|
|
|
+ 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)
|
|
|
+ // 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() {
|
|
|
- if (this.index == 1) return
|
|
|
let page = 1
|
|
|
var chapter_sequence_index = 0
|
|
|
if (this.chapter_sequence) {
|
|
@@ -78,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: {
|
|
@@ -86,7 +85,6 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- this.index = this.index + 1
|
|
|
router.push({
|
|
|
uri: "/views/Reader",
|
|
|
params: {
|