|
@@ -4,6 +4,7 @@
|
|
|
<div
|
|
|
class="j-main article-content-main"
|
|
|
:class="{ 'show-underline': otherModel.hasProject }"
|
|
|
+ @click="onScrollWrapperClick"
|
|
|
ref="scrollWrapper"
|
|
|
@scroll.passive="onScroll"
|
|
|
>
|
|
@@ -115,8 +116,9 @@ import FreeUserBiddingMask from '@/views/article/components/FreeUserBiddingMask.
|
|
|
import FreeUserAdvancedMask from '@/views/article/components/FreeUserAdvancedMask.vue'
|
|
|
import { throttle } from 'lodash'
|
|
|
import { mapState, mapMutations, mapActions, mapGetters } from 'vuex'
|
|
|
-
|
|
|
import { getArticleShareInfo } from '@/api/modules/article'
|
|
|
+import { LINKS } from '@/data'
|
|
|
+import { openAppOrWxPage } from '@/utils/'
|
|
|
|
|
|
export default {
|
|
|
name: 'ArticleContent',
|
|
@@ -207,7 +209,13 @@ export default {
|
|
|
expandModel: (state) => state.article.expandModel,
|
|
|
otherModel: (state) => state.article.otherModel
|
|
|
}),
|
|
|
- ...mapGetters('user', ['isLogin', 'isSuper', 'isMember', 'isNewBusiness']),
|
|
|
+ ...mapGetters('user', [
|
|
|
+ 'isLogin',
|
|
|
+ 'isSuper',
|
|
|
+ 'isMember',
|
|
|
+ 'isNewBusiness',
|
|
|
+ 'bigMemberPower'
|
|
|
+ ]),
|
|
|
canRead() {
|
|
|
return this.content.isCanRead
|
|
|
},
|
|
@@ -235,7 +243,6 @@ export default {
|
|
|
this.getParams()
|
|
|
await this.getPreAgentInfo()
|
|
|
await this.getBaseInfo()
|
|
|
- this.checkProject()
|
|
|
if (this.canRead) {
|
|
|
this.getAdvancedInfo()
|
|
|
}
|
|
@@ -267,6 +274,72 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ onScrollWrapperClick(e) {
|
|
|
+ // project-name事件委托
|
|
|
+ if (e.target.classList.contains('keyword-underline')) {
|
|
|
+ this.clickKeywordUnderline(e)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 页面下划线高内容亮事件委托
|
|
|
+ clickKeywordUnderline(e) {
|
|
|
+ const target = e.target
|
|
|
+ if (target.classList.contains('project-name')) {
|
|
|
+ this.goMemberFollowPage()
|
|
|
+ } else if (target.classList.contains('winner-name')) {
|
|
|
+ this.goToEntPortraitPage(target)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ goMemberFollowPage() {
|
|
|
+ const { _ob } = this.content || {}
|
|
|
+ const { fid, id } = this.otherModel.projectFollowState || {}
|
|
|
+ const params = {
|
|
|
+ fid,
|
|
|
+ sid: id
|
|
|
+ }
|
|
|
+ sessionStorage.setItem('bigvip-fid', JSON.stringify(params))
|
|
|
+ if (this.isNewBusiness) {
|
|
|
+ openAppOrWxPage(LINKS.项目信息, {
|
|
|
+ query: {
|
|
|
+ from: 'client',
|
|
|
+ industry: _ob ? _ob.buyerClass : undefined
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ openAppOrWxPage(LINKS.项目详情页)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ goToEntPortraitPage(target) {
|
|
|
+ const id = target.dataset.eid
|
|
|
+ const eName = target.dataset.ename
|
|
|
+ ?.replace(/#/g, '%23')
|
|
|
+ ?.replace(/\?/g, '%3F')
|
|
|
+ if (!id) {
|
|
|
+ return this.$toast('暂无数据')
|
|
|
+ } else {
|
|
|
+ const noPower =
|
|
|
+ this.bigMemberPower.indexOf(4) === -1 &&
|
|
|
+ this.bigMemberPower.indexOf(12) === -1 &&
|
|
|
+ this.bigMemberPower.indexOf(13) === -1
|
|
|
+ if (this.isMember && noPower) {
|
|
|
+ if (eName) {
|
|
|
+ openAppOrWxPage({
|
|
|
+ wx: LINKS.旧版企业信息前缀.wx + eName,
|
|
|
+ app: LINKS.旧版企业信息前缀.app + eName,
|
|
|
+ h5: LINKS.旧版企业信息前缀.h5 + eName
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ return this.$toast('暂无数据')
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ sessionStorage.removeItem('$data-ent_portrait')
|
|
|
+ openAppOrWxPage(LINKS.企业画像页面, {
|
|
|
+ query: {
|
|
|
+ eId: id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
beforeLeaveVue() {
|
|
|
this.saveToStorage()
|
|
|
},
|
|
@@ -298,8 +371,6 @@ export default {
|
|
|
this.shareConf.title = this.getRandomShareText()
|
|
|
this.shareConf.content = '全国招标信息免费看,不遮挡'
|
|
|
this.shareConf.pathname = '/swordfish/about'
|
|
|
-
|
|
|
- console.log(this.shareConf.title)
|
|
|
},
|
|
|
calcAppShareInfo(t) {
|
|
|
const shareType = t.id
|
|
@@ -366,7 +437,6 @@ export default {
|
|
|
targetVm.getIsView()
|
|
|
}
|
|
|
},
|
|
|
- checkProject() {},
|
|
|
async dialog1() {
|
|
|
return await this.$dialog.alert({
|
|
|
title: '申请监控更多项目',
|