Эх сурвалжийг харах

fix: 详情页弹窗调试

Signed-off-by: tangshizhe <48740614+tangshizhe@users.noreply.github.com>
tangshizhe 3 сар өмнө
parent
commit
2632308542

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

@@ -1,9 +1,9 @@
 <template>
   <span class="origin-link-container">
     <span
+      v-bound-phone="bindPhoneViewOrigin()"
       class="highlight-text origin-link clickable"
       @click="viewOriginLink"
-      v-bound-phone="bindPhoneViewOrigin()"
     >
       查看原文链接
     </span>
@@ -23,8 +23,7 @@
         <span
           class="highlight-text"
           @click="leaveInfo('article_original_more_membership')"
-          >升级大会员 ></span
-        >
+        >升级大会员 ></span>
       </p>
     </van-dialog>
     <van-dialog
@@ -76,7 +75,7 @@ export default {
   },
   computed: {
     ...mapState({
-      content: (state) => state.article.mainModel.content
+      content: state => state.article.mainModel.content
     }),
     ...mapGetters('user', ['isFree']),
     url() {
@@ -94,7 +93,7 @@ export default {
   },
   created() {
     window.t = this
-    this.eventBusListening()
+    // this.eventBusListening()
   },
   methods: {
     eventBusListening() {
@@ -121,7 +120,8 @@ export default {
             source: this.$env.platform.toUpperCase()
           }
         })
-      } else {
+      }
+      else {
         const loading = this.$toast.loading()
         try {
           const {
@@ -134,19 +134,23 @@ export default {
             if (data.url) {
               this.o_url = data.url
               this.openUrlAuth()
-            } else if (data.status === 1) {
+            }
+            else if (data.status === 1) {
               this.leaveInfo('article_original_one', {
                 signId: encodeURIComponent(this.id),
                 article: this.extractString(location.href)
               })
-            } else if (data.status === 2) {
+            }
+            else if (data.status === 2) {
               this.dialog.show = true
-            } else if (data.status === 3) {
+            }
+            else if (data.status === 3) {
               this.leaveInfo('article_original_more', {
                 signId: encodeURIComponent(this.id),
                 article: this.extractString(location.href)
               })
-            } else if (data.status === 4) {
+            }
+            else if (data.status === 4) {
               this.$dialog
                 .confirm({
                   title: '暂无更多查看原文链接权限',
@@ -165,13 +169,16 @@ export default {
                   }
                   openAppOrWxPage(LINKS.客服)
                 })
-            } else {
+            }
+            else {
               this.$toast(data.msg)
             }
-          } else {
+          }
+          else {
             console.log(msg)
           }
-        } catch (error) {
+        }
+        catch (error) {
           loading.clear()
         }
       }
@@ -186,7 +193,8 @@ export default {
       return getArticleOriginalText(param)
     },
     async openUrlAuth() {
-      if (!this.url) return
+      if (!this.url)
+        return
       if (this.toBCustom) {
         return this.openUrl()
       }
@@ -200,7 +208,8 @@ export default {
             this.dialog.see = true
             return
           }
-        } catch (error) {
+        }
+        catch (error) {
           console.log(error)
         }
       }
@@ -217,22 +226,26 @@ export default {
           if (data.url) {
             this.o_url = data.url
             this.openUrlAuth()
-          } else {
+          }
+          else {
             if (msg) {
               console.log(msg)
             }
           }
         }
-      } catch (error) {
+      }
+      catch (error) {
         console.log(error)
       }
     },
     openUrl() {
-      if (!this.url) return
+      if (!this.url)
+        return
       const { inApp } = this.$envs
       if (inApp) {
         appCallOpenWindow(this.url, '查看原文')
-      } else {
+      }
+      else {
         this.clickA(this.url)
       }
     },