diff --git a/src/api/index.js b/src/api/index.js index cc5a51b..c98cad7 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -9,7 +9,8 @@ export default { theAttachmentUnderTheQueryColumn: `iasf/content/file/theAttachmentUnderTheQueryColumn`, findColumn: `iasf/sysColumn/findById`, queryClassif: `iasf/content/classification/allTheQuery`, + getTheFullArticleByColumn: `iasf/sysColumn/getTheFullArticleByColumn`, queryLabel: `iasf/content/label/queryAllArticleSubjectTags`, getsTheSubColumn: `iasf/sysColumn/getsTheSubColumn`, - getTheFullArticleByColumn: `iasf/sysColumn/getTheFullArticleByColumn`, + articlePreview: `iasf/sysContent/articlePreview`, } \ No newline at end of file diff --git a/src/components/breadcrumb/index.vue b/src/components/breadcrumb/index.vue index c128970..5fd2043 100644 --- a/src/components/breadcrumb/index.vue +++ b/src/components/breadcrumb/index.vue @@ -40,7 +40,7 @@ export default { }; }, methods: { - update(data){ + update(data) { this.pages = data.split('/') } } diff --git a/src/layouts/navbar/index.vue b/src/layouts/navbar/index.vue index 0243b3c..b86c748 100644 --- a/src/layouts/navbar/index.vue +++ b/src/layouts/navbar/index.vue @@ -70,6 +70,7 @@ export default { }, // 跳转 jump(id) { + console.log("🚀 ~ file: index.vue ~ line 73 ~ jump ~ id", id) this.getPath(this.menus ,id) const to = this.toItem const { typeId } = to diff --git a/src/libs/util.js b/src/libs/util.js index 9e9ea28..f41ce95 100644 --- a/src/libs/util.js +++ b/src/libs/util.js @@ -162,25 +162,6 @@ const util = { showClose: true, duration }); - }, - // 登录互踢 - getToken() { - if (process.env.NODE_ENV == "production") { - if (store.state.user.dataTime && !logout) { - axios.get(`${api.queryToken}?token=${_local.get(Setting.tokenKey)}`).then(res => { - if (store.state.user.dataTime && (res.data.message != store.state.user.dataTime)) { - logout || Message.error("您已在另一台设备登录,本次登录已下线!"); - logout = true; - setTimeout(() => { - _local.remove(Setting.storeKey); - _local.remove(Setting.tokenKey); - location.reload(); - }, 1500); - } - }).catch(err => { - }); - } - } } }; diff --git a/src/mixins/page/index.js b/src/mixins/page/index.js index 3266d2d..adc40a0 100644 --- a/src/mixins/page/index.js +++ b/src/mixins/page/index.js @@ -15,22 +15,34 @@ export default { }, methods: { // 打开链接 - openLink(item) { + async openLink(item) { const { link } = item if (link.linkName === '无') return false console.log("🚀 ~ file: index.js ~ line 19 ~ openLink ~ link", link) let href = link.linkAddress const type = link.connectionType - if (type === 1) { + if (type === 1) { // 站内链接 if (link.articleId) { // 文章 - href = '/article?id=' + link.articleId + // 查询文章详情。禁用的文章要提示 + const data = await this.$post(`${this.api.findArticle}?id=${link.articleId}`) + if (data.data.isDisable) { + return Util.errorMsg('该文章已禁用!') + } else { + href = '/article?id=' + link.articleId + } } else { // 栏目 href = '/column?id=' + link.columnId[link.columnId.length - 1] } href = this.$router.resolve(href + '&siteId=' + (this.$route.query.siteId || this.site)).href - } else if (type === 3) { + } else if (type === 3) { // 站外链接 if (link.otherArticleId) { // 文章 - href = '/article?id=' + link.otherArticleId + // 查询文章详情。禁用的文章要提示 + const data = await this.$post(`${this.api.findArticle}?id=${link.otherArticleId}`) + if (data.data.isDisable) { + return Util.errorMsg('该文章已禁用!') + } else { + href = '/article?id=' + link.otherArticleId + } } else { // 栏目 href = '/column?id=' + link.otherColumnId[link.otherColumnId.length - 1] } diff --git a/src/pages/article/activity.vue b/src/pages/article/activity.vue index da6af7b..148e38b 100644 --- a/src/pages/article/activity.vue +++ b/src/pages/article/activity.vue @@ -1,14 +1,14 @@