diff --git a/src/api/category.js b/src/api/category.js new file mode 100644 index 0000000..4dea43e --- /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(categoryId, title = null, addContentIdList = [], removeContentIdList = []) { + return Vue.axios.put('/category', { + categoryId: categoryId, + title: title, + addContentIdList: addContentIdList, + removeContentIdList: 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/api/content_category.js b/src/api/content_category.js new file mode 100644 index 0000000..bca957f --- /dev/null +++ b/src/api/content_category.js @@ -0,0 +1,18 @@ +import Vue from "vue"; + +async function getContentInCategory(categoryId, page) { + return Vue.axios.get( + "/creator-admin/content-category?category_id=" + categoryId + + "&page=" + (page - 1) + + "&size=10" + ) +} + +async function searchContentNotInCategory(categoryId, searchWord) { + return Vue.axios.get( + "/creator-admin/content-category/search?category_id=" + categoryId + + "&search_word=" + searchWord + ) +} + +export {getContentInCategory, searchContentNotInCategory} 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..12f54dc --- /dev/null +++ b/src/views/Content/ContentCategoryList.vue @@ -0,0 +1,677 @@ + + + + + + + 카테고리 추가 + + + + + + + {{ category.category }} + + + mdi-pencil + + + + + + + + + + + + 콘텐츠 추가 + + + + + + 선택된 카테고리 : {{ selected_category.category }} + + + 카테고리를 선택해 주세요 + + + + + + + 썸네일 + + + 제목 + + + 19금 + + + 관리 + + + + + + + + + + {{ content.title }} + + + + O + + + X + + + + + 삭제 + + + + + + + + + + + + + + + + + + + + + + 카테고리 수정 + + + 카테고리 추가 + + + + + + + + 취소 + + + 삭제 + + + 수정 + + + 등록 + + + + + + + + + + + + + 콘텐츠 추가 - + + 선택된 카테고리 : {{ selected_category.category }} + + + + + + 검색 + + + + + + + 검색결과 + + + + + + 제목 + + + + + + + {{ content.title }} + + + 추가 + + + + + + + + + 추가할 콘텐츠 + + + + + + 제목 + + + + + + + {{ content.title }} + + + 제거 + + + + + + + + + + + + + 취소 + + + 추가 + + + + + + + + + + + +
+ 선택된 카테고리 : {{ selected_category.category }} +
+ 카테고리를 선택해 주세요 +