|
@@ -24,12 +24,15 @@
|
|
|
<van-cell
|
|
|
v-for="(contentItem, contentIndex) in contentList"
|
|
|
:key="contentIndex"
|
|
|
- @click="chooseContent(contentIndex)"
|
|
|
+ @click="chooseContent(contentItem, contentIndex)"
|
|
|
>
|
|
|
<div slot="default" class="contentItemDiv" v-if="contentItem">
|
|
|
<!-- 文章 -->
|
|
|
<div
|
|
|
- v-if="contentItem.type == 'ARTICLE'"
|
|
|
+ v-if="
|
|
|
+ contentItem.type == 'ARTICLE' ||
|
|
|
+ contentItem.type == 'THIRD_PARTY'
|
|
|
+ "
|
|
|
class="contentItemTitleTitleRow"
|
|
|
>
|
|
|
<div class="contentItemTitle">
|
|
@@ -185,11 +188,16 @@ export default {
|
|
|
this.contentList = datas;
|
|
|
},
|
|
|
onLoad() {},
|
|
|
- chooseContent(index) {
|
|
|
- this.$router.push({
|
|
|
- name: "learn-content",
|
|
|
- params: { materialId: this.contentList[index].id }
|
|
|
- });
|
|
|
+ chooseContent(contentItem, index) {
|
|
|
+ if (contentItem.type === "THIRD_PARTY") {
|
|
|
+ // window.location.href = contentItem.contents;
|
|
|
+ window.open(contentItem.contents);
|
|
|
+ } else {
|
|
|
+ this.$router.push({
|
|
|
+ name: "learn-content",
|
|
|
+ params: { materialId: this.contentList[index].id }
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
onRefresh() {
|
|
|
this.getNewsfeed();
|