feat(content-banner): 배너 등록 시 언어 선택(ko/ja/en) 추가 및 등록 요청에 lang 포함
- 등록 폼에 언어 v-select 추가(v-if="!is_modify") - 데이터 모델에 banner.lang 기본값 'ko'와 langItems(ko/ja/en) 추가 - submit 요청에 ISO 639 코드(lang) 포함 - 취소 시 초기화에 언어 기본값 유지
This commit is contained in:
@@ -109,6 +109,23 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
|
<!-- 언어 선택: 등록 시에만 노출 (수정 시 비노출) -->
|
||||||
|
<v-card-text v-if="!is_modify">
|
||||||
|
<v-row align="center">
|
||||||
|
<v-col cols="4">
|
||||||
|
언어
|
||||||
|
</v-col>
|
||||||
|
<v-col cols="8">
|
||||||
|
<v-select
|
||||||
|
v-model="banner.lang"
|
||||||
|
:items="langItems"
|
||||||
|
item-text="text"
|
||||||
|
item-value="value"
|
||||||
|
label="언어 선택"
|
||||||
|
/>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-card-text>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<v-row align="center">
|
<v-row align="center">
|
||||||
<v-col cols="4">
|
<v-col cols="4">
|
||||||
@@ -327,7 +344,7 @@ export default {
|
|||||||
show_write_dialog: false,
|
show_write_dialog: false,
|
||||||
show_delete_confirm_dialog: false,
|
show_delete_confirm_dialog: false,
|
||||||
selected_banner: {},
|
selected_banner: {},
|
||||||
banner: {type: 'CREATOR', tab_id: 1},
|
banner: {type: 'CREATOR', tab_id: 1, lang: 'ko'},
|
||||||
banners: [],
|
banners: [],
|
||||||
events: [],
|
events: [],
|
||||||
creators: [],
|
creators: [],
|
||||||
@@ -335,7 +352,12 @@ export default {
|
|||||||
search_query_creator: '',
|
search_query_creator: '',
|
||||||
search_query_series: '',
|
search_query_series: '',
|
||||||
tabs: [],
|
tabs: [],
|
||||||
selected_tab_id: 1
|
selected_tab_id: 1,
|
||||||
|
langItems: [
|
||||||
|
{ text: '한국어', value: 'ko' },
|
||||||
|
{ text: '일본어', value: 'ja' },
|
||||||
|
{ text: '영어', value: 'en' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -379,7 +401,7 @@ export default {
|
|||||||
this.is_selecting = false
|
this.is_selecting = false
|
||||||
this.show_write_dialog = false
|
this.show_write_dialog = false
|
||||||
this.show_delete_confirm_dialog = false
|
this.show_delete_confirm_dialog = false
|
||||||
this.banner = {type: 'CREATOR', tab_id: 1}
|
this.banner = {type: 'CREATOR', tab_id: 1, lang: 'ko'}
|
||||||
this.selected_banner = {}
|
this.selected_banner = {}
|
||||||
this.search_query_creator = ''
|
this.search_query_creator = ''
|
||||||
this.search_query_series = ''
|
this.search_query_series = ''
|
||||||
@@ -432,6 +454,10 @@ export default {
|
|||||||
this.banner.link = banner.link
|
this.banner.link = banner.link
|
||||||
this.banner.is_adult = banner.isAdult
|
this.banner.is_adult = banner.isAdult
|
||||||
this.banner.tab_id = banner.tabId
|
this.banner.tab_id = banner.tabId
|
||||||
|
// 수정 시 언어는 변경 불가하므로 UI를 표시하지 않음. 필요 시 내부 유지만 함 (기본값 또는 서버 값 사용)
|
||||||
|
if (banner.lang) {
|
||||||
|
this.banner.lang = banner.lang
|
||||||
|
}
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.is_selecting = false; // 선택 상태 해제
|
this.is_selecting = false; // 선택 상태 해제
|
||||||
@@ -497,7 +523,8 @@ export default {
|
|||||||
|
|
||||||
let request = {
|
let request = {
|
||||||
type: this.banner.type,
|
type: this.banner.type,
|
||||||
isAdult: this.banner.is_adult
|
isAdult: this.banner.is_adult,
|
||||||
|
lang: this.banner.lang || 'ko'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.banner.type === 'CREATOR') {
|
if (this.banner.type === 'CREATOR') {
|
||||||
|
|||||||
Reference in New Issue
Block a user