Kaynağa Gözat

Merge branch 'master' of iqiyoo:zhuishuyun_quickapp_front

gdy96 5 yıl önce
ebeveyn
işleme
caf7cd8f92
3 değiştirilmiş dosya ile 10 ekleme ve 10 silme
  1. 2 1
      src/helper/interface.js
  2. 3 4
      src/views/Index/index.ux
  3. 5 5
      src/views/Reader/index.ux

+ 2 - 1
src/helper/interface.js

@@ -24,7 +24,7 @@ const getShortCut = (fn) => {
 
 }
 // 判断用户是否创建图标
-const hasCreateShortCut = (isPayPage = false) => {
+const hasCreateShortCut = (isPayPage = false,fn) => {
   shortcut.hasInstalled({
     success: (ret) => {
       if (!ret) {
@@ -32,6 +32,7 @@ const hasCreateShortCut = (isPayPage = false) => {
           message: "添加【追书云】到桌面,方便下次阅读",
           success: () => {
             prompt.showToast("添加成功!");
+            fn && fn(true);
           },
           fail: (code) => {
             if (code === SHORT_CUT_FORBIDDEN_INFO && !isPayPage) app.exit();

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

@@ -91,10 +91,6 @@ 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() {
@@ -120,6 +116,9 @@ export default {
   onMenuPress() {
     this.$app.$def.showMenu();
   },
+  changeShortCut(){
+    this.showShortPop=false;
+  },
   async getCoustom() {
     let res = await getCustomQrcode();
     this.cutomerQrcode = res.url;

+ 5 - 5
src/views/Reader/index.ux

@@ -16,7 +16,7 @@
         <text class="operator next" @click="getNextChapter">下一章</text>
       </div>
     </div>
-    <short-page if="{{showShortPop}}"></short-page>
+    <short-page if="{{showShortPop}}" @addshort="shortEnd"></short-page>
     <!-- <wechat-page></wechat-page> -->
   </div>
 
@@ -39,10 +39,7 @@ export default {
   },
   onInit() {
     this.getChapters(this.bid, this.chapter_id)
-    this.addShelf()
-    if (this.$app.$def.data.backClickCount === 0) {
-      this.showShortPop = true;
-    }
+    this.addShelf();
   },
   onShow() {
     it.getShortCut((value) => {
@@ -55,6 +52,9 @@ export default {
       r.is_on ? '' : postUserShelfBooks({ bid: this.bid })
     })
   },
+    shortEnd(value) {
+    this.showShortPop = !value.detail.installed;
+  },
   getChapters(bid, chapter_id) {
     getChapters({ bid: bid, chapter_id: chapter_id }).then(r => {
       this.content = r.chapter_content.trim().split(/\n/)