diff --git a/src/api/content/banner.js b/src/api/content/banner.js new file mode 100644 index 0000000..8b406ee --- /dev/null +++ b/src/api/content/banner.js @@ -0,0 +1,55 @@ +import { axios } from '@/utils/request' + +// api接口列表 +const api = { + list: '/content.banner/list', + detail: '/content.banner/detail', + add: '/content.banner/add', + edit: '/content.banner/edit', + delete: '/content.banner/delete' +} + +// 列表记录 +export function list (params) { + return axios({ + url: api.list, + method: 'get', + params + }) +} + +/** + * 新增记录 + * @param {*} data + */ +export function add (data) { + return axios({ + url: api.add, + method: 'post', + data + }) +} + +/** + * 编辑记录 + * @param {*} data + */ +export function edit (data) { + return axios({ + url: api.edit, + method: 'post', + data + }) +} + +/** + * 删除记录 + * @param {*} data + */ +export function deleted (data) { + return axios({ + url: api.delete, + method: 'post', + data: data + }) +} diff --git a/src/config/router.config.js b/src/config/router.config.js index eb633cd..e9cf0a1 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -495,7 +495,11 @@ export const asyncRouterMap = [ path: '/content/richText/index', component: () => import(/* webpackChunkName: "content" */ '@/views/content/richText/Index'), meta: { title: '富文本管理', keepAlive: false, permission: ['/content/richText/index'] }, - moduleKey: 'content-help', + }, + { + path: '/content/banner/index', + component: () => import(/* webpackChunkName: "content" */ '@/views/content/banner/Index'), + meta: { title: '轮播图管理', keepAlive: false, permission: ['/content/banner/index'] }, }, ], }, diff --git a/src/views/content/banner/Index.vue b/src/views/content/banner/Index.vue new file mode 100644 index 0000000..8717f4c --- /dev/null +++ b/src/views/content/banner/Index.vue @@ -0,0 +1,156 @@ + + + diff --git a/src/views/content/banner/modules/AddForm.vue b/src/views/content/banner/modules/AddForm.vue new file mode 100644 index 0000000..dc10bff --- /dev/null +++ b/src/views/content/banner/modules/AddForm.vue @@ -0,0 +1,108 @@ + + + diff --git a/src/views/content/banner/modules/EditForm.vue b/src/views/content/banner/modules/EditForm.vue new file mode 100644 index 0000000..6479248 --- /dev/null +++ b/src/views/content/banner/modules/EditForm.vue @@ -0,0 +1,123 @@ + + + diff --git a/src/views/content/banner/modules/index.js b/src/views/content/banner/modules/index.js new file mode 100644 index 0000000..308f27b --- /dev/null +++ b/src/views/content/banner/modules/index.js @@ -0,0 +1,4 @@ +import AddForm from './AddForm' +import EditForm from './EditForm' + +export { AddForm, EditForm } \ No newline at end of file diff --git a/src/views/content/help/modules/AddForm.vue b/src/views/content/help/modules/AddForm.vue index 149553c..2ad1247 100644 --- a/src/views/content/help/modules/AddForm.vue +++ b/src/views/content/help/modules/AddForm.vue @@ -42,7 +42,7 @@ export default { data () { return { // 对话框标题 - title: '编辑帮助', + title: '新增帮助', // 标签布局属性 labelCol: { span: 7 }, // 输入框布局属性