浏览代码

feat: 添加开通超级订阅弹窗

zhangsiya 1 年之前
父节点
当前提交
07dbf7c5b5

+ 1 - 2
apps/bigmember_pc/src/views/search/bidding/constant/search-filters.js

@@ -9,12 +9,11 @@ import IndustrySelector from '@/components/filter-items/IndustrySelector.vue'
 import KeywordTagsSelector from '@/components/filter-items/KeywordTagsSelector'
 import RegionSelector from '@/components/filter-items/RegionSelector'
 import SelectorWithBasePower from '@/components/filter-items/SelectorWithBasePower.vue'
-import { calcSearchScope } from '@/assets/js/selector.js'
+import { calcSearchScope } from '@/assets/js/selector/scope.js'
 import $bus from '@/utils/bus'
 
 function noPower() {
   $bus.$emit('search:filter:no-power')
-  console.log('showDialog')
 }
 
 // 更多筛选中需要vip的筛选项

+ 33 - 9
apps/bigmember_pc/src/views/search/bidding/index.vue

@@ -54,15 +54,21 @@ const {
   propertyIframeSrc,
   onSingleEmploy,
   onAddInfoOfBI,
-  onSingleAddInfo
+  onSingleAddInfo,
+  vipDialogConf,
+  closeVipDialog
 } = SearchBidModel
 
-// 展示开通超级订阅弹窗
-const showVipDialog = ref(false)
+const {
+  show: showVipDialog,
+  text: vipDialogText,
+  type: vipDialogType
+} = vipDialogConf
+
 
 // 开通超级订阅
 function toBuySvip () {
-
+  window.open('/swordfish/page_big_pc/free/svip/buy?type=buy')
 }
 
 // 列表-单条-配置
@@ -76,7 +82,6 @@ const articleRef = ref({
   push: false
 })
 
-
 </script>
 
 <template>
@@ -219,12 +224,10 @@ const articleRef = ref({
       center
       :visible.sync="showVipDialog"
     >
-      立享列表展示更多公告关键信息,例如:采购单位、中标单位、招标代理机构等,提高公告查看效率
+      {{ vipDialogText}}
       <template #footer>
         <button class="action-button confirm" @click="toBuySvip">去开通</button>
-        <button class="action-button cancel" @click="showVipDialog = false">
-          取消
-        </button>
+        <button class="action-button cancel" @click="closeVipDialog">取消</button>
       </template>
     </CustomDialog>
     <!-- 分发企业选择, 只有企业展示,默认vt为企业-->
@@ -255,6 +258,27 @@ const articleRef = ref({
 </template>
 
 <style lang='scss'>
+.open-vip-dialog {
+  width: 380px;
+
+  .el-dialog__header {
+    padding: 32px 32px 20px;
+  }
+
+  .el-dialog__body {
+    padding: 0 32px 0;
+    text-align: center;
+  }
+
+  .el-dialog__footer {
+    padding: 32px;
+  }
+
+  .el-button {
+    width: 132px;
+    font-size: 16px;
+  }
+}
 .search-bidding-page .sub-collection.tags-box {
   .tags-list .tags-item {
     float: left;

+ 44 - 5
apps/bigmember_pc/src/views/search/bidding/model/base.js

@@ -1,4 +1,4 @@
-import { computed, reactive, ref, onMounted, getCurrentInstance } from 'vue'
+import { computed, reactive, ref, toRefs, onMounted, getCurrentInstance } from 'vue'
 import { without, throttle } from 'lodash'
 import { useStore } from '@/store'
 import { useRoute, useRouter } from 'vue-router/composables'
@@ -219,7 +219,7 @@ export default function () {
         break
       }
       case 'detailed-list': {
-        doChangeItemStyleType(key)
+        detailListClick(key)
         break
       }
       case 'table': {
@@ -244,8 +244,13 @@ export default function () {
       }
     }
   }
-
-
+  function detailListClick (key) {
+    if(isFree.value) {
+      openListVipDialog()
+      return
+    }
+    doChangeItemStyleType(key)
+  }
   // 全选复选框事件
   function doChangeAllSelect(type) {
     doToggleListSelection(type)
@@ -448,6 +453,39 @@ export default function () {
     showFilter.value = !showFilter.value
   }
 
+  /******开通超级订阅弹窗start**********/
+
+  // 开通超级订阅弹窗配置
+  const vipDialogConfig = reactive({
+    type: 'filter',
+    show: false,
+    text: '立享更多搜索权限,寻找商机更精准'
+  })
+
+  // 筛选条件打开超级订阅弹窗
+  function openFilterVipDialog () {
+    vipDialogConfig.type = 'filter'
+    vipDialogConfig.show =  true
+    vipDialogConfig.text = '立享更多搜索权限,寻找商机更精准'
+  }
+  // 关闭超级订阅弹窗
+  function closeVipDialog () {
+    vipDialogConfig.show = false
+  }
+  // 数据列表--开通超级订阅弹窗
+  function openListVipDialog () {
+    vipDialogConfig.type = 'list'
+    vipDialogConfig.show = true
+    vipDialogConfig.text = '立享列表展示更多公告关键信息,例如:采购单位、中标单位、招标代理机构等,提高公告查看效率'
+  }
+
+  const vipDialogConf = toRefs(vipDialogConfig)
+
+  // 筛选条件无权限提示开通超级订阅弹窗
+  $bus.$on('search:filter:no-power', openFilterVipDialog)
+
+  /******开通超级订阅弹窗end**********/
+
   /** 保存、重置筛选条件部分 start ****/
 
   const disposeFilterActionModel = saveFilterActionsModel()
@@ -792,7 +830,6 @@ export default function () {
   }
   /*****BI添加操作end*********/
 
-
   return {
     isLogin,
     isInApp,
@@ -816,6 +853,8 @@ export default function () {
     doChangePageNum,
     doChangePageSize,
     onChangeTab,
+    vipDialogConf,
+    closeVipDialog,
     onSaveFilter, // 以下存筛选条件相关
     disposeFilterActionModel,
     historyFilterDialogVisible,