From ed7fe3827d1f2a6e6bc1a89324e8d835c01e7f16 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Mon, 4 Nov 2024 14:15:40 +0800 Subject: [PATCH] fix --- src/pages/column/index.vue | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/pages/column/index.vue b/src/pages/column/index.vue index c1a00ff..4e18005 100644 --- a/src/pages/column/index.vue +++ b/src/pages/column/index.vue @@ -609,7 +609,7 @@ export default { this.filter(); }, // 点击栏目回调 - columnClick (to, left) { + async columnClick (to, left) { this.page = 1 const { typeId } = to; // 如果是左边的栏目,并且是第一级,并且长页/链接,则不作反应 @@ -624,6 +624,19 @@ export default { this.$router.replace(`/course?id=${this.id}&siteId=${this.site}`).catch(() => { }) return; } + // 如果是列表详情,则查询文章列表,直接跳转到文章页 + if (to.listStyleId === 77) { + const { data } = await this.$post(this.api.newlyPublishedArticles, { + siteId: this.site, + columnIds: [this.id], + pageNum: 1, + pageSize: 1, + }) + if (data.records.length) { + this.$router.replace(`/article?articleId=${data.records[0].id}&siteId=${this.site}&id=${this.id}`).catch(() => { }) + return + } + } // 跳转链接 if (typeId === 2) { let href = to.linkAddress;