Explorar o código

Merge branch 'master' of iqiyoo:zhuishuyun_quickapp_front

xiabx %!s(int64=5) %!d(string=hai) anos
pai
achega
40291b65be
Modificáronse 3 ficheiros con 8 adicións e 6 borrados
  1. 4 3
      src/app.ux
  2. 1 1
      src/components/book/book.ux
  3. 3 2
      src/views/Index/index.ux

+ 4 - 3
src/app.ux

@@ -13,11 +13,12 @@ import "./helper/regenerator.js";
 import it from "./helper/interface.js";
 
 export default {
-  onCreate() {
+  async onCreate() {
     // 一进入程序就判断是否添加过主屏幕
     it.shortcut.systemPromptEnabled = false;
-    it.shortcut.hasInstalled({
+    await it.shortcut.hasInstalled({
       success: (ret) => {
+        console.log("is installed:", ret);
         if (!ret) this.$def.data.backClickCount = 0;
         else this.$def.data.backClickCount = 1;
       }
@@ -29,7 +30,7 @@ export default {
   data: {
     backClickCount: 0,
     cutomerQrcode: "",
-    weChat:"wxlxf1099"
+    weChat: "wxlxf1099"
   }
 };
 </script>

+ 1 - 1
src/components/book/book.ux

@@ -73,7 +73,7 @@ export default {
         uri: "/views/Reader",
         params: {
           bid: book.bid,
-          chapter_id: book.last_cid
+          chapter_id: book.recent_cid
         }
       })
       return

+ 3 - 2
src/views/Index/index.ux

@@ -91,13 +91,14 @@ export default {
   onInit() {
     this.$on('dispathEvt', this.changeSignPop);
     //今日已签到过不在弹框签到
+    console.log("app backClickCount", this.$app.$def.data.backClickCount);
     if (this.$app.$def.data.backClickCount === 0) {
       this.showShortPop = true;
     }
     this.getCoustom();
   },
-  onShow(){
-    it.getShortCut((value)=>{
+  onShow() {
+    it.getShortCut((value) => {
       this.showShortPop = !value;
     })
   },