Ver Fonte

feat:联调是否需要完善信息提示接口

zhangsiya há 1 ano atrás
pai
commit
60ba2de6e0

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

@@ -10,3 +10,12 @@ export function getBusinessDetails(data) {
     data
   })
 }
+
+// 是否需要完善信息提示
+export function isNeedCompleteInfo () {
+  return request({
+    baseURL: '/salesLeads',
+    url: '/businessRetain',
+    method: 'POST'
+  })
+}

+ 13 - 3
apps/bigmember_pc/src/views/business/detail.vue

@@ -17,7 +17,7 @@
         </div>
       </div>
     </div>
-    <section class="collect-info-tip" v-if="info.isSubmit">
+    <section class="collect-info-tip" v-if="needComplete">
       【商机情报】想获得更精准商机情报?立即<em
         class="handle-em"
         @click="completeInfo"
@@ -102,7 +102,7 @@ import CollectInfo from '@/components/collect-info/CollectInfo.vue'
 import { dateFromNow, dateFormatter } from '@/utils/'
 import { mapGetters } from 'vuex'
 import tdk from '@/utils/mixins/set-tdk.js'
-import { getBusinessDetails } from '@/api/modules/'
+import { getBusinessDetails, isNeedCompleteInfo } from '@/api/modules/'
 export default {
   name: 'business-opp-detail',
   mixins: [tdk],
@@ -112,7 +112,8 @@ export default {
   },
   data() {
     return {
-      info: {}
+      info: {},
+      needComplete: false
     }
   },
   computed: {
@@ -133,6 +134,7 @@ export default {
   },
   created() {
     this.setSdkInfo()
+    this.isNeedComplete()
     this.getDetailInfo()
   },
   mounted() {
@@ -149,6 +151,14 @@ export default {
         description: `剑鱼标讯为您提供${name}相关的工商企业信息及招投标、中标信息服务,涵盖工商企业信息、企业通讯录、公司中标信息、项目动态、年度项目统计、月度中标金额统计、市场区域及客户分布等一系列相关信息服务,全面了解${name},就上剑鱼标讯官网。`
       })
     },
+    // 是否需要完善信息
+    async isNeedComplete() {
+      const { error_code: code, data } = await isNeedCompleteInfo()
+      if(code === 0) {
+        this.needComplete = !!data
+      }
+    },
+    // 获取信息详情
     async getDetailInfo() {
       const id = this.$route.params?.id || ''
       const { error_code: code, data = {} } = await getBusinessDetails({ id })

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

@@ -9,3 +9,11 @@ export function getBusinessDetails(data) {
     data
   })
 }
+
+// 是否需要完善信息提示
+export function isNeedCompleteInfo () {
+  return request({
+    url: '/salesLeads/businessRetain',
+    method: 'POST'
+  })
+}

+ 14 - 3
apps/mobile/src/views/business/Detail.vue

@@ -15,7 +15,7 @@
           </div>
         </div>
       </div>
-      <section class="collect-info-tip" v-if="info.isSubmit">
+      <section class="collect-info-tip" v-if="needComplete">
         【商机情报】想获得更精准商机情报?立即<em class="handle-em" @click="completeInfo">完善信息</em>。您也可以<em class="handle-em" @click="openCustomer">联系客服</em>进行相关咨询。
       </section>
       <div class="business-content">
@@ -80,7 +80,7 @@
 
 <script>
 import { dateFromNow, callPhone, dateFormatter } from '@/utils'
-import { projectFollowCheck, getBusinessDetails } from '@/api/modules/'
+import { projectFollowCheck, getBusinessDetails, isNeedCompleteInfo } from '@/api/modules/'
 import { Icon } from 'vant'
 import { mapGetters } from 'vuex'
 export default {
@@ -90,7 +90,9 @@ export default {
   },
   data () {
     return {
-      info: {}
+      info: {},
+      // 是否需要完善信息提示
+      needComplete: false
     }
   },
   computed: {
@@ -109,11 +111,20 @@ export default {
     }
   },
   created() {
+    this.isNeedComplete()
     this.getDetailInfo()
   },
   methods: {
     dateFromNow,
     dateFormatter,
+    // 是否需要完善信息
+    async isNeedComplete() {
+      const { error_code: code, data } = await isNeedCompleteInfo()
+      if(code === 0) {
+        this.needComplete = !!data
+      }
+    },
+    // 获取信息详情
     async getDetailInfo() {
       const id = this.$route.params?.id || ''
       const { error_code: code, data = {} } = await getBusinessDetails({ id })