diff --git a/src/api/system/course.js b/src/api/system/course.js new file mode 100644 index 0000000..4657280 --- /dev/null +++ b/src/api/system/course.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询课程列表 +export function listCourse(query) { + return request({ + url: '/system/course/list', + method: 'get', + params: query + }) +} + +// 查询课程详细 +export function getCourse(id) { + return request({ + url: '/system/course/' + id, + method: 'get' + }) +} + +// 新增课程 +export function addCourse(data) { + return request({ + url: '/system/course', + method: 'post', + data: data + }) +} + +// 修改课程 +export function updateCourse(data) { + return request({ + url: '/system/course', + method: 'put', + data: data + }) +} + +// 删除课程 +export function delCourse(id) { + return request({ + url: '/system/course/' + id, + method: 'delete' + }) +} diff --git a/src/assets/styles/custom.scss b/src/assets/styles/custom.scss new file mode 100644 index 0000000..217be1b --- /dev/null +++ b/src/assets/styles/custom.scss @@ -0,0 +1,7 @@ +.line-limit-3 { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + overflow: hidden; + text-overflow: ellipsis; +} \ No newline at end of file diff --git a/src/main.js b/src/main.js index a7645fb..c9fc1b7 100644 --- a/src/main.js +++ b/src/main.js @@ -7,6 +7,7 @@ import 'element-plus/dist/index.css' import locale from 'element-plus/es/locale/lang/zh-cn' import '@/assets/styles/index.scss' // global css +import '@/assets/styles/custom.scss' import App from './App' import store from './store' diff --git a/src/views/system/course/index.vue b/src/views/system/course/index.vue new file mode 100644 index 0000000..43d8c18 --- /dev/null +++ b/src/views/system/course/index.vue @@ -0,0 +1,321 @@ + + + + + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + 新增 + + + 修改 + + + 删除 + + + 导出 + + + + + + + + + + + + + {{ row.about }} + + + + + + + {{ row.description }} + + + + + + + + + + 修改 + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +