mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-15 13:56:43 +08:00
首页接口替换
This commit is contained in:
@@ -32,9 +32,18 @@ const articlelist=function (type){
|
|||||||
return ajax.get('/xboe/portal/index/articlelist?type='+type);
|
return ajax.get('/xboe/portal/index/articlelist?type='+type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首页课程排行榜
|
||||||
|
* 参数和原接口一样,只需要换接口名称就可以
|
||||||
|
* */
|
||||||
|
const courselist=function (data){
|
||||||
|
return ajax.post('/xboe/portal/index/courselist',data);
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
cases,
|
cases,
|
||||||
articleViews,
|
articleViews,
|
||||||
qaAnswers,
|
qaAnswers,
|
||||||
articlelist
|
articlelist,
|
||||||
|
courselist
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -399,6 +399,7 @@
|
|||||||
import apiQa from '@/api/modules/qa.js';
|
import apiQa from '@/api/modules/qa.js';
|
||||||
import apiUser from '@/api/system/user.js';
|
import apiUser from '@/api/system/user.js';
|
||||||
import apiCoursePortal from '@/api/modules/coursePortal.js';
|
import apiCoursePortal from '@/api/modules/coursePortal.js';
|
||||||
|
import apiIndex from '@/api/phase2/index.js'
|
||||||
import interactBar from '@/components/Portal/interactBar.vue';
|
import interactBar from '@/components/Portal/interactBar.vue';
|
||||||
import ad from '@/components/Portal/adFloat.vue';
|
import ad from '@/components/Portal/adFloat.vue';
|
||||||
import interactRowBar from '@/components/Portal/interactRowBar.vue';
|
import interactRowBar from '@/components/Portal/interactRowBar.vue';
|
||||||
@@ -634,7 +635,7 @@
|
|||||||
pageIndex: pageIndex
|
pageIndex: pageIndex
|
||||||
};
|
};
|
||||||
|
|
||||||
apiCoursePortal.pageList(course).then(res => {
|
apiIndex.courselist(course).then(res => {
|
||||||
if (res.status == 200 && res.result.list.length > 0) {
|
if (res.status == 200 && res.result.list.length > 0) {
|
||||||
let courseIds = [];
|
let courseIds = [];
|
||||||
res.result.list.forEach(item => {
|
res.result.list.forEach(item => {
|
||||||
|
|||||||
Reference in New Issue
Block a user