From 4d1f77b1683773bc6a73afa3247a492409b23e68 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Tue, 30 Jul 2024 15:06:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E9=AA=8C=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/product/show/index.vue | 11 +++++------ src/pages/station/list/index.vue | 13 ++++++------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/pages/product/show/index.vue b/src/pages/product/show/index.vue index fc7b0b9..6cfaaf0 100644 --- a/src/pages/product/show/index.vue +++ b/src/pages/product/show/index.vue @@ -231,13 +231,12 @@ export default { } }, // 查询是否过期 - getStatus () { - this.$get(this.api.whetherToRenewTheFee, { + async getStatus () { + const { isRenew } = await this.$get(this.api.whetherToRenewTheFee, { mallId: this.id - }).then(({ isRenew }) => { - // 1正常显示资源,0显示续费 - this.overdue = isRenew - }).catch(res => { }) + }) + // 1正常显示资源,0显示续费 + this.overdue = isRenew }, // tab切换 tabChange ({ id }) { diff --git a/src/pages/station/list/index.vue b/src/pages/station/list/index.vue index 95d1a06..8b0e2f1 100644 --- a/src/pages/station/list/index.vue +++ b/src/pages/station/list/index.vue @@ -110,9 +110,11 @@ export default { } }, toProduct (item) { - // 未过期 - if (item.isInEffect) { - const links = item.nonAssociatedLinks + const links = item.nonAssociatedLinks + // 已过期 / 没有cid并且没有链接,则跳转到产品详情 + if (!item.isInEffect || (!item.cid && !links)) { + this.$router.push(`/product/show?id=${item.mallId}`) + } else { // 有链接 if (links && links.length) { if (links.length === 1) { @@ -122,11 +124,8 @@ export default { this.links = item.nonAssociatedLinks } } else { - this.$router.push(`/station/preview?courseId=${item.cid}&curriculumName=${item.goodsName}&mallId=${item.mallId || ''}&keyword=${this.keyword}&active=${this.active}`) + this.$router.push(`/station/preview?courseId=${item.cid || ''}&curriculumName=${item.goodsName}&mallId=${item.mallId || ''}&keyword=${this.keyword}&active=${this.active}`) } - } else { - // 续费 - this.$router.push(`/product/show?id=${item.mallId}`) } }, // tab切换