|
|
@ -22,7 +22,7 @@ |
|
|
|
<div class="bottom"> |
|
|
|
<div class="bottom"> |
|
|
|
<p class="text"><span>{{ item.goodsName || item.curriculumName }}</span></p> |
|
|
|
<p class="text"><span>{{ item.goodsName || item.curriculumName }}</span></p> |
|
|
|
<a v-if="!item.isInEffect">续费</a> |
|
|
|
<a v-if="!item.isInEffect">续费</a> |
|
|
|
<a v-else-if="item.cid">进入实验</a> |
|
|
|
<a v-else>进入实验</a> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
@ -84,7 +84,7 @@ export default { |
|
|
|
classificationName: '最近使用', |
|
|
|
classificationName: '最近使用', |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
classificationId: '', |
|
|
|
classificationId: -1, |
|
|
|
classificationName: '全部', |
|
|
|
classificationName: '全部', |
|
|
|
}, |
|
|
|
}, |
|
|
|
...data, |
|
|
|
...data, |
|
|
@ -103,28 +103,38 @@ export default { |
|
|
|
this.products = page.records |
|
|
|
this.products = page.records |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
const { data } = await this.$get(this.api.schoolCourse, { |
|
|
|
const { data } = await this.$get(this.api.schoolCourse, { |
|
|
|
authority: this.active, |
|
|
|
authority: this.active === -1 ? '' : this.active, |
|
|
|
goodsName: this.keyword, |
|
|
|
goodsName: this.keyword, |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.products = data |
|
|
|
this.products = data |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 记录最近使用 |
|
|
|
|
|
|
|
async addRecord (mallId) { |
|
|
|
|
|
|
|
await this.$post(`${this.api.recordRecentUsage}?mallId=${mallId}`) |
|
|
|
|
|
|
|
}, |
|
|
|
toProduct (item) { |
|
|
|
toProduct (item) { |
|
|
|
|
|
|
|
const params = `&keyword=${this.keyword}&active=${this.active}` |
|
|
|
const links = item.nonAssociatedLinks |
|
|
|
const links = item.nonAssociatedLinks |
|
|
|
// 已过期 / 没有cid并且没有链接,则跳转到产品详情 |
|
|
|
// 已过期 / 没有cid并且没有链接,则跳转到产品详情 |
|
|
|
if (!item.isInEffect || (!item.cid && !links)) { |
|
|
|
if (!item.isInEffect) { |
|
|
|
this.$router.push(`/product/show?id=${item.mallId}`) |
|
|
|
this.$router.push(`/product/show?id=${item.mallId}${params}`) |
|
|
|
|
|
|
|
} else if (item.isInEffect && !item.cid && !links) { |
|
|
|
|
|
|
|
this.addRecord(item.mallId) |
|
|
|
|
|
|
|
this.$router.push(`/product/show?id=${item.mallId}${params}`) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// 有链接 |
|
|
|
// 有链接 |
|
|
|
if (links && links.length) { |
|
|
|
if (links && links.length) { |
|
|
|
if (links.length === 1) { |
|
|
|
if (links.length === 1) { |
|
|
|
|
|
|
|
this.addRecord(item.mallId) |
|
|
|
window.open(links[0].url) |
|
|
|
window.open(links[0].url) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
this.addRecord(item.mallId) |
|
|
|
this.linkVisible = true |
|
|
|
this.linkVisible = true |
|
|
|
this.links = item.nonAssociatedLinks |
|
|
|
this.links = item.nonAssociatedLinks |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} 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 || ''}${params}`) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|