浏览代码

Merge branch 'dev/v1.0.30_zsy' of jianyu/web into feature/v1.0.30

zhangsiya 1 年之前
父节点
当前提交
8eb3edf27e

+ 12 - 0
apps/bigmember_pc/src/api/modules/business.js

@@ -0,0 +1,12 @@
+import request from '@/api'
+import qs from 'qs'
+
+export function getBusinessDetails(data) {
+  data = qs.stringify(data)
+  return request({
+    baseURL: '/bigmember',
+    url: '/project/businessDetails',
+    method: 'POST',
+    data
+  })
+}

+ 1 - 0
apps/bigmember_pc/src/api/modules/index.js

@@ -28,3 +28,4 @@ export * from './jyMerge'
 export * from './crmApplication'
 export * from './pay'
 export * from './message'
+export * from './business'

+ 33 - 29
apps/bigmember_pc/src/views/business/detail.vue

@@ -2,11 +2,11 @@
   <Layout class="business-detail-page">
     <div class="business-header">
       <div class="name">
-        【商机情报】北京联合大学中央支持地方专项-科技创新服务能力建设-虚拟现实创新应用实验教学平台(中央资金)项目(第一~四包)中标公告
+        {{ info.title }}
       </div>
       <div class="business-sub-row">
         <div class="d-m-time common-time">
-          {{ dateFromNow(new Date('2023-01-01').getTime()) }}
+          {{ dateFromNow(new Date(publishtime).getTime()) }}
         </div>
         <div class="business_option">
           <div class="potential-col">
@@ -17,7 +17,7 @@
         </div>
       </div>
     </div>
-    <section class="collect-info-tip">
+    <section class="collect-info-tip" v-if="info.isSubmit">
       【商机情报】想获得更精准商机情报?立即<em
         class="handle-em"
         @click="completeInfo"
@@ -34,42 +34,33 @@
         <div class="box-con">
           <div class="list_name">
             <span class="pur_company">采购单位</span>
-            <span class="list_pur_name">{{
-              info.buyer || '北京市工商行政管理局朝阳分局'
-            }}</span>
+            <span class="list_pur_name">{{ info.buyer }}</span>
           </div>
           <div class="list_poten">
             <div class="poten_unit">
               <span class="poten_label"
                 ><span class="point"></span>预测线索</span
               >
