From 8e9a09651507d7863d3fc61970f1455adc6d8f60 Mon Sep 17 00:00:00 2001 From: fanfan Date: Tue, 2 Jul 2024 23:58:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=AE=B6=E6=95=99=E5=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/course/index.js | 62 +++++++ src/common/model/goods/Index.js | 2 +- src/config/router.config.js | 5 + src/views/dataCenter/course/index.vue | 131 ++++++++++++++ .../dataCenter/course/modules/AddForm.vue | 132 ++++++++++++++ .../dataCenter/course/modules/EditForm.vue | 164 ++++++++++++++++++ src/views/dataCenter/goods/Create.vue | 6 + src/views/dataCenter/goods/modules/Update.vue | 6 + 8 files changed, 507 insertions(+), 1 deletion(-) create mode 100644 src/api/course/index.js create mode 100644 src/views/dataCenter/course/index.vue create mode 100644 src/views/dataCenter/course/modules/AddForm.vue create mode 100644 src/views/dataCenter/course/modules/EditForm.vue diff --git a/src/api/course/index.js b/src/api/course/index.js new file mode 100644 index 0000000..92aea48 --- /dev/null +++ b/src/api/course/index.js @@ -0,0 +1,62 @@ +import { axios } from '@/utils/request' + +// api接口列表 +const api = { + list: '/course/getCourseList', + add: '/course/add', + edit: '/course/edit', + delete: '/course/delete', + getCourselist:'/course/getCourseType', +} + +// 列表记录 +export function getCourselist (params) { + return axios({ + url: api.getCourselist, + method: 'get', + params + }) +} +// 列表记录 +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/common/model/goods/Index.js b/src/common/model/goods/Index.js index 42ea8c1..7b73ee5 100644 --- a/src/common/model/goods/Index.js +++ b/src/common/model/goods/Index.js @@ -96,7 +96,7 @@ export default { 'selling_point', 'serviceIds', 'sales_initial', 'is_points_gift', 'is_points_discount', 'is_enable_grade', 'is_alone_grade', 'is_ind_dealer', 'dealer_money_type', 'first_money', 'second_money', 'third_money','specific_value', - 'cmmdty_model','is_check','is_pool','is_sale','delivery_time','goods_source','is_jingpin' + 'cmmdty_model','is_check','is_pool','is_sale','delivery_time','goods_source','is_jingpin','is_use_jd_stock' ]) return { ...goodsFormData, diff --git a/src/config/router.config.js b/src/config/router.config.js index 4befcdc..1161e2d 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -135,6 +135,11 @@ export const asyncRouterMap = [ meta: { title: '商品导入', pageTitle: '商品批量导入', keepAlive: false }, hidden: true }, + { + path: '/course/index', + component: () => import(/* webpackChunkName: "goods" */ '@/views/dataCenter/course/index'), + meta: { title: '商家教学', pageTitle: '商家教学', keepAlive: false }, + }, { path: '/feedback/index', component: () => import(/* webpackChunkName: "goods" */ '@/views/dataCenter/feedback/index'), diff --git a/src/views/dataCenter/course/index.vue b/src/views/dataCenter/course/index.vue new file mode 100644 index 0000000..f13517d --- /dev/null +++ b/src/views/dataCenter/course/index.vue @@ -0,0 +1,131 @@ + + + diff --git a/src/views/dataCenter/course/modules/AddForm.vue b/src/views/dataCenter/course/modules/AddForm.vue new file mode 100644 index 0000000..0648951 --- /dev/null +++ b/src/views/dataCenter/course/modules/AddForm.vue @@ -0,0 +1,132 @@ + + + diff --git a/src/views/dataCenter/course/modules/EditForm.vue b/src/views/dataCenter/course/modules/EditForm.vue new file mode 100644 index 0000000..e0d80a2 --- /dev/null +++ b/src/views/dataCenter/course/modules/EditForm.vue @@ -0,0 +1,164 @@ + + + diff --git a/src/views/dataCenter/goods/Create.vue b/src/views/dataCenter/goods/Create.vue index 4a6c9b7..cf8990f 100644 --- a/src/views/dataCenter/goods/Create.vue +++ b/src/views/dataCenter/goods/Create.vue @@ -165,6 +165,12 @@ + + + + + + diff --git a/src/views/dataCenter/goods/modules/Update.vue b/src/views/dataCenter/goods/modules/Update.vue index 1456dd8..39977cd 100644 --- a/src/views/dataCenter/goods/modules/Update.vue +++ b/src/views/dataCenter/goods/modules/Update.vue @@ -92,6 +92,12 @@ + + + + + +