소스 검색

fix: 详情页弹窗调试

Signed-off-by: tangshizhe <48740614+tangshizhe@users.noreply.github.com>
tangshizhe 3 달 전
부모
커밋
2632308542
1개의 변경된 파일32개의 추가작업 그리고 19개의 파일을 삭제
  1. 32 19
      apps/mobile/src/views/article/components/OriginLink.vue

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

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