|
@@ -130,6 +130,9 @@ export default {
|
|
async onInit() {
|
|
async onInit() {
|
|
if (this.send_order_id) {
|
|
if (this.send_order_id) {
|
|
await storage.set({ key: "send_order_id", value: this.send_order_id });
|
|
await storage.set({ key: "send_order_id", value: this.send_order_id });
|
|
|
|
+ } else {
|
|
|
|
+ let send_order_id = (await storage.get({ key: "send_order_id" })).data;
|
|
|
|
+ if (send_order_id) this.send_order_id = send_order_id;
|
|
}
|
|
}
|
|
if (this.push_id) {
|
|
if (this.push_id) {
|
|
await storage.set({ key: "push_id", value: this.push_id });
|
|
await storage.set({ key: "push_id", value: this.push_id });
|
|
@@ -362,6 +365,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
goNext() {
|
|
goNext() {
|
|
|
|
+ let self =this;
|
|
if (this.bookinfo.next_cid == 0) {
|
|
if (this.bookinfo.next_cid == 0) {
|
|
router.push({
|
|
router.push({
|
|
uri: "/views/Raderover",
|
|
uri: "/views/Raderover",
|
|
@@ -371,15 +375,51 @@ export default {
|
|
})
|
|
})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ //判断是否自然流量自然流量付费章节开启付费提醒
|
|
|
|
+ if (!this.send_order_id && this.bookinfo.next_chapter_status == 2) {
|
|
|
|
+ prompt.showDialog({
|
|
|
|
+ title: '温馨提示',
|
|
|
|
+ message: `下一章即将消耗${this.bookinfo.next_price}书币哟~`,
|
|
|
|
+ buttons: [
|
|
|
|
+ {
|
|
|
|
+ text: '阅读下一章',
|
|
|
|
+ color: '#EF5952'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ text: '我再想想',
|
|
|
|
+ color: '#999'
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ success: function (data) {
|
|
|
|
+ if (data.index === 0) {
|
|
|
|
+ router.replace({
|
|
|
|
+ uri: "/views/Reader",
|
|
|
|
+ params: {
|
|
|
|
+ bid: self.bookinfo.bid,
|
|
|
|
+ chapter_id: self.bookinfo.next_cid,
|
|
|
|
+ canReadecid: self.bookinfo.chapter_id
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ cancel: function () {
|
|
|
|
+ console.log('取消前往')
|
|
|
|
+ },
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ router.replace({
|
|
|
|
+ uri: "/views/Reader",
|
|
|
|
+ params: {
|
|
|
|
+ bid: this.bookinfo.bid,
|
|
|
|
+ chapter_id: this.bookinfo.next_cid,
|
|
|
|
+ canReadecid: this.bookinfo.chapter_id
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
// 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,
|
|
|
|
- canReadecid: this.bookinfo.chapter_id
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
onBackPress() {
|
|
onBackPress() {
|
|
if (this.back_reader == 1) {
|
|
if (this.back_reader == 1) {
|
|
@@ -409,5 +449,5 @@ export default {
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|
|
<style lang="less">
|
|
-@import "../../assets/less/reader.less";
|
|
|
|
|
|
+@import '../../assets/less/reader.less';
|
|
</style>
|
|
</style>
|