Kaynağa Gözat

弹窗逻辑

xiabx 5 yıl önce
ebeveyn
işleme
60d4f5ca93

+ 1 - 1
src/helper/interface.js

@@ -18,7 +18,7 @@ const getDeviceInfo = () => {
 const getShortCut = (fn) =>{
   shortcut.hasInstalled({
     success: (ret) => {
-      if(!ret) fn();
+      fn(ret);
     }
   })
   

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

@@ -97,9 +97,8 @@ export default {
     this.getCoustom();
   },
   onShow(){
-    it.getShortCut(()=>{
-      this.showShortPop = true;
-
+    it.getShortCut((value)=>{
+      this.showShortPop = !value;
     })
   },
   onBackPress() {

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

@@ -45,9 +45,8 @@ export default {
     }
   },
    onShow(){
-    it.getShortCut(()=>{
-      this.showShortPop = true;
-
+    it.getShortCut((value)=>{
+      this.showShortPop = !value;
     })
   },
   addShelf() {