From 3a16e324f9d69209e541a09e6548bb719e6d15af Mon Sep 17 00:00:00 2001 From: 86182 Date: Mon, 17 Oct 2022 16:10:10 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=8E=A5=E5=8F=A3=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/phase2/index.js | 11 ++++++++++- src/views/Index.vue | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/api/phase2/index.js b/src/api/phase2/index.js index 618e2e01..c22ebb31 100644 --- a/src/api/phase2/index.js +++ b/src/api/phase2/index.js @@ -32,9 +32,18 @@ const articlelist=function (type){ return ajax.get('/xboe/portal/index/articlelist?type='+type); } +/** + * 首页课程排行榜 + * 参数和原接口一样,只需要换接口名称就可以 + * */ +const courselist=function (data){ + return ajax.post('/xboe/portal/index/courselist',data); +} + export default { cases, articleViews, qaAnswers, - articlelist + articlelist, + courselist } diff --git a/src/views/Index.vue b/src/views/Index.vue index 5aca0821..99bed077 100644 --- a/src/views/Index.vue +++ b/src/views/Index.vue @@ -399,6 +399,7 @@ import apiQa from '@/api/modules/qa.js'; import apiUser from '@/api/system/user.js'; import apiCoursePortal from '@/api/modules/coursePortal.js'; + import apiIndex from '@/api/phase2/index.js' import interactBar from '@/components/Portal/interactBar.vue'; import ad from '@/components/Portal/adFloat.vue'; import interactRowBar from '@/components/Portal/interactRowBar.vue'; @@ -634,7 +635,7 @@ pageIndex: pageIndex }; - apiCoursePortal.pageList(course).then(res => { + apiIndex.courselist(course).then(res => { if (res.status == 200 && res.result.list.length > 0) { let courseIds = []; res.result.list.forEach(item => {