|
@@ -36,6 +36,15 @@
|
|
{{ courseDetail.vcount != null ? courseDetail.vcount : 0 }}人
|
|
{{ courseDetail.vcount != null ? courseDetail.vcount : 0 }}人
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="cType">
|
|
|
|
+ <div
|
|
|
|
+ v-for="(item, index) in courseType"
|
|
|
|
+ :key="index"
|
|
|
|
+ style="margin: 10px 10px 0 0"
|
|
|
|
+ >
|
|
|
|
+ <span>{{ item }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
<div class="now_study" @click="dialogVisible = true">
|
|
<div class="now_study" @click="dialogVisible = true">
|
|
立即学习
|
|
立即学习
|
|
</div>
|
|
</div>
|
|
@@ -152,6 +161,7 @@ export default {
|
|
courseDetail: {},
|
|
courseDetail: {},
|
|
aStudentName: [],
|
|
aStudentName: [],
|
|
chapInfo: [],
|
|
chapInfo: [],
|
|
|
|
+ courseType: [],
|
|
mr: require("../assets/icon/wheel.png"),
|
|
mr: require("../assets/icon/wheel.png"),
|
|
};
|
|
};
|
|
},
|
|
},
|
|
@@ -228,7 +238,17 @@ export default {
|
|
loading.close();
|
|
loading.close();
|
|
// this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
|
|
// this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
|
|
this.courseDetail = res.data[0][0];
|
|
this.courseDetail = res.data[0][0];
|
|
- this.aStudentName = res.data[1];
|
|
|
|
|
|
+ var a = res.data[0];
|
|
|
|
+ var b = res.data[1];
|
|
|
|
+ for (var i = 0; i < a.length; i++) {
|
|
|
|
+ for (var j = 0; j < b.length; j++) {
|
|
|
|
+ if (a[i].pid == b[j].id) {
|
|
|
|
+ this.courseType.push(b[j].name + ":" + a[i].name);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ console.log(this.courseType);
|
|
|
|
+ this.aStudentName = res.data[2];
|
|
this.chapInfo = JSON.parse(this.courseDetail.chapters);
|
|
this.chapInfo = JSON.parse(this.courseDetail.chapters);
|
|
})
|
|
})
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
@@ -480,4 +500,14 @@ export default {
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
|
|
+.cType {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: row;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+}
|
|
|
|
+.cType > div > span {
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|