From 11bd0a4f38bca2e2035a2929fbc72400589f53e3 Mon Sep 17 00:00:00 2001 From: nisen Date: Mon, 30 Oct 2023 21:16:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E9=A1=B5=E8=AF=BE=E7=A8=8B=E5=A5=BD?= =?UTF-8?q?=E8=AF=84=E6=A6=9C=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Index.vue | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/views/Index.vue b/src/views/Index.vue index f994f04a..5a3a8329 100644 --- a/src/views/Index.vue +++ b/src/views/Index.vue @@ -427,7 +427,7 @@

课程好评榜

@@ -1226,10 +1226,24 @@ export default { }, methods: { 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) { + 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; - console.log(res); } }); },