主页课程好评榜修改

This commit is contained in:
nisen
2023-10-30 21:16:08 +08:00
parent 4201940ea7
commit 11bd0a4f38

View File

@@ -427,7 +427,7 @@
<p class="ranking-title">课程好评榜</p> <p class="ranking-title">课程好评榜</p>
<ul class="xindex-ranking-review" style="overflow: auto;margin: 0;top: 0;"> <ul class="xindex-ranking-review" style="overflow: auto;margin: 0;top: 0;">
<li <li
@click="jumcasedet(item)" @click="toCourseDetail(item)"
class="xindex-ranking-li title-line-ellipsis" class="xindex-ranking-li title-line-ellipsis"
v-for="(item, index) in Positive" v-for="(item, index) in Positive"
:key="'bb' + index" :key="'bb' + index"
@@ -439,7 +439,7 @@
<span <span
class="portal-title-desc index-one-line-ellipsis title-line-ellipsis" class="portal-title-desc index-one-line-ellipsis title-line-ellipsis"
style="font-size: 14px; color: #04243c; line-height: 26px" style="font-size: 14px; color: #04243c; line-height: 26px"
>{{ item.title }}</span >{{ item.name }}</span
> >
</li> </li>
</ul> </ul>
@@ -1226,10 +1226,24 @@ export default {
}, },
methods: { methods: {
getPositive() { getPositive() {
apiCase.queryComments(10).then(res => { // 这个是案例的好评
// apiCase.queryComments(10).then(res => {
// if (res.status == 200) {
// this.Positive = res.result;
// console.log(res);
// }
// });
// 修改成课程的好评
apiCourse.scorelist(10, 2).then(res => {
if (res.status == 200) { if (res.status == 200) {
res.result.forEach(item => {
if (item.publishTime != '') {
item.coverImg = item.images;
let time = item.publishTime.split('-');
item.publishTime = `${time[0]}${time[1]}${time[2]}`
}
})
this.Positive = res.result; this.Positive = res.result;
console.log(res);
} }
}); });
}, },