feat(live-recommend): 추천 크리에이터 등록 시 언어 선택(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:
@@ -153,6 +153,22 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-card-text v-if="selected_recommend_live === null">
|
||||
<v-row align="center">
|
||||
<v-col cols="4">
|
||||
언어
|
||||
</v-col>
|
||||
<v-col cols="8">
|
||||
<v-select
|
||||
v-model="lang"
|
||||
:items="languageOptions"
|
||||
item-text="label"
|
||||
item-value="value"
|
||||
label="언어 선택"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-card-text>
|
||||
<v-row align="center">
|
||||
<v-col cols="4">
|
||||
@@ -234,6 +250,12 @@ export default {
|
||||
start_date: null,
|
||||
end_date: null,
|
||||
is_adult: false,
|
||||
lang: 'ko',
|
||||
languageOptions: [
|
||||
{ label: '한국어', value: 'ko' },
|
||||
{ label: '일본어', value: 'ja' },
|
||||
{ label: '영어', value: 'en' },
|
||||
],
|
||||
headers: [
|
||||
{
|
||||
text: '이미지',
|
||||
@@ -358,6 +380,7 @@ export default {
|
||||
formData.append("start_date", this.start_date)
|
||||
formData.append("end_date", this.end_date)
|
||||
formData.append("is_adult", this.is_adult)
|
||||
formData.append("lang", this.lang)
|
||||
|
||||
const res = await api.createRecommendCreatorBanner(formData);
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
@@ -383,7 +406,8 @@ export default {
|
||||
this.image === null ||
|
||||
this.creator_id === null ||
|
||||
this.start_date === null ||
|
||||
this.end_date === null
|
||||
this.end_date === null ||
|
||||
this.lang === null
|
||||
) {
|
||||
this.notifyError('내용을 입력하세요')
|
||||
} else {
|
||||
@@ -398,6 +422,9 @@ export default {
|
||||
this.creator_id = null
|
||||
this.start_date = null
|
||||
this.end_date = null
|
||||
this.is_adult = false
|
||||
this.lang = 'ko'
|
||||
this.selected_recommend_live = null
|
||||
},
|
||||
|
||||
notifyError(message) {
|
||||
@@ -471,6 +498,8 @@ export default {
|
||||
}
|
||||
},
|
||||
showWriteDialog() {
|
||||
this.selected_recommend_live = null
|
||||
this.lang = 'ko'
|
||||
this.show_write_dialog = true
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user