|
@@ -10,6 +10,7 @@ import {
|
|
|
import ArticleItem from '@/components/article-item/ArticleItem.vue'
|
|
|
import { dateFromNow } from '@/utils'
|
|
|
import CollectInfo from '@/components/collect-info/CollectInfo.vue'
|
|
|
+import RecommendServesCard from '@/views/article-content/components/RecommendServesCard.vue'
|
|
|
|
|
|
function dateFormat(str) {
|
|
|
if (str) {
|
|
@@ -39,7 +40,11 @@ function createRecommendation(modelName) {
|
|
|
}
|
|
|
|
|
|
const recommendProjects = computed(() => {
|
|
|
- return createRecommendation('recommendProjects')
|
|
|
+ const result = createRecommendation('recommendProjects')
|
|
|
+ if (canShowProjectMask.value) {
|
|
|
+ result.list = new Array(5).fill(1).map((v) => result.list[0])
|
|
|
+ }
|
|
|
+ return result
|
|
|
})
|
|
|
|
|
|
const recommendBuyers = computed(() => {
|
|
@@ -69,7 +74,7 @@ const recommendInfo = {
|
|
|
}
|
|
|
|
|
|
const canShowProjectMask = computed(() => {
|
|
|
- return true
|
|
|
+ return ContentExpandsModel.value.recommendProjects?.popup
|
|
|
})
|
|
|
|
|
|
/**
|
|
@@ -95,6 +100,26 @@ const collectElement = ref(null)
|
|
|
function doOpenCollectDialog() {
|
|
|
collectElement.value?.noCallApiFn('pc_article_cqxmmore', false)
|
|
|
}
|
|
|
+
|
|
|
+const recommendMaskConfig = {
|
|
|
+ headerTitle: '大会员权益',
|
|
|
+ headerMore: '查看服务介绍',
|
|
|
+ clickMore: () => {
|
|
|
+ window.open('/big/page/index', '_blank')
|
|
|
+ },
|
|
|
+ title: '项目提前介入,中标更轻松',
|
|
|
+ content:
|
|
|
+ '提前1-3个月获取项目采购计划,获取采购内容、预算金额、预计采购时间等,提前运作提高中标率。',
|
|
|
+ buttons: [
|
|
|
+ {
|
|
|
+ label: '免费体验',
|
|
|
+ type: 'primary',
|
|
|
+ action: () => {
|
|
|
+ doOpenCollectDialog()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+}
|
|
|
</script>
|
|
|
<template>
|
|
|
<div class="recommend-opportunities" v-if="canShowModule">
|
|
@@ -123,51 +148,29 @@ function doOpenCollectDialog() {
|
|
|
</div>
|
|
|
|
|
|
<div class="article-info-list">
|
|
|
- <article-item
|
|
|
- model="S"
|
|
|
- :grid-data="[]"
|
|
|
- class="article-info-item"
|
|
|
- v-for="(item, index) in recommendProjects.list"
|
|
|
- :class="{ visited: item.visited || item.ca_isvisit }"
|
|
|
- :key="index"
|
|
|
- :index="index + 1"
|
|
|
- :article="item"
|
|
|
- :config="recommendInfo.config"
|
|
|
- @onClick="doOpenArticlePage(item)"
|
|
|
- :vt="'f'"
|
|
|
- >
|
|
|
- <div slot="right-time"></div>
|
|
|
- <div class="time-text" slot="right-handle-container">
|
|
|
- {{ dateFormat(item.publishTime) }}
|
|
|
- </div>
|
|
|
- </article-item>
|
|
|
-
|
|
|
- <div class="mask-drainage" v-if="canShowProjectMask">
|
|
|
- <div
|
|
|
- class="recommend-serve-card has-header flex flex-(col items-center justify-between)"
|
|
|
+ <div>
|
|
|
+ <article-item
|
|
|
+ model="S"
|
|
|
+ :grid-data="[]"
|
|
|
+ class="article-info-item"
|
|
|
+ v-for="(item, index) in recommendProjects.list"
|
|
|
+ :class="{ visited: item.visited || item.ca_isvisit }"
|
|
|
+ :key="index"
|
|
|
+ :index="index + 1"
|
|
|
+ :article="item"
|
|
|
+ :config="recommendInfo.config"
|
|
|
+ @onClick="doOpenArticlePage(item)"
|
|
|
+ :vt="'f'"
|
|
|
>
|
|
|
- <div
|
|
|
- class="recommend-serve-header w-full flex flex-(row items-center justify-between)"
|
|
|
- >
|
|
|
- <span>大会员权益</span>
|
|
|
- <span class="action-text">查看服务介绍 ></span>
|
|
|
- </div>
|
|
|
- <div
|
|
|
- class="recommend-serve-content flex flex-(1 col items-center justify-between)"
|
|
|
- >
|
|
|
- <div>
|
|
|
- <span class="title-text">项目提前介入,中标更轻松</span>
|
|
|
- <div class="text-center">
|
|
|
- 提前1-3个月获取项目采购计划,获取采购内容、预算金额、预计采购时间等,提前运作提高中标率。
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="action-btns flex flex-(row items-center)">
|
|
|
- <el-button @click="doOpenProjectMore('free')" type="primary"
|
|
|
- >免费体验</el-button
|
|
|
- >
|
|
|
- </div>
|
|
|
+ <div slot="right-time"></div>
|
|
|
+ <div class="time-text" slot="right-handle-container">
|
|
|
+ {{ dateFormat(item.publishTime) }}
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </article-item>
|
|
|
+ </div>
|
|
|
+ <div class="mask-drainage" v-if="canShowProjectMask">
|
|
|
+ <recommend-serves-card v-bind="recommendMaskConfig">
|
|
|
+ </recommend-serves-card>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -281,6 +284,9 @@ function doOpenCollectDialog() {
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
padding: 16px 0;
|
|
|
+ &:hover {
|
|
|
+ color: $color-main;
|
|
|
+ }
|
|
|
&:last-of-type {
|
|
|
border: none;
|
|
|
}
|
|
@@ -330,6 +336,10 @@ function doOpenCollectDialog() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .recommend-serve-card.has-header {
|
|
|
+ min-height: 205px;
|
|
|
+ }
|
|
|
+
|
|
|
.recommend-info-header {
|
|
|
@include diy-icon('re-unit', 24, 24);
|
|
|
@include diy-icon('re-info', 24, 24);
|