diff --git a/src/api/assets/category/index.ts b/src/api/assets/category/index.ts new file mode 100644 index 0000000..428a379 --- /dev/null +++ b/src/api/assets/category/index.ts @@ -0,0 +1,57 @@ +// import request from '/@/utils/request'; +import request, { newService } from '/@/utils/request'; + + +// 获取分类树 +export function getCategoryTree(query?: Object) { + return newService({ + url: '/assets/category/getCategoryTree', + method: 'get', + params: query, + }); +} + +// 获取分类详情 +export function getCategory(id: string) { + return newService({ + url: '/assets/category/getCategory', + method: 'get', + params: { id }, + }); +} + +// 新增分类 +export function addCategory(data: object) { + return newService({ + url: '/assets/category/addCategory', + method: 'post', + data: data, + }); +} + +// 修改分类 +export function updateCategory(data: object) { + return newService({ + url: '/assets/category/updateCategory', + method: 'put', + data: data, + }); +} + +// 删除分类 +export function deleteCategory(id: string) { + return newService({ + url: '/assets/category/deleteCategory', + method: 'delete', + params: { id }, + }); +} + +// 更新分类状态 +export function updateCategoryStatus(id: string, status: number) { + return newService({ + url: '/assets/category/updateCategoryStatus', + method: 'put', + data: { id, status }, + }); +} diff --git a/src/stores/bigUpload.ts b/src/stores/bigUpload.ts index 5418d6b..58b6ec6 100644 --- a/src/stores/bigUpload.ts +++ b/src/stores/bigUpload.ts @@ -11,3 +11,4 @@ export const bigUpload = defineStore('bigUpload', { } }, }) + \ No newline at end of file diff --git a/src/views/assets/category/component/editCategory.vue b/src/views/assets/category/component/editCategory.vue new file mode 100644 index 0000000..ada6773 --- /dev/null +++ b/src/views/assets/category/component/editCategory.vue @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + 取 消 + {{ isEdit ? '修 改' : '添 加' }} + + + + + + + + + + + diff --git a/src/views/assets/category/index.vue b/src/views/assets/category/index.vue new file mode 100644 index 0000000..f6134e9 --- /dev/null +++ b/src/views/assets/category/index.vue @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + 查询 + + + + 新增 + + + + + + + + + + 商品 + 服务 + + + + + + + + + + + + + 新增 + 修改 + 删除 + + + + + + + + + + + + + diff --git a/src/views/customerService/account/index.vue b/src/views/customerService/account/index.vue index a8d8fcf..e8f736f 100644 --- a/src/views/customerService/account/index.vue +++ b/src/views/customerService/account/index.vue @@ -27,7 +27,7 @@ 查询 - + diff --git a/src/views/customerService/script/index.vue b/src/views/customerService/script/index.vue index b9f7368..d4dc424 100644 --- a/src/views/customerService/script/index.vue +++ b/src/views/customerService/script/index.vue @@ -20,7 +20,7 @@ 重置 - + 新增话术