|
@@ -114,7 +114,7 @@
|
|
|
/>
|
|
|
</div>
|
|
|
<div class="j-footer article-content-footer">
|
|
|
- <TabActions :beforeLeavePage="beforeLeavePage" />
|
|
|
+ <TabActions :beforeLeavePage="beforeLeavePage" v-if="canRead" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</van-skeleton>
|
|
@@ -147,7 +147,7 @@
|
|
|
import { Tabs, Tab, Icon, Skeleton } from 'vant'
|
|
|
import { mixinHeader } from '@/utils/mixins/header'
|
|
|
import { appWxShareMixin } from '@/utils/mixins/modules/app-wx-share'
|
|
|
-import { isElementInScrollArea } from '@jy/util'
|
|
|
+import { isElementInScrollArea, checkAncestorClass } from '@jy/util'
|
|
|
import ContentHeader from '@/views/article/components/ContentHeader.vue'
|
|
|
import ContentHeaderBannerTip from '@/views/article/components/ContentHeaderBannerTip.vue'
|
|
|
import ContentAbstract from '@/views/article/components/ContentAbstract.vue'
|
|
@@ -171,6 +171,8 @@ import { LINKS } from '@/data'
|
|
|
import { openAppOrWxPage } from '@/utils/'
|
|
|
import setPageTdk from '@/utils/mixins/modules/set-tdk'
|
|
|
|
|
|
+console.log(checkAncestorClass)
|
|
|
+
|
|
|
export default {
|
|
|
name: 'ArticleContent',
|
|
|
mixins: [mixinHeader, setPageTdk, appWxShareMixin],
|
|
@@ -402,8 +404,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
onScrollWrapperClick(e) {
|
|
|
+ const checkUnderline = checkAncestorClass(e, 'keyword-underline', 3)
|
|
|
// project-name事件委托
|
|
|
- if (e.target.classList.contains('keyword-underline')) {
|
|
|
+ if (checkUnderline.status) {
|
|
|
this.clickKeywordUnderline(e)
|
|
|
} else if (e.target.classList.contains('free-view')) {
|
|
|
this.clickFreeView(e)
|
|
@@ -413,11 +416,12 @@ export default {
|
|
|
},
|
|
|
// 页面下划线高内容亮事件委托
|
|
|
clickKeywordUnderline(e) {
|
|
|
- const target = e.target
|
|
|
- if (target.classList.contains('project-name')) {
|
|
|
+ const checkProjectName = checkAncestorClass(e, 'project-name', 3)
|
|
|
+ const checkWinnerName = checkAncestorClass(e, 'winner-name', 3)
|
|
|
+ if (checkProjectName.status) {
|
|
|
this.goMemberFollowPage()
|
|
|
- } else if (target.classList.contains('winner-name')) {
|
|
|
- this.goToEntPortraitPage(target)
|
|
|
+ } else if (checkWinnerName.status) {
|
|
|
+ this.goToEntPortraitPage(checkWinnerName.target)
|
|
|
}
|
|
|
},
|
|
|
goMemberFollowPage() {
|