Ver código fonte

订阅失败返回前一章

gdy96 5 anos atrás
pai
commit
b289b99e38
1 arquivos alterados com 9 adições e 4 exclusões
  1. 9 4
      src/views/Reader/index.ux

+ 9 - 4
src/views/Reader/index.ux

@@ -30,7 +30,8 @@ import { getChapters, getIsonshelf, postUserShelfBooks, chapterOrders } from "..
 export default {
   protected: {
     bid: '',
-    chapter_id: ''
+    chapter_id: '',
+    canReadecid: ""
   },
   private: {
     bookinfo: {},
@@ -52,7 +53,7 @@ export default {
       r.is_on ? '' : postUserShelfBooks({ bid: this.bid })
     })
   },
-    shortEnd(value) {
+  shortEnd(value) {
     this.showShortPop = !value.detail.installed;
   },
   getChapters(bid, chapter_id) {
@@ -73,6 +74,7 @@ export default {
           console.log('f code')
           console.log(f.data)
           if (f.data.code == '10014' || f.data.code == '10015') {
+            this.getChapters(bid, this.canReadecid)
             router.push({
               uri: "/views/Pay",
               params: {
@@ -84,6 +86,7 @@ export default {
           }
         })
       } else if (e.data.code == '10014' || e.data.code == '10015') {
+        this.getChapters(bid, this.canReadecid)
         router.push({
           uri: "/views/Pay",
           params: {
@@ -111,7 +114,8 @@ export default {
       uri: "/views/Reader",
       params: {
         bid: this.bookinfo.bid,
-        chapter_id: this.bookinfo.prev_cid
+        chapter_id: this.bookinfo.prev_cid,
+        canReadecid: this.bookinfo.chapter_id
       }
     })
   },
@@ -131,7 +135,8 @@ export default {
       uri: "/views/Reader",
       params: {
         bid: this.bookinfo.bid,
-        chapter_id: this.bookinfo.next_cid
+        chapter_id: this.bookinfo.next_cid,
+        canReadecid: this.bookinfo.chapter_id
       }
     })
   }