From 22b185c31a59f36e282fe29f5c13c51fe08f0288 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Tue, 21 Jan 2025 18:36:05 +0900 Subject: [PATCH 01/14] =?UTF-8?q?=EC=BD=98=ED=85=90=EC=B8=A0=20=EB=B0=B0?= =?UTF-8?q?=EB=84=88=20=EB=93=B1=EB=A1=9D/=EC=88=98=EC=A0=95=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20-=20=ED=83=AD=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/audio_content.js | 11 ++++-- src/views/Content/ContentMainTopBanner.vue | 45 ++++++++++++++++++++-- 2 files changed, 49 insertions(+), 7 deletions(-) diff --git a/src/api/audio_content.js b/src/api/audio_content.js index ba651e3..c171395 100644 --- a/src/api/audio_content.js +++ b/src/api/audio_content.js @@ -19,8 +19,8 @@ async function modifyAudioContent(request) { return Vue.axios.put("/admin/audio-content", request) } -async function getBannerList() { - return Vue.axios.get("/admin/audio-content/banner") +async function getBannerList(tabId) { + return Vue.axios.get("/admin/audio-content/banner?tabId=" + tabId) } async function saveBanner(formData) { @@ -63,6 +63,10 @@ async function getAudioContentThemeList() { return Vue.axios.get("/admin/audio-content/theme") } +async function getAudioContentMainTabList() { + return Vue.axios.get("/admin/audio-content/main/tab") +} + export { getAudioContentList, searchAudioContent, @@ -75,5 +79,6 @@ export { saveCuration, modifyCuration, updateCurationOrders, - getAudioContentThemeList + getAudioContentThemeList, + getAudioContentMainTabList } diff --git a/src/views/Content/ContentMainTopBanner.vue b/src/views/Content/ContentMainTopBanner.vue index db85b17..305aab6 100644 --- a/src/views/Content/ContentMainTopBanner.vue +++ b/src/views/Content/ContentMainTopBanner.vue @@ -16,11 +16,25 @@ @@ -68,8 +419,16 @@ export default { is_series: false, is_adult: false, - show_write_dialog: false, + items: [], + + show_add_series_dialog: false, + show_add_content_dialog: false, show_delete_confirm_dialog: false, + + search_word: '', + selected_item: null, + add_item_list: [], + search_item_list: [], } }, @@ -79,6 +438,163 @@ export default { this.curation_description = this.$route.params.description this.is_series = this.$route.params.is_series this.is_adult = this.$route.params.is_adult + await this.getCurationItems() + }, + + methods: { + notifyError(message) { + this.$dialog.notify.error(message) + }, + + notifySuccess(message) { + this.$dialog.notify.success(message) + }, + + cancel() { + this.search_word = '' + this.add_item_list = [] + this.search_item_list = [] + this.selected_item = null + this.show_add_series_dialog = false + this.show_add_content_dialog = false + this.show_delete_confirm_dialog = false + }, + + deleteConfirm(item) { + this.selected_item = item + this.show_delete_confirm_dialog = true + }, + + showAddContent() { + this.show_add_content_dialog = true + }, + + showAddSeries() { + this.show_add_series_dialog = true + }, + + addItem(item) { + this.search_item_list = this.search_item_list.filter((t) => { + return t.id !== item.id + }); + this.add_item_list.push(item) + }, + + removeItem(item) { + this.add_item_list = this.add_item_list.filter((t) => { + return t.id !== item.id + }); + this.search_item_list.push(item) + }, + + async searchContentItem() { + if (this.search_word.length < 2) { + this.notifyError('검색어를 2글자 이상 입력하세요.') + return + } + + this.is_loading = true + + try { + const res = await api.searchContentItem(this.curation_id, this.search_word) + + if (res.data.success === true) { + this.search_item_list = res.data.data + if (res.data.data.length <= 0) { + this.notifyError('검색결과가 없습니다.') + } + } else { + this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + } + } catch (e) { + this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + } finally { + this.is_loading = false + } + }, + + async searchSeriesItem() { + if (this.search_word.length < 2) { + this.notifyError('검색어를 2글자 이상 입력하세요.') + return + } + + this.is_loading = true + + try { + const res = await api.searchSeriesItem(this.curation_id, this.search_word) + + if (res.data.success === true) { + this.search_item_list = res.data.data + if (res.data.data.length <= 0) { + this.notifyError('검색결과가 없습니다.') + } + } else { + this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + } + } catch (e) { + this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + } finally { + this.is_loading = false + } + }, + + async addItemInCuration() { + this.is_loading = true + const itemIdList = this.add_item_list.map((item) => { + return item.id + }) + + try { + const res = await api.addItemToCuration(this.curation_id, itemIdList) + + if (res.status === 200 && res.data.success === true) { + this.cancel() + await this.getCurationItems() + } else { + this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + } + } catch (e) { + this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + } finally { + this.is_loading = false + } + }, + + async removeItemInCuration() { + this.is_loading = true + + try { + const res = await api.removeItemInCuration(this.curation_id, this.selected_item.id) + if (res.status === 200 && res.data.success === true) { + this.cancel() + await this.getCurationItems() + } else { + this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + } + } catch (e) { + this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + } finally { + this.is_loading = false + } + }, + + async getCurationItems() { + this.is_loading = true + + try { + const res = await api.getCurationItems(this.curation_id) + if (res.status === 200 && res.data.success === true) { + this.items = res.data.data + } else { + this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + } + } catch (e) { + this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + } finally { + this.is_loading = false + } + }, }, } -- 2.40.1 From 697de48d9c66e850eb0d494f4f93cb159db8c5b0 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Tue, 4 Feb 2025 00:41:32 +0900 Subject: [PATCH 10/14] =?UTF-8?q?=EC=BD=98=ED=85=90=EC=B8=A0=20=ED=81=90?= =?UTF-8?q?=EB=A0=88=EC=9D=B4=EC=85=98=20=EC=88=98=EC=A0=95=20-=20?= =?UTF-8?q?=EB=A9=94=EC=9D=B8=20=ED=83=AD,=20=EC=8B=9C=EB=A6=AC=EC=A6=88?= =?UTF-8?q?=20=ED=81=90=EB=A0=88=EC=9D=B4=EC=85=98=20=EB=A9=94=EB=89=B4=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Content/ContentCuration.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/Content/ContentCuration.vue b/src/views/Content/ContentCuration.vue index f57eec5..f24f875 100644 --- a/src/views/Content/ContentCuration.vue +++ b/src/views/Content/ContentCuration.vue @@ -129,7 +129,7 @@ 콘텐츠 큐레이션 등록 - + 메인 탭 @@ -177,7 +177,7 @@ - + 시리즈 큐레이션 -- 2.40.1 From 73664768f92924b82ab75d97bf06c98109889651 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Wed, 5 Feb 2025 01:34:36 +0900 Subject: [PATCH 11/14] =?UTF-8?q?=EB=AC=B4=EB=A3=8C=20=EC=B6=94=EC=B2=9C?= =?UTF-8?q?=20=EC=8B=9C=EB=A6=AC=EC=A6=88=20=ED=8E=98=EC=9D=B4=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/audio_content_series_recommend.js | 32 ++ .../Series/ContentSeriesRecommendFree.vue | 476 +++++++++++++++++- 2 files changed, 506 insertions(+), 2 deletions(-) create mode 100644 src/api/audio_content_series_recommend.js diff --git a/src/api/audio_content_series_recommend.js b/src/api/audio_content_series_recommend.js new file mode 100644 index 0000000..57a933a --- /dev/null +++ b/src/api/audio_content_series_recommend.js @@ -0,0 +1,32 @@ +import Vue from 'vue'; + +async function getRecommendSeriesList(isFree) { + return Vue.axios.get("/admin/audio-content/series/recommend?isFree=" + isFree); +} + +async function saveRecommendSeries(formData) { + return Vue.axios.post('/admin/audio-content/series/recommend', formData, { + headers: { + "Content-Type": "multipart/form-data", + }, + }); +} + +async function modifyRecommendSeries(formData) { + return Vue.axios.put('/admin/audio-content/series/recommend', formData, { + headers: { + "Content-Type": "multipart/form-data", + }, + }); +} + +async function updateRecommendSeriesOrders(ids) { + return Vue.axios.put('/admin/audio-content/series/recommend/orders', {ids: ids}) +} + +export { + getRecommendSeriesList, + saveRecommendSeries, + modifyRecommendSeries, + updateRecommendSeriesOrders +} diff --git a/src/views/Series/ContentSeriesRecommendFree.vue b/src/views/Series/ContentSeriesRecommendFree.vue index 7d1eb25..ced5f92 100644 --- a/src/views/Series/ContentSeriesRecommendFree.vue +++ b/src/views/Series/ContentSeriesRecommendFree.vue @@ -1,9 +1,481 @@ - -- 2.40.1 From 3a6426e2e19a0d833ba61034bd5a8c5f350f4e5f Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Wed, 5 Feb 2025 02:01:56 +0900 Subject: [PATCH 12/14] =?UTF-8?q?=EC=83=88=EB=A1=9C=EC=9A=B4=20=EC=8B=9C?= =?UTF-8?q?=EB=A6=AC=EC=A6=88=20=ED=8E=98=EC=9D=B4=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Series/ContentSeriesNew.vue | 476 +++++++++++++++++++++++++- 1 file changed, 474 insertions(+), 2 deletions(-) diff --git a/src/views/Series/ContentSeriesNew.vue b/src/views/Series/ContentSeriesNew.vue index edb2bc3..5b87648 100644 --- a/src/views/Series/ContentSeriesNew.vue +++ b/src/views/Series/ContentSeriesNew.vue @@ -1,9 +1,481 @@ - -- 2.40.1 From efd50729f6b2ac802678ec34390e4633a20d7d32 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Wed, 5 Feb 2025 02:03:08 +0900 Subject: [PATCH 13/14] =?UTF-8?q?=EB=AC=B4=EB=A3=8C=20=EC=B6=94=EC=B2=9C?= =?UTF-8?q?=20=EC=8B=9C=EB=A6=AC=EC=A6=88=20=EC=88=98=EC=A0=95=20-=20?= =?UTF-8?q?=EC=8B=9C=EB=A6=AC=EC=A6=88=EB=A5=BC=20=EB=B3=80=EA=B2=BD?= =?UTF-8?q?=ED=95=98=EC=98=80=EC=A7=80=EB=A7=8C=20=EB=B0=98=EC=98=81?= =?UTF-8?q?=EB=90=98=EC=A7=80=20=EC=95=8A=EB=8D=98=20=EB=B2=84=EA=B7=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Series/ContentSeriesRecommendFree.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Series/ContentSeriesRecommendFree.vue b/src/views/Series/ContentSeriesRecommendFree.vue index ced5f92..9eaff4a 100644 --- a/src/views/Series/ContentSeriesRecommendFree.vue +++ b/src/views/Series/ContentSeriesRecommendFree.vue @@ -360,7 +360,7 @@ export default { } if ( - this.recommend_series.series_id !== this.recommend_series.series_id && + this.selected_recommend_series.series_id !== this.recommend_series.series_id && this.recommend_series.series_id !== null && this.recommend_series.series_id !== undefined ) { -- 2.40.1 From bcd0ea090c72d68be08397146125f0382eb6e166 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Wed, 5 Feb 2025 02:09:48 +0900 Subject: [PATCH 14/14] =?UTF-8?q?=EB=AC=B4=EB=A3=8C=20=EC=B6=94=EC=B2=9C?= =?UTF-8?q?=20=EC=8B=9C=EB=A6=AC=EC=A6=88,=20=EC=83=88=EB=A1=9C=EC=9A=B4?= =?UTF-8?q?=20=EC=8B=9C=EB=A6=AC=EC=A6=88=20-=20=EC=88=9C=EC=84=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=20=EC=8B=9C=20=EC=95=88=EB=82=B4=EB=A9=94?= =?UTF-8?q?=EC=8B=9C=EC=A7=80('=EC=88=98=EC=A0=95=EB=90=98=EC=97=88?= =?UTF-8?q?=EC=8A=B5=EB=8B=88=EB=8B=A4.')=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Series/ContentSeriesNew.vue | 2 +- src/views/Series/ContentSeriesRecommendFree.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/Series/ContentSeriesNew.vue b/src/views/Series/ContentSeriesNew.vue index 5b87648..3a50177 100644 --- a/src/views/Series/ContentSeriesNew.vue +++ b/src/views/Series/ContentSeriesNew.vue @@ -418,7 +418,7 @@ export default { const res = await api.updateRecommendSeriesOrders(ids) if (res.status === 200 && res.data.success === true) { - this.notifySuccess(res.data.message) + this.notifySuccess(res.data.message || '수정되었습니다.') } }, diff --git a/src/views/Series/ContentSeriesRecommendFree.vue b/src/views/Series/ContentSeriesRecommendFree.vue index 9eaff4a..d6aad47 100644 --- a/src/views/Series/ContentSeriesRecommendFree.vue +++ b/src/views/Series/ContentSeriesRecommendFree.vue @@ -418,7 +418,7 @@ export default { const res = await api.updateRecommendSeriesOrders(ids) if (res.status === 200 && res.data.success === true) { - this.notifySuccess(res.data.message) + this.notifySuccess(res.data.message || '수정되었습니다.') } }, -- 2.40.1