浏览代码

feat: 移动端详情页无权限遮罩调用

cuiyalong 1 年之前
父节点
当前提交
f617d32f27

+ 0 - 1
apps/mobile/src/components/common/layout.vue

@@ -197,7 +197,6 @@ export default {
       })
       EventBus.$on('headerConf:refreshTitle', () => {
         this.refreshHeader()
-        console.trace()
       })
 
       // 及时解绑 EventBus 的事件监听

+ 18 - 1
apps/mobile/src/views/article/content.vue

@@ -13,6 +13,7 @@
           v-if="content.recommendedService"
         ></ContentHeaderBannerTip>
         <van-tabs
+          v-if="canRead"
           v-model="pageInfo.tabActive"
           :offset-top="offsetTop"
           scrollspy
@@ -51,7 +52,15 @@
             <ContentCustomerRecommend class="tab-module" />
           </van-tab>
         </van-tabs>
-        <NpsCard class="nps-module" ref="npsCard" />
+        <NpsCard class="nps-module" ref="npsCard" v-if="canRead" />
+
+        <template v-if="!canRead">
+          <FreeUserAdvancedMask
+            v-if="content.isNiJian || content.isCaigouyixiang"
+            :type="content.isNiJian ? 'nijian' : 'caigouyixiang'"
+          />
+          <FreeUserBiddingMask v-else />
+        </template>
         <AdSingle
           :ad="getContentAdID"
           :showCloseIcon="false"
@@ -102,6 +111,8 @@ import ContentCustomerRecommend from '@/views/article/components/ContentCustomer
 import NpsCard from '@/views/article/components/NpsCard.vue'
 import TabActions from '@/views/article/components/TabActions.vue'
 import AdSingle from '@/components/ad/Ad.vue'
+import FreeUserBiddingMask from '@/views/article/components/FreeUserBiddingMask.vue'
+import FreeUserAdvancedMask from '@/views/article/components/FreeUserAdvancedMask.vue'
 import { throttle } from 'lodash'
 import { mapState, mapMutations, mapActions, mapGetters } from 'vuex'
 
@@ -124,6 +135,8 @@ export default {
     ContentTouBiaoService,
     ContentBusinessRecommend,
     ContentCustomerRecommend,
+    FreeUserBiddingMask,
+    FreeUserAdvancedMask,
     NpsCard,
     TabActions,
     AdSingle
@@ -195,6 +208,9 @@ export default {
       otherModel: (state) => state.article.otherModel
     }),
     ...mapGetters('user', ['isLogin', 'isSuper', 'isMember', 'isNewBusiness']),
+    canRead() {
+      return this.content.isCanRead
+    },
     getContentAdID() {
       return (this.$envs.inWX ? 'jy' : 'jyapp') + '-wxcontent-bottom'
     }
@@ -340,6 +356,7 @@ export default {
     },
     checkNpsView() {
       const targetVm = this.$refs.npsCard
+      if (!targetVm) return
       const target = targetVm.$el
       const scrollWrapper = this.$refs.scrollWrapper
       const visible = isElementInScrollArea(target, scrollWrapper)

+ 2 - 1
apps/mobile/src/views/article/ui/ContentModuleCard.vue

@@ -41,7 +41,8 @@ export default {
   min-height: 36px;
   border-bottom: 1px solid rgba(0, 0, 0, 0.05);
 }
-.content-module-title {
+.content-module-title,
+.content-module-header-actions {
   font-size: 14px;
   line-height: 20px;
 }