Browse Source

fix: topnet 定制用户权益判断

zhangyuhan 1 year ago
parent
commit
682c33d79f

+ 2 - 3
apps/mobile/src/views/article/components/AttachmentDownloadCard.vue

@@ -25,9 +25,8 @@ export default {
         return this.content.attachments || []
       },
       IsCustomTopNet()  {
-        return true
-        // return this.content.IsCustomTopNet || false
-      },
+        return this.content.IsCustomTopNet || false
+      }
     })
   },
   created() {},

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

@@ -73,7 +73,10 @@ export default {
     ...mapState({
       content: (state) => state.article.mainModel.content
     }),
-    ...mapGetters('user', ['isFree'])
+    ...mapGetters('user', ['isFree']),
+    IsCustomTopNet()  {
+      return this.content.IsCustomTopNet || false
+    }
   },
   created() {
     this.eventBusListening()
@@ -169,6 +172,9 @@ export default {
     },
     async openUrlAuth() {
       if (!this.url) return
+      if (this.IsCustomTopNet) {
+        return this.openUrl()
+      }
       if (this.isFree) {
         // 检查是否已经留资。已留资返回true
         const source = 'article_original'