diff --git a/src/api/Banner.js b/src/api/Banner.js new file mode 100644 index 0000000..a197080 --- /dev/null +++ b/src/api/Banner.js @@ -0,0 +1,96 @@ +import axiosApi from './AxiosApi.js' + +const apiList = { + page: { + method: 'POST', + url: `/banner/page`, + }, + query: { + method: 'POST', + url: `/banner/query`, + }, + update: { + method: 'PUT', + url: `/banner` + }, + save: { + method: 'POST', + url: `/banner` + }, + delete: { + method: 'DELETE', + url: `/banner` + }, + export: { + method: 'POST', + url: `/banner/export` + }, + preview: { + method: 'POST', + url: `/banner/preview` + }, + import: { + method: 'POST', + url: `/banner/import` + } +} + +export default { + page (data, custom = {}) { + return axiosApi({ + ...apiList.page, + data, + custom + }) + }, + query (data, custom = {}) { + return axiosApi({ + ...apiList.query, + data, + custom + }) + }, + save (data, custom = {}) { + return axiosApi({ + ...apiList.save, + data, + custom + }) + }, + update (data, custom = {}) { + return axiosApi({ + ...apiList.update, + data, + custom + }) + }, + delete (data, custom = {}) { + return axiosApi({ + ...apiList.delete, + data, + custom + }) + }, + export (data, custom = {}) { + return axiosApi({ + ...apiList.export, + responseType: "blob", + data, + custom + }) + }, + preview (data, custom = {}) { + return axiosApi({ + ...apiList.preview, + data, + custom + }) + }, + import (data, custom = {}) { + return axiosApi({ + ...apiList.import, + data, + custom + }) + } +} diff --git a/src/api/creditGoods/CreditGoods.js b/src/api/creditGoods/CreditGoods.js index 0844d9b..1502f25 100644 --- a/src/api/creditGoods/CreditGoods.js +++ b/src/api/creditGoods/CreditGoods.js @@ -3,7 +3,8 @@ import axiosApi from '../AxiosApi.js' const apiList = { page: { method: 'POST', - url: `/creditGoods/page`, + url: `/creditGoods/list`, + // url: `/creditGoods/page`, }, query: { method: 'POST', diff --git a/src/api/creditGoods/CreditOrder.js b/src/api/creditGoods/CreditOrder.js index f28fbb4..fdbdb77 100644 --- a/src/api/creditGoods/CreditOrder.js +++ b/src/api/creditGoods/CreditOrder.js @@ -3,7 +3,8 @@ import axiosApi from '../AxiosApi.js' const apiList = { page: { method: 'POST', - url: `/creditOrder/page`, + url: `/creditOrder/list`, + // url: `/creditOrder/page`, }, query: { method: 'POST', diff --git a/src/lang/en.js b/src/lang/en.js index 5c70907..db2cd57 100644 --- a/src/lang/en.js +++ b/src/lang/en.js @@ -32,6 +32,13 @@ export default { github: 'Github Repository' }, table: { + banner: { + id: 'ID', + imgUrl: 'imgUrl', + type: 'type', + content: 'content', + isDelete: 'isDelete', + }, information: { id: 'ID', storeId: 'storeId', diff --git a/src/lang/zh.js b/src/lang/zh.js index 8fd2ee3..e00e09e 100644 --- a/src/lang/zh.js +++ b/src/lang/zh.js @@ -32,6 +32,13 @@ export default { github: '项目地址' }, table: { + banner: { + id: 'ID', + imgUrl: '图片路径', + type: 'dict type value', + content: '用于做跳转', + isDelete: '逻辑删除:1-删除 0-未删除', + }, information: { id: 'ID', storeId: '店铺ID', diff --git a/src/router/index.js b/src/router/index.js index 73b9086..097da0e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -525,6 +525,32 @@ const constRouter = [ "hidden": false, "alwaysShow": true }, + { + "sortValue": 4, + children: [{ + "sortValue": 0, + path: "/set/banner", + name: "轮播", + component: resolve => require(['@/views/banner/index'], resolve), + meta: { + "title": "轮播", + "icon": "", + "breadcrumb": true + }, + "hidden": false, + "alwaysShow": false + }], + path: "/set", + name: "配置管理", + component: Layout, + meta: { + "title": "配置管理", + "icon": "el-icon-s-tools", + "breadcrumb": true + }, + "hidden": false, + "alwaysShow": true + }, { "sortValue": 10, children: [{ diff --git a/src/store/modules/account.js b/src/store/modules/account.js index 380c721..e352d98 100644 --- a/src/store/modules/account.js +++ b/src/store/modules/account.js @@ -378,34 +378,7 @@ export default { }, "hidden": false, "alwaysShow": false - }, - // { - // "sortValue": 1, - // "path": "/sms/manage/edit", - // "name": "短信模板", - // "component": "ceres/sms/manage/Edit", - // "meta": { - // "title": "短信模板", - // "icon": "", - // "breadcrumb": true - // }, - // "hidden": false, - // "alwaysShow": false - // }, - // { - // "sortValue": 2, - // "path": "/sms/manage/sendStatusIndex", - // "name": "短信", - // "component": "ceres/sms/manage/SendStatusIndex", - // "meta": { - // "title": "短信", - // "icon": "", - // "breadcrumb": true - // }, - // "hidden": false, - // "alwaysShow": false - // } - ], + }], "path": "/sms", "name": "短信管理", "component": "Layout", @@ -417,6 +390,32 @@ export default { "hidden": false, "alwaysShow": true }, + { + "sortValue": 4, + "children": [{ + "sortValue": 0, + "path": "/set/banner", + "name": "轮播", + "component": "banner/index", + "meta": { + "title": "轮播", + "icon": "", + "breadcrumb": true + }, + "hidden": false, + "alwaysShow": false + }], + "path": "/set", + "name": "配置管理", + "component": "Layout", + "meta": { + "title": "配置管理", + "icon": "el-icon-s-tools", + "breadcrumb": true + }, + "hidden": false, + "alwaysShow": true + }, { "sortValue": 10, "children": [{ diff --git a/src/views/banner/Edit.vue b/src/views/banner/Edit.vue new file mode 100644 index 0000000..10fad02 --- /dev/null +++ b/src/views/banner/Edit.vue @@ -0,0 +1,180 @@ + + + diff --git a/src/views/banner/index.vue b/src/views/banner/index.vue new file mode 100644 index 0000000..bb9c080 --- /dev/null +++ b/src/views/banner/index.vue @@ -0,0 +1,335 @@ + + + +