|
@@ -24,12 +24,15 @@
|
|
<van-cell
|
|
<van-cell
|
|
v-for="(contentItem, contentIndex) in contentList"
|
|
v-for="(contentItem, contentIndex) in contentList"
|
|
:key="contentIndex"
|
|
:key="contentIndex"
|
|
- @click="chooseContent(contentIndex)"
|
|
|
|
|
|
+ @click="chooseContent(contentItem, contentIndex)"
|
|
>
|
|
>
|
|
<div slot="default" class="contentItemDiv" v-if="contentItem">
|
|
<div slot="default" class="contentItemDiv" v-if="contentItem">
|
|
<!-- 文章 -->
|
|
<!-- 文章 -->
|
|
<div
|
|
<div
|
|
- v-if="contentItem.type == 'ARTICLE'"
|
|
|
|
|
|
+ v-if="
|
|
|
|
+ contentItem.type == 'ARTICLE' ||
|
|
|
|
+ contentItem.type == 'THIRD_PARTY'
|
|
|
|
+ "
|
|
class="contentItemTitleTitleRow"
|
|
class="contentItemTitleTitleRow"
|
|
>
|
|
>
|
|
<div class="contentItemTitle">
|
|
<div class="contentItemTitle">
|
|
@@ -185,11 +188,16 @@ export default {
|
|
this.contentList = datas;
|
|
this.contentList = datas;
|
|
},
|
|
},
|
|
onLoad() {},
|
|
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() {
|
|
onRefresh() {
|
|
this.getNewsfeed();
|
|
this.getNewsfeed();
|