Selaa lähdekoodia

feat: 优化阳光采购详情页无权限判断

cuiyalong 8 kuukautta sitten
vanhempi
commit
9ef90f426c

+ 5 - 0
apps/bigmember_pc/src/views/article-content/composables/useContentStore.js

@@ -54,6 +54,9 @@ const ContentId = computed(() => {
 const IsCustomTopNet = computed(() => {
   return ContentModel.value.IsCustomTopNet
 })
+const hasPowerToReadSunPublishContent = computed(() => {
+  return ContentModel.value.hasPowerToReadSunPublishContent
+})
 
 // 是否阳光采购发布标讯
 const IsSunPublishContent = computed(() => {
@@ -125,6 +128,7 @@ async function useContentStore() {
     ContentPageLoading,
     ContentPageExpandsLoading,
     IsSunPublishContent,
+    hasPowerToReadSunPublishContent,
     IsCustomTopNet
   }
 }
@@ -187,6 +191,7 @@ export {
   ContentPageLoading,
   ContentPageExpandsLoading,
   IsCustomTopNet,
+  hasPowerToReadSunPublishContent,
   IsSunPublishContent,
   ContentIsError,
   ContentErrorText

+ 3 - 2
apps/bigmember_pc/src/views/article-content/pages/Article.vue

@@ -33,6 +33,7 @@ import {
   ContentModel,
   ContentId,
   IsCustomTopNet,
+  hasPowerToReadSunPublishContent,
   IsSunPublishContent,
   ContentPageLoading,
   ContentPageExpandsLoading,
@@ -307,8 +308,8 @@ function doOpenCustomer() {
 const canShowMask = computed(() => {
   if (IsSunPublishContent.value) {
     return {
-      show: false,
-      contentMaskShow: !ContentModel.value.isCanRead,
+      show: !ContentModel.value.isCanRead,
+      contentMaskShow: !ContentModel.value.hasPowerToReadSunPublishContent,
       type: 'content-mask'
     }
   } else {

+ 6 - 4
apps/mobile/src/views/article/content.vue

@@ -36,7 +36,7 @@
                   class="content-abstract-module"
                   :beforeLeavePage="beforeLeavePage"
                 />
-                <section class="content-abstract-other bg-white">
+                <section class="content-abstract-other bg-white" v-if="!IsSunPublishContent">
                   <ContentAbstractEntList
                     v-if="!IsCustomTopNet"
                     class="content-abstract-ent-list-module"
@@ -303,6 +303,9 @@ export default {
     IsCustomTopNet() {
       return this.content.IsCustomTopNet || false
     },
+    hasPowerToReadSunPublishContent() {
+      return this.content.hasPowerToReadSunPublishContent || false
+    },
     IsSunPublishContent() {
       return this.content.IsSunPublishContent || false
     },
@@ -325,8 +328,8 @@ export default {
     canReadConf() {
       if (this.IsSunPublishContent) {
         return {
-          show: true, // 是否展示全部内容
-          showContentModule: this.content.isCanRead,
+          show: this.content.isCanRead, // 是否展示全部内容
+          showContentModule: this.hasPowerToReadSunPublishContent,
         }
       } else {
         return {
@@ -386,7 +389,6 @@ export default {
     }
   },
   async created() {
-    window.t = this
     this.appHeaderActions()
     await this.getPageState()
     this.initAppWxShare()