浏览代码

fix: 三级页客户端弹窗问题调试2

Signed-off-by: tangshizhe <48740614+tangshizhe@users.noreply.github.com>
tangshizhe 3 月之前
父节点
当前提交
af952be4e2
共有 1 个文件被更改,包括 14 次插入14 次删除
  1. 14 14
      apps/mobile/src/views/article/components/OriginLink.vue

+ 14 - 14
apps/mobile/src/views/article/components/OriginLink.vue

@@ -96,19 +96,19 @@ export default {
     this.eventBusListening()
   },
   methods: {
-    // eventBusListening() {
-    //   EventBus.$on('originLink:view', () => {
-    //     this.viewOriginLink()
-    //   })
-    //   // 及时解绑 EventBus 的事件监听
-    //   this.$once('hook:beforeDestroy', () => {
-    //     EventBus.$off('originLink:view')
-    //   })
-    // },
+    eventBusListening() {
+      EventBus.$on('originLink:view', () => {
+        this.viewOriginLink()
+      })
+      // 及时解绑 EventBus 的事件监听
+      this.$once('hook:beforeDestroy', () => {
+        EventBus.$off('originLink:view')
+      })
+    },
     async viewOriginLink() {
       if (this.url) {
         // 如果已经获取过链接,则可以直接打开
-        // return this.openUrl()
+        return this.openUrl()
       }
       const { inH5 } = this.$envs
       if (inH5) {
@@ -243,7 +243,7 @@ export default {
         return
       const { inApp } = this.$envs
       if (inApp) {
-        // appCallOpenWindow(this.url, '查看原文')
+        appCallOpenWindow(this.url, '查看原文')
       }
       else {
         this.clickA(this.url)
@@ -283,9 +283,9 @@ export default {
         props: {
           name: '标讯详情页-查看原文链接'
         },
-        // next: () => {
-        //   this.viewOriginLink()
-        // }
+        next: () => {
+          this.viewOriginLink()
+        }
       }
     }
   }