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切换