diff --git a/src/api/course/course.js b/src/api/course/course.js index 161d7ed..1c6d574 100644 --- a/src/api/course/course.js +++ b/src/api/course/course.js @@ -1,12 +1,12 @@ import request from '@/utils/request' -const projectApi = { +const courseApi = { // add: 'sys/menu/add', -// get: 'sys/menu/get', + get: '/courseManagement/course/details', // update: 'sys/menu/update', // del: 'sys/menu/delete', // updateStatus: 'sys/menu/updateStatus', - list: 'course/pageList' + list: '/courseManagement/course/listPage' } // export function menuAdd (params) { @@ -37,6 +37,8 @@ const projectApi = { // data: params // }) // } + +// 查询课程列表 export function getCourseList (params) { return request({ url: courseApi.list, @@ -44,6 +46,18 @@ export function getCourseList (params) { params: params }) } + +// 查看课程详情 +export function getCourseDetails (params) { + return request({ + url:courseApi.get, + method:'get', + params:params + }) +} + + + // export function menuUpdateStatus (params) { // return request({ // url: menuApi.updateStatus, diff --git a/src/api/course/customCourse.js b/src/api/course/customCourse.js new file mode 100644 index 0000000..b2dc4e7 --- /dev/null +++ b/src/api/course/customCourse.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +const projectApi = { +// add: 'sys/menu/add', +// get: 'sys/menu/get', +// update: 'sys/menu/update', +// del: 'sys/menu/delete', +// updateStatus: 'sys/menu/updateStatus', + list: 'courseManagement/customCourse/listPage' +} + +// export function menuAdd (params) { +// return request({ +// url: menuApi.add, +// method: 'post', +// data: params +// }) +// } +// export function menuGet (params) { +// return request({ +// url: menuApi.get, +// method: 'post', +// data: params +// }) +// } +// export function menuUpdate (params) { +// return request({ +// url: menuApi.update, +// method: 'post', +// data: params +// }) +// } +// export function menuDelete (params) { +// return request({ +// url: menuApi.del, +// method: 'post', +// data: params +// }) +// } +export function getcustomCourseList (params) { + return request({ + url: customApi.list, + method: 'get', + params: params + }) +} +// export function menuUpdateStatus (params) { +// return request({ +// url: menuApi.updateStatus, +// method: 'post', +// data: params +// }) +// } diff --git a/src/config/router.config.js b/src/config/router.config.js index 43424b5..bc54d7f 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -100,28 +100,28 @@ export const asyncRouterMap = [ }, // 课程管理 { - path: '/course', - redirect: '/course/courseList', + path: '/courseManagement', + redirect: '/courseManagement/course/courseList', component: RouteView, meta: { title: '课程管理', icon: bxAnaalyse, permission: ['from'] }, children: [ { - path: '/course/courseList', + path: '/courseManagement/course/courseList', name: 'courseList', component: () => import('@/views/course/CourseList'), - meta: { title: '课程项目', keepAlive: true, permission: ['form'] } + meta: { title: '系统课程', keepAlive: true, permission: ['form'] } }, { - path: '/form/step-form', - name: 'StepForm', - component: () => import('@/views/form/stepForm/StepForm'), - meta: { title: '系统推荐', keepAlive: true, permission: ['form'] } + path: '/courseManagement/customCourseList', + name: 'customCourse', + component: () => import('@/views/course/customCourseList'), + meta: { title: '自制课程', keepAlive: true, permission: ['form'] } }, { path: '/form/advanced-form', name: 'AdvanceForm', component: () => import('@/views/form/advancedForm/AdvancedForm'), - meta: { title: '终端培训', keepAlive: true, permission: ['form'] } + meta: { title: '资源库', keepAlive: true, permission: ['form'] } } ] }, diff --git a/src/views/course/CourseList.vue b/src/views/course/CourseList.vue index 61b642b..ed1966b 100644 --- a/src/views/course/CourseList.vue +++ b/src/views/course/CourseList.vue @@ -3,72 +3,11 @@