-              <span class="poten_name">{{
-                info.title || '淮安市高级职业技术学校台式电脑采购项目招标公告'
-              }}</span>
+              <span class="poten_name">{{ info.title && info.title.indexOf('】' ? info.title.substring(info.title.indexOf('】') + 1) :  info.title }}</span>
             </div>
             <div class="poten_unit mt8">
               <span class="poten_label"
                 ><span class="point"></span>预测采购内容</span
               >
               <span class="poten_name">
-                <span>{{
-                  info.purchasing ||
-                  '该单位将采购钢筋、水泥、隔热板、大理石砖、玻璃、木材、钢筋、水泥、隔热板、大理石砖、玻璃'
-                }}</span>
+                <span>{{ info.purchasing }}</span>
               </span>
             </div>
             <div class="poten_unit mt8">
               <span class="poten_label">
                 <span class="point"></span>预测采购时间:
-                <span style="color: #1d1d1d">{{
-                  info.yuceendtime || '2023-01-01'
-                }}</span>
+                <span style="color: #1d1d1d">{{ dateFormatter(yuceendtime, 'yyyy-MM-dd') }}</span>
               </span>
             </div>
           </div>
         </div>
       </section>
-      <section class="similar-box mt8">
+      <section class="similar-box mt8" v-if="similarProject">
         <div class="box-title">
           <span class="left-line"></span>
           <span>同类项目</span>
@@ -79,19 +70,17 @@
             <span class="unit_label">同类项目:</span>
             <span
               class="unit_name handle-em"
-              @click="goViewDetail(info.p_id)"
-              >{{
-                info.p_orther || '关于泉州市第一医院内HIS系统改造项目'
-              }}</span
+              @click="goViewDetail(similarProject.p_id)"
+              >{{ similarProject.p_orther }}</span
             >
           </div>
           <div class="pur_unit mt8">
             <span class="unit_label">联系人:</span>
-            <span class="unit_name">{{ info.p_person || '王女士' }}</span>
+            <span class="unit_name">{{ similarProject.p_person }}</span>
           </div>
           <div class="pur_unit mt8">
             <span class="unit_label">联系电话:</span>
-            <span class="unit_name">{{ info.p_phone || '15111111111' }}</span>
+            <span class="unit_name">{{ similarProject.p_phone }}</span>
           </div>
         </div>
       </section>
@@ -104,9 +93,10 @@
 <script>
 import Layout from '@/components/common/ContentLayout.vue'
 import CollectInfo from '@/components/collect-info/CollectInfo.vue'
-import { dateFromNow } from '@/utils/'
+import { dateFromNow, dateFormatter } from '@/utils/'
 import { mapGetters } from 'vuex'
 import tdk from '@/utils/mixins/set-tdk.js'
+import { getBusinessDetails } from '@/api/modules/'
 export default {
   name: 'business-opp-detail',
   mixins: [tdk],
@@ -123,12 +113,18 @@ export default {
     ...mapGetters('user', [
       'bigmember' // 是否大会员
     ]),
-    // 是否是BI嵌入页面
-    isBIPage() {
-      return this.$route.query.resource
+    publishtime () {
+      return this.info.publishtime ? this.info.publishtime * 1000 : Date.now()
+    },
+    yuceendtime () {
+      return this.info.yuceendtime ? this.info.yuceendtime * 1000 : Date.now()
+    },
+    similarProject () {
+      return this.info.results && this.info.results[0] ? this.info.results[0] : {}
     }
   },
   created() {
+    this.setSdkInfo()
     this.getDetailInfo()
   },
   mounted() {
@@ -136,15 +132,23 @@ export default {
   },
   methods: {
     dateFromNow,
-    getDetailInfo() {
+    dateFormatter,
+    setSdkInfo() {
       const name =
-        '北京联合大学中央支持地方专项-科技创新服务能力建设-虚拟现实创新应用实验教学平台(中央资金)项目(第一~四包)中标公告'
+          '北京联合大学中央支持地方专项-科技创新服务能力建设-虚拟现实创新应用实验教学平台(中央资金)项目(第一~四包)中标公告'
       this.setPageTdkToView({
         title: `${name}招标采购_中标信息 - 剑鱼标讯`,
         keywords: `${name} ,${name} 招投标,${name} 招标采购,${name}中标信息,${name}通讯录,剑鱼标讯`,
         description: `剑鱼标讯为您提供${name}相关的工商企业信息及招投标、中标信息服务,涵盖工商企业信息、企业通讯录、公司中标信息、项目动态、年度项目统计、月度中标金额统计、市场区域及客户分布等一系列相关信息服务,全面了解${name},就上剑鱼标讯官网。`
       })
     },
+    async getDetailInfo() {
+      const id = this.$route.params?.id || ''
+      const { error_code: code, data = {} } = await getBusinessDetails({ id })
+      if(code === 0 && data) {
+        this.info = data
+      }
+    },
     goViewDetail(id) {
       const routeUrl = this.$router.resolve({
         path: '/pro_follow_detail?sid=' + id

+ 11 - 0
apps/mobile/src/api/modules/business.js

@@ -0,0 +1,11 @@
+import request from '@/api'
+import qs from 'qs'
+
+export function getBusinessDetails(data) {
+  data = qs.stringify(data)
+  return request({
+    url: '/bigmember/project/businessDetails',
+    method: 'POST',
+    data
+  })
+}

+ 1 - 0
apps/mobile/src/api/modules/index.js

@@ -24,3 +24,4 @@ export * from './ent'
 export * from './dataSmt'
 export * from './jyPoints'
 export * from './invoice'
+export * from './business'

+ 132 - 111
apps/mobile/src/views/business/Detail.vue

@@ -1,12 +1,12 @@
 <template>
-<!--  商机情报详情页-->
+  <!--  商机情报详情页-->
   <div class="j-container business-detail-page">
     <div class="j-main">
       <div class="business-header">
-        <div class="title">【商机情报】国家广播电视总局广播电视卫星直播管理中心异地灾备数据中心应用软件维护项目中标公告</div>
+        <div class="title">{{ info.title }}</div>
         <div class="business-sub-row">
           <div class="common-time">
-            {{ dateFromNow(new Date('2024-01-01').getTime()) }}
+            {{ dateFromNow(new Date(publishtime).getTime()) }}
           </div>
           <div class="business_option">
             <div class="potential-col">
@@ -15,7 +15,7 @@
           </div>
         </div>
       </div>
-      <section class="collect-info-tip">
+      <section class="collect-info-tip" v-if="info.isSubmit">
         【商机情报】想获得更精准商机情报?立即<em class="handle-em" @click="completeInfo">完善信息</em>。您也可以<em class="handle-em" @click="openCustomer">联系客服</em>进行相关咨询。
       </section>
       <div class="business-content">
@@ -27,22 +27,22 @@
           <div class="box-con">
             <div class="unit_row">
               <span class="unit_label">采购单位</span>
-              <span class="list_pur_name">{{ info.buyer || '北京市工商行政管理局朝阳分局' }}</span>
+              <span class="list_pur_name">{{ info.buyer }}</span>
             </div>
             <div class="unit_row">
               <span class="unit_label"><span class="point"></span>预测线索</span>
-              <span class="poten_name">{{ info.title ||  '淮安市高级职业技术学校台式电脑采购项目招标公告'}}</span>
+              <span class="poten_name">{{ info.title && info.title.indexOf('】') ? info.title.substring(info.title.indexOf('】') + 1) : info.title }}</span>
             </div>
             <div class="unit_row mt8">
               <span class="unit_label"><span class="point"></span>预测采购内容</span>
               <span class="poten_name">
-              <span>{{ info.purchasing || '该单位将采购钢筋、水泥、隔热板、大理石砖、玻璃、木材、钢筋、水泥、隔热板、大理石砖、玻璃' }}</span>
+              <span>{{ info.purchasing }}</span>
             </span>
             </div>
             <div class="unit_row mt8">
               <span class="unit_label">
                 <span class="point"></span>预测采购时间:
-                <span style="color: #1d1d1d;">{{info.yuceendtime || '2023-01-01' }}</span>
+                <span style="color: #1d1d1d;">{{ dateFormatter(info.yuceendtime, 'yyyy-MM-dd') }}</span>
               </span>
             </div>
           </div>
@@ -55,20 +55,20 @@
           <div class="box-con">
             <div class="unit_row">
               <span class="unit_label">同类项目:</span>
-              <span class="unit_name similar_project clickable" @click="goProjectDetail(info.p_id,info.p_orther)">
-                {{ info.p_orther || '关于泉州市第一医院内HIS系统改造项目'}}
-                <van-icon name="arrow" color="#C0C4CC"/>
+              <span class="unit_name similar_project clickable" @click="goProjectDetail(similarProject.p_id, similarProject.p_orther)">
+                {{ similarProject.p_orther }}
+                <van-icon name="arrow" color="#C0C4CC" v-if="similarProject.p_orther"/>
               </span>
             </div>
             <div class="unit_row mt8">
               <span class="unit_label">联系人:</span>
-              <span class="unit_name">{{ info.p_person || '王女士'}}</span>
+              <span class="unit_name">{{ similarProject.p_person }}</span>
             </div>
             <div class="unit_row mt8">
               <span class="unit_label">联系电话:</span>
               <span class="unit_name phone">
-                {{ info.p_phone || '15111111111' }}
-                <i class="icon_phone" @click="telHandle(info.p_phone)"></i>
+                {{ similarProject.p_phone }}
+                <i class="icon_phone" @click="telHandle(similarProject.p_phone)"></i>
               </span>
             </div>
           </div>
@@ -79,8 +79,8 @@
 </template>
 
 <script>
-import { dateFromNow, callPhone } from '@/utils'
-import { projectFollowCheck } from '@/api/modules/'
+import { dateFromNow, callPhone, dateFormatter } from '@/utils'
+import { projectFollowCheck, getBusinessDetails } from '@/api/modules/'
 import { Icon } from 'vant'
 import { mapGetters } from 'vuex'
 export default {
@@ -98,9 +98,29 @@ export default {
       'power',
       'isMember',
     ]),
+    publishtime () {
+      return this.info.publishtime ? this.info.publishtime * 1000 : Date.now()
+    },
+    yuceendtime () {
+      return this.info.yuceendtime ? this.info.yuceendtime * 1000 : Date.now()
+    },
+    similarProject () {
+      return this.info.results && this.info.results[0] ? this.info.results[0] : {}
+    }
+  },
+  created() {
+    this.getDetailInfo()
   },
   methods: {
     dateFromNow,
+    dateFormatter,
+    async getDetailInfo() {
+      const id = this.$route.params?.id || ''
+      const { error_code: code, data = {} } = await getBusinessDetails({ id })
+      if(code === 0 && data) {
+        this.info = data
+      }
+    },
     // 跳转潜在项目预测(无权限用户引导大会员留资,大会员引导跳转到潜在项目预测页面。)
     goPotentialPage () {
       if(this.isMember) {
@@ -150,6 +170,7 @@ export default {
     },
     // 电话
     telHandle (phone) {
+      if(!phone) return
       callPhone(phone)
     },
     // 联系客服
@@ -165,112 +186,112 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-  .business-detail-page{
-    .business-header{
-      background: #fff;
-      padding: 24px 16px 16px;
-      margin-bottom: 8px;
+.business-detail-page{
+  .business-header{
+    background: #fff;
+    padding: 24px 16px 16px;
+    margin-bottom: 8px;
 
-      .title{
-        font-size:20px;
-        line-height:30px;
-        color: #171826;
-        margin-bottom:12px;
-      }
-      .business-sub-row{
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
+    .title{
+      font-size:20px;
+      line-height:30px;
+      color: #171826;
+      margin-bottom:12px;
+    }
+    .business-sub-row{
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
 
-        .common-time{
-          font-size:12px;
-          color: #9B9CA3;
-        }
-        .potential-col {
-          padding: 4px 8px;
-          border-radius: 4px;
-          border: 0.5px solid #87DFEA;
-          background: #EAF8FA;
-          font-size:12px;
-        }
-        .icon_right {
-          display: inline-block;
-          width: 10px;
-          height: 10px;
-          background: url('@/assets/image/icon/icon-right2.png') no-repeat center;
-          background-size: contain;
-          margin-left: 4px;
-        }
+      .common-time{
+        font-size:12px;
+        color: #9B9CA3;
+      }
+      .potential-col {
+        padding: 4px 8px;
+        border-radius: 4px;
+        border: 0.5px solid #87DFEA;
+        background: #EAF8FA;
+        font-size:12px;
+      }
+      .icon_right {
+        display: inline-block;
+        width: 10px;
+        height: 10px;
+        background: url('@/assets/image/icon/icon-right2.png') no-repeat center;
+        background-size: contain;
+        margin-left: 4px;
       }
     }
-    .collect-info-tip {
-      font-size:13px;
-      color: #1D1D1D;
-      line-height:20px;
-      padding: 8px 47px 8px 16px;
-      background: #fff url('@/assets/image/business/tip-bg.png')  no-repeat center right;
-      background-size:contain;
-      margin-bottom:8px;
+  }
+  .collect-info-tip {
+    font-size:13px;
+    color: #1D1D1D;
+    line-height:20px;
+    padding: 8px 47px 8px 16px;
+    background: #fff url('@/assets/image/business/tip-bg.png')  no-repeat center right;
+    background-size:contain;
+    margin-bottom:8px;
+  }
+  .business-content{
+    .poten-box, .similar-box{
+      background: #fff;
     }
-    .business-content{
-      .poten-box, .similar-box{
-        background: #fff;
+    .box-title{
+      padding: 16px 0 6px 16px;
+      font-size:18px;
+      line-height: 20px;
+      color: #171826;
+      display: flex;
+      align-items: center;
+      .left-line{
+        display: inline-block;
+        background: #2ABED1;
+        width: 3px;
+        height:16px;
+        border-radius: 11px;
+        margin-right: 8px;
       }
-      .box-title{
-        padding: 16px 0 6px 16px;
-        font-size:18px;
-        line-height: 20px;
-        color: #171826;
+    }
+    .box-con{
+      padding: 16px;
+      font-size:14px;
+      color: #171826;
+      line-height:20px;
+      .unit_row {
+        display: flex;
+        flex-direction: column;
+      }
+      .unit_label{
+        font-size: 12px;
+        line-height: 18px;
+        color: #9B9CA3;
+      }
+      .similar_project{
         display: flex;
+        justify-content: space-between;
         align-items: center;
-        .left-line{
-          display: inline-block;
-          background: #2ABED1;
-          width: 3px;
-          height:16px;
-          border-radius: 11px;
-          margin-right: 8px;
-        }
       }
-      .box-con{
-        padding: 16px;
-        font-size:14px;
-        color: #171826;
-        line-height:20px;
-        .unit_row {
-          display: flex;
-          flex-direction: column;
-        }
-        .unit_label{
-          font-size: 12px;
-          line-height: 18px;
-          color: #9B9CA3;
-        }
-        .similar_project{
-          display: flex;
-          justify-content: space-between;
-          align-items: center;
-        }
-        .phone{
-          display: flex;
-          align-items: center;
-        }
-        .icon_phone{
-          display: inline-block;
-          width: 24px;
-          height: 24px;
-          background: url('@/assets/image/icon/icon-phone.png') no-repeat center;
-          background-size: contain;
-          margin-left: 12px;
-        }
+      .phone{
+        display: flex;
+        align-items: center;
+      }
+      .icon_phone{
+        display: inline-block;
+        width: 24px;
+        height: 24px;
+        background: url('@/assets/image/icon/icon-phone.png') no-repeat center;
+        background-size: contain;
+        margin-left: 12px;
       }
     }
-    .handle-em{
-      color:#2ABED1 !important;
-    }
-    .mt8{
-      margin-top:8px;
-    }
   }
+  .handle-em{
+    color:#2ABED1 !important;
+  }
+  .mt8{
+    margin-top:8px;
+  }
+}
 
 </style>