mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 04:16:45 +08:00
主页课程好评榜修改
This commit is contained in:
@@ -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);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user