From ad5c27abc3078491f2c9c28d33849d5ab7f9909f Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Thu, 2 Apr 2026 15:56:37 +0900 Subject: [PATCH] =?UTF-8?q?feat(series-banner):=20=EB=B0=B0=EB=84=88=20?= =?UTF-8?q?=EB=93=B1=EB=A1=9D=20=EC=96=B8=EC=96=B4=20=EC=84=A0=ED=83=9D=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 배너 등록/수정 다이얼로그에 언어 선택(ko/ja/en) UI를 추가 --- src/api/audio_content_series.js | 2 +- src/views/Series/ContentSeriesBanner.vue | 41 ++++++++++++++++++++---- 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/src/api/audio_content_series.js b/src/api/audio_content_series.js index 5e11544..2d5ff84 100644 --- a/src/api/audio_content_series.js +++ b/src/api/audio_content_series.js @@ -43,7 +43,7 @@ async function getSeriesBannerList(page = 1, size = 20) { async function createSeriesBanner(bannerData) { const formData = new FormData(); if (bannerData.image) formData.append("image", bannerData.image); - const requestData = { seriesId: bannerData.seriesId }; + const requestData = { seriesId: bannerData.seriesId, lang: bannerData.lang }; formData.append("request", JSON.stringify(requestData)); return Vue.axios.post("/admin/audio-content/series/banner/register", formData, { headers: { "Content-Type": "multipart/form-data" } diff --git a/src/views/Series/ContentSeriesBanner.vue b/src/views/Series/ContentSeriesBanner.vue index f52d3a3..a30a583 100644 --- a/src/views/Series/ContentSeriesBanner.vue +++ b/src/views/Series/ContentSeriesBanner.vue @@ -66,6 +66,14 @@ />
{{ resolveSeriesTitle(banner) }}
+ + {{ banner.lang === 'ko' ? '한국어' : banner.lang === 'ja' ? '일본어' : '영어' }} +
@@ -146,6 +154,17 @@ /> + + + + + !!v || this.isEdit || '이미지를 선택하세요' @@ -306,7 +331,7 @@ export default { }, computed: { isFormValid() { - return (this.bannerForm.image || (this.isEdit && this.bannerForm.imageUrl)) && this.selectedSeries + return (this.bannerForm.image || (this.isEdit && this.bannerForm.imageUrl)) && this.selectedSeries && (this.isEdit || this.bannerForm.lang) } }, watch: { @@ -368,7 +393,7 @@ export default { showAddDialog() { this.isEdit = false this.selectedSeries = null - this.bannerForm = { image: null, imageUrl: '', seriesId: null, bannerId: null } + this.bannerForm = { image: null, imageUrl: '', seriesId: null, bannerId: null, lang: 'ko' } this.previewImage = null this.searchKeyword = '' this.searchResults = [] @@ -387,7 +412,8 @@ export default { image: null, imageUrl: banner.imageUrl || banner.imagePath, seriesId: banner.seriesId, - bannerId: banner.id + bannerId: banner.id, + lang: banner.lang || 'ko' } this.previewImage = null this.searchKeyword = '' @@ -398,7 +424,7 @@ export default { closeDialog() { this.showDialog = false this.selectedSeries = null - this.bannerForm = { image: null, imageUrl: '', seriesId: null, bannerId: null } + this.bannerForm = { image: null, imageUrl: '', seriesId: null, bannerId: null, lang: 'ko' } this.previewImage = null this.searchKeyword = '' this.searchResults = [] @@ -450,13 +476,16 @@ export default { }) if (response && response.status === 200 && response.data && response.data.success === true) { this.notifySuccess('배너가 수정되었습니다.') + this.closeDialog() + this.refreshBanners() } else { this.notifyError('배너 수정을 실패했습니다.') } } else { const response = await createSeriesBanner({ image: this.bannerForm.image, - seriesId: this.selectedSeries.id + seriesId: this.selectedSeries.id, + lang: this.bannerForm.lang }) if (response && response.status === 200 && response.data && response.data.success === true) { this.notifySuccess('배너가 추가되었습니다.')