|
@@ -208,7 +208,6 @@ export default {
|
|
this.back_name = decodeURI(this.back_name)
|
|
this.back_name = decodeURI(this.back_name)
|
|
if (this.platform && (this.platform == 'tx_adq' || this.platform == 'tx_adq_new')) {
|
|
if (this.platform && (this.platform == 'tx_adq' || this.platform == 'tx_adq_new')) {
|
|
if (this.back_url) {
|
|
if (this.back_url) {
|
|
- // console.log('book_info',book_info);
|
|
|
|
pkg.hasInstalled({
|
|
pkg.hasInstalled({
|
|
package: this.back_pkg,
|
|
package: this.back_pkg,
|
|
success: data => {
|
|
success: data => {
|
|
@@ -220,7 +219,6 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
fail: function (data, code) {
|
|
fail: function (data, code) {
|
|
- console.log(data)
|
|
|
|
},
|
|
},
|
|
complete: data => {
|
|
complete: data => {
|
|
|
|
|
|
@@ -229,12 +227,6 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
- /* let s = (await storage.get({ key: "send_order_id" })).data;
|
|
|
|
- console.log("save send_order_id in storage");
|
|
|
|
- console.log("send_order_id", this.send_order_id);
|
|
|
|
- console.log("storage send_order_id", s); */
|
|
|
|
await this.getChapters(this.bid, this.chapter_id);
|
|
await this.getChapters(this.bid, this.chapter_id);
|
|
let setting = (await storage.get({ key: "readSetting" })).data;
|
|
let setting = (await storage.get({ key: "readSetting" })).data;
|
|
if (setting) {
|
|
if (setting) {
|
|
@@ -265,7 +257,6 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
backToPak() {
|
|
backToPak() {
|
|
- console.log(12)
|
|
|
|
router.push({
|
|
router.push({
|
|
uri: this.back_url
|
|
uri: this.back_url
|
|
})
|
|
})
|
|
@@ -356,7 +347,6 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
addShelf() {
|
|
addShelf() {
|
|
- console.log("add shelf");
|
|
|
|
getIsonshelf({ bid: this.bid }).then(r => {
|
|
getIsonshelf({ bid: this.bid }).then(r => {
|
|
r.is_on ? '' : addToShelfBooks({ bid: this.bid })
|
|
r.is_on ? '' : addToShelfBooks({ bid: this.bid })
|
|
})
|
|
})
|
|
@@ -372,29 +362,21 @@ export default {
|
|
},
|
|
},
|
|
getChapters(bid, chapter_id) {
|
|
getChapters(bid, chapter_id) {
|
|
this.showtoast = true
|
|
this.showtoast = true
|
|
- console.log("router length:", router.getLength());
|
|
|
|
getChapters({ bid: bid, chapter_id: chapter_id }).then(r => {
|
|
getChapters({ bid: bid, chapter_id: chapter_id }).then(r => {
|
|
this.force_add_desk_type = r.force_add_desk_type;
|
|
this.force_add_desk_type = r.force_add_desk_type;
|
|
this.force_add_work_wechat_type = r.force_add_work_wechat_type;
|
|
this.force_add_work_wechat_type = r.force_add_work_wechat_type;
|
|
this.workWechatUrl = r.force_add_work_wechat_url
|
|
this.workWechatUrl = r.force_add_work_wechat_url
|
|
this.content = r.chapter_content.trim().split(/\n/)
|
|
this.content = r.chapter_content.trim().split(/\n/)
|
|
this.bookinfo = r;
|
|
this.bookinfo = r;
|
|
- // this.$element('list').scrollTo({ index: 0 })
|
|
|
|
this.addShelf();
|
|
this.addShelf();
|
|
this.showtoast = false
|
|
this.showtoast = false
|
|
}).catch(e => {
|
|
}).catch(e => {
|
|
- console.log('e code')
|
|
|
|
- console.log(e.data)
|
|
|
|
- console.log(e.data.code == '10016' || e.data.code == '10019')
|
|
|
|
if (e.data.code == '10016' || e.data.code == '10019' || e.data.code == '10017') {
|
|
if (e.data.code == '10016' || e.data.code == '10019' || e.data.code == '10017') {
|
|
chapterOrders({ bid: bid, chapter_id: chapter_id }).then(r => {
|
|
chapterOrders({ bid: bid, chapter_id: chapter_id }).then(r => {
|
|
this.content = r.chapter_content.trim().split(/\n/)
|
|
this.content = r.chapter_content.trim().split(/\n/)
|
|
this.bookinfo = r
|
|
this.bookinfo = r
|
|
this.showtoast = false
|
|
this.showtoast = false
|
|
- // this.$element('list').scrollTo({ index: 0 })
|
|
|
|
}).catch(f => {
|
|
}).catch(f => {
|
|
- console.log('f code')
|
|
|
|
- console.log(f.data)
|
|
|
|
this.showtoast = false
|
|
this.showtoast = false
|
|
if (f.data.code == '10014' || f.data.code == '10015' || f.data.code == '10016') {
|
|
if (f.data.code == '10014' || f.data.code == '10015' || f.data.code == '10016') {
|
|
this.getChapters(bid, this.canReadecid)
|
|
this.getChapters(bid, this.canReadecid)
|
|
@@ -436,7 +418,6 @@ export default {
|
|
},
|
|
},
|
|
getPrevChapter(evt) {
|
|
getPrevChapter(evt) {
|
|
evt.stopPropagation();
|
|
evt.stopPropagation();
|
|
- console.log("get prev chapter");
|
|
|
|
if (this.bookinfo.prev_cid == 0) {
|
|
if (this.bookinfo.prev_cid == 0) {
|
|
return prompt.showToast({ message: '已经是第一章啦' });
|
|
return prompt.showToast({ message: '已经是第一章啦' });
|
|
}
|
|
}
|
|
@@ -532,7 +513,6 @@ export default {
|
|
|
|
|
|
},
|
|
},
|
|
cancel: function () {
|
|
cancel: function () {
|
|
- console.log('取消前往')
|
|
|
|
},
|
|
},
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
@@ -546,12 +526,10 @@ export default {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
- // this.getChapters(this.bookinfo.bid, this.bookinfo.next_cid)
|
|
|
|
|
|
|
|
},
|
|
},
|
|
onBackPress() {
|
|
onBackPress() {
|
|
this.backRouter();
|
|
this.backRouter();
|
|
- // that.getLastPage();
|
|
|
|
return true;
|
|
return true;
|
|
}, async changeRecomEnd(data) {
|
|
}, async changeRecomEnd(data) {
|
|
if (data.detail.op == "change_book") {
|
|
if (data.detail.op == "change_book") {
|
|
@@ -575,10 +553,6 @@ export default {
|
|
await storage.set({ key: "last_recom_bid", value: this.last_recom_bid });
|
|
await storage.set({ key: "last_recom_bid", value: this.last_recom_bid });
|
|
}
|
|
}
|
|
|
|
|
|
- // console.log(this.recom_list.length);
|
|
|
|
- // if(this.recom_list.length == 3){
|
|
|
|
- // return true;
|
|
|
|
- // }
|
|
|
|
|
|
|
|
}, getLastPage() {
|
|
}, getLastPage() {
|
|
let page = router.getState();
|
|
let page = router.getState();
|