diff --git a/src/api/category.js b/src/api/category.js new file mode 100644 index 0000000..ea46bc9 --- /dev/null +++ b/src/api/category.js @@ -0,0 +1,28 @@ +import Vue from 'vue'; + +async function saveCategory(title) { + return Vue.axios.post('/category', {title: title, contentIdList: []}); +} + +async function modifyCategory(title, categoryId) { + return Vue.axios.put('/category', { + categoryId: categoryId, + title: title, + addContentIdList: [], + removeContentIdList: [] + }); +} + +async function deleteCategory(categoryId) { + return Vue.axios.delete('/category/' + categoryId) +} + +async function getCategoryList(creatorId) { + return Vue.axios.get('/category?creatorId=' + creatorId) +} + +async function updateCategoryOrders(ids) { + return Vue.axios.put('/category/orders', {ids: ids}) +} + +export {saveCategory, modifyCategory, deleteCategory, getCategoryList, updateCategoryOrders} diff --git a/src/router/index.js b/src/router/index.js index 139af9c..5ef7e7e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -20,6 +20,11 @@ const routes = [ name: 'ContentList', component: () => import(/* webpackChunkName: "content" */ '../views/Content/ContentList.vue') }, + { + path: '/content/category/list', + name: 'ContentCategoryList', + component: () => import(/* webpackChunkName: "content" */ '../views/Content/ContentCategoryList.vue') + }, { path: '/calculate/live', name: 'CalculateLive', diff --git a/src/views/Content/ContentCategoryList.vue b/src/views/Content/ContentCategoryList.vue new file mode 100644 index 0000000..828cc86 --- /dev/null +++ b/src/views/Content/ContentCategoryList.vue @@ -0,0 +1,390 @@ + + + + +