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

Merge branch 'dev/v1.1.9_yf' of jianyu/web into feature/v1.1.9

yangfeng 2 сар өмнө
parent
commit
bda89b0c83

+ 2 - 2
apps/bigmember_pc/src/views/portrayal/EntSearchPortrayal.vue

@@ -71,8 +71,8 @@
         backFilter: backBidInfoParams,
         hasPower: pagePowerInfo.visited || pagePowerInfo.balance > 0,
         emptyText: emptyText,
-        noStatesbarPower: true,
-        seachisHide: true
+        noStatesbarPower: showTab2Content ? false : true,
+        seachisHide: showTab2Content ? false : true
       }"
       :chartParams="{
         hasPower: showTab2Content,

+ 1 - 0
apps/bigmember_pc/src/views/portrayal/components/BidInfoActive.vue

@@ -447,6 +447,7 @@ export default {
     }
   },
   created() {
+    console.log(this.seachisHide, 'seachisHide')
     this.initData(this.projectData)
   },
   mounted() {

+ 2 - 1
apps/bigmember_pc/src/views/portrayal/components/ent-new/BiddingList.vue

@@ -29,6 +29,7 @@ watch(
   () => props.dtParams,
   (newVal) => {
     if (newVal) {
+      console.log(newVal, 'val')
       hasPower.value = newVal.hasPower
       emptyText.value = newVal.emptyText
       noStatesBarPower.value = newVal.noStatesbarPower
@@ -39,7 +40,7 @@ watch(
     }
   }
 )
-
+console.log(props.dtParams, 'props.dtParams')
 const emit = defineEmits(['onPageChange'])
 
 const onLimitChange = (data) => {

+ 48 - 53
apps/bigmember_pc/src/views/portrayal/composables/useEntModule.js

@@ -42,23 +42,13 @@ export function useEntModuleInfo(entId, params = {}) {
   const { accountInfo, usageInfo, freeEntPort } = params
   function fetchModuleInfo(code) {
     loadingModule.value = true
-    const maskMap =  getMaskModuleMap(accountInfo, usageInfo, freeEntPort)
+    const maskModuleMap =  getMaskModuleMap({ accountInfo, usageInfo, freeEntPort })
     // code分类 base:基本信息;analysis: 中标分析; infomat:经营信息;risk:经营风险; report:年报信息
     return getEntPortraitModuleInfo({entId, code}).then(res => {
       if (res && res.data) {
         if (res.data.list && res.data.list.length > 0) {
           res.data.list = res.data.list.map(i => {
-            i.tip = {
-              name: i.name,
-              title: maskModule[i.name]?.title,
-              subtitle: maskModule[i.name]?.subtitle || '',
-              bg: maskModule[i.name]?.bg || '',
-              img: maskModule[i.name]?.img || '',
-              button: maskModule[i.name]?.button || '',
-              source: maskModule[i.name]?.source || '',
-              bgSize: maskModule[i.name]?.bgSize || '',
-              moduleName: maskModule[i.name]?.moduleName
-            }
+            i.tip = maskModuleMap[i.name]
             return i
           })
           
@@ -121,6 +111,7 @@ const btnStatusText = {
     "去开通": []
   }
 }
+
 const maskModule = {
   "工商变更": {
     title: '开通大会员',
@@ -388,72 +379,76 @@ const maskModule = {
   }
 }
 
-const getMaskModuleMap = (info, usage, freeEntPort) => {
+/**
+ * 企业画像遮罩信息
+ * @params {*} accountInfo 账号信息(store/user里的info)
+ * @params {*} usageInfo 企业画像使用信息(/subVipPortrait/usage)
+ * @params {*} freeEntPort 免费用户是否有体验次数(isAdd接口)
+ * @returns { title, subtitle, button, source, img, bg, moduleName } 
+ */
+const getMaskModuleMap = (params) => {
+  const { accountInfo: info, usageInfo, freeEntPort } = params
   const tempMap = maskModule
-  const tempPagePowerInfo = usage
   const needMember = ['企业通讯录', '工商变更', '竞争图谱', '行政许可']
   Object.keys(tempMap).forEach((v) => {
-    const isMemberText = tempMap[v].title.indexOf('大会员') !== -1
-    const tempTitle = isMemberText ? '开通大会员' : '超级订阅'
     let tempButton = ''
     if (info.memberStatus > 0) {
+      // 大会员用户
       tempButton = info.memberStatus > 0 && info.power.indexOf(4) === -1
         ? '联系客服'
         : '免费体验'
-    } else if (info.vipStatus > 0) {
+    } else {
+      // ['企业通讯录', '工商变更', '竞争图谱', '行政许可']模块是大会员功能,非大会员用户都是免费体验
       if (needMember.includes(v)) {
         tempButton = '免费体验'
       } else {
-        if (info.viper) {
-          // 新超级订阅
-          if (tempPagePowerInfo.balance > 0) {
-            // 没用完
-            if (tempPagePowerInfo.provin === 0) {
-              tempButton = '去开通'
-            } else if (tempPagePowerInfo.provin === -1) {
-              tempButton = '联系客服'
+        if (info.vipStatus > 0) {
+          if (info.viper) {
+            // 新超级订阅
+            if (usageInfo.balance > 0) {
+              // 没用完
+              if (usageInfo.provin === 0) {
+                tempButton = '去开通'
+              } else if (usageInfo.provin === -1) {
+                tempButton = '联系客服'
+              } else {
+                tempButton = '前往升级'
+              }
             } else {
-              tempButton = '前往升级'
+              if (usageInfo.provin === -1) {
+                tempButton = '联系客服'
+              } else {
+                tempButton = '前往升级'
+              }
             }
           } else {
-            if (tempPagePowerInfo.provin === -1) {
-              tempButton = '联系客服'
-            } else {
-              tempButton = '前往升级'
-            }
+            // 老版超级订阅
+            tempButton = '前往升级'
           }
         } else {
-          tempButton = '前往升级'
-        }
-      }
-      
-    } else {
-      if (needMember.includes(v)) {
-        tempButton = '免费体验'
-      } else {
-        // 免费用户保留解锁体验功能
-        if (info.isFree) {
-          // 由于免费体验功能已经下掉。此处统一引导去开通超级订阅(采购单位画像同)
-          // tempButton = '去开通'
-          if (freeEntPort === 0) {
-            tempButton = '立即解锁'
-          } else if (freeEntPort === -1) {
-            // 已体验过
+          // 非超级订阅用户(免费用户/商机管理)
+          // 免费用户保留解锁体验功能
+          if (info.isFree) {
+            if (freeEntPort === 0) {
+              // 未体验过
+              tempButton = '立即解锁'
+            } else if (freeEntPort === -1) {
+              // 已体验过
+              tempButton = '去开通'
+            }
+          } else {
+            // 商机管理用户
             tempButton = '去开通'
           }
-        } else {
-          // 商机管理用户
-          tempButton = '去开通'
         }
       }
     }
-    tempMap[v].title = tempTitle
     tempMap[v].button = tempButton
   })
   return tempMap
 }
 
-
 export {
-  getMaskCardImg
+  getMaskCardImg,
+  getMaskModuleMap
 }