콘텐츠 수정 #21
|
@ -59,6 +59,10 @@ async function updateCurationOrders(ids) {
|
||||||
return Vue.axios.put('/admin/audio-content/curation/orders', {ids: ids})
|
return Vue.axios.put('/admin/audio-content/curation/orders', {ids: ids})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function getAudioContentThemeList() {
|
||||||
|
return Vue.axios.get("/admin/audio-content/theme")
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
getAudioContentList,
|
getAudioContentList,
|
||||||
searchAudioContent,
|
searchAudioContent,
|
||||||
|
@ -70,5 +74,6 @@ export {
|
||||||
getCurations,
|
getCurations,
|
||||||
saveCuration,
|
saveCuration,
|
||||||
modifyCuration,
|
modifyCuration,
|
||||||
updateCurationOrders
|
updateCurationOrders,
|
||||||
|
getAudioContentThemeList
|
||||||
}
|
}
|
||||||
|
|
|
@ -295,6 +295,22 @@
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
|
<v-card-text>
|
||||||
|
<v-row>
|
||||||
|
<v-col cols="4">
|
||||||
|
테마
|
||||||
|
</v-col>
|
||||||
|
<v-col cols="8">
|
||||||
|
<v-select
|
||||||
|
v-model="audio_content.theme_id"
|
||||||
|
:items="themeList"
|
||||||
|
item-text="title"
|
||||||
|
item-value="value"
|
||||||
|
label="테마 선택"
|
||||||
|
/>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-card-text>
|
||||||
<v-card-actions v-show="!is_loading">
|
<v-card-actions v-show="!is_loading">
|
||||||
<v-spacer />
|
<v-spacer />
|
||||||
<v-btn
|
<v-btn
|
||||||
|
@ -370,6 +386,7 @@ export default {
|
||||||
audio_content: {},
|
audio_content: {},
|
||||||
audio_contents: [],
|
audio_contents: [],
|
||||||
curations: [],
|
curations: [],
|
||||||
|
themeList: [],
|
||||||
selected_audio_content: {},
|
selected_audio_content: {},
|
||||||
utm_source: '',
|
utm_source: '',
|
||||||
utm_medium: '',
|
utm_medium: '',
|
||||||
|
@ -378,6 +395,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
async created() {
|
async created() {
|
||||||
|
await this.getAudioContentThemeList();
|
||||||
await this.getCurations()
|
await this.getCurations()
|
||||||
await this.getAudioContent()
|
await this.getAudioContent()
|
||||||
},
|
},
|
||||||
|
@ -408,12 +426,10 @@ export default {
|
||||||
this.audio_content.title = item.title
|
this.audio_content.title = item.title
|
||||||
this.audio_content.detail = item.detail
|
this.audio_content.detail = item.detail
|
||||||
this.audio_content.curation_id = item.curationId
|
this.audio_content.curation_id = item.curationId
|
||||||
|
this.audio_content.theme_id = item.themeId
|
||||||
this.audio_content.is_adult = item.isAdult
|
this.audio_content.is_adult = item.isAdult
|
||||||
this.audio_content.is_comment_available = item.isCommentAvailable
|
this.audio_content.is_comment_available = item.isCommentAvailable
|
||||||
this.audio_content.is_default_cover_image = false
|
this.audio_content.is_default_cover_image = false
|
||||||
|
|
||||||
console.log(this.audio_content)
|
|
||||||
|
|
||||||
this.show_modify_dialog = true
|
this.show_modify_dialog = true
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -471,6 +487,10 @@ export default {
|
||||||
request.curationId = this.audio_content.curation_id
|
request.curationId = this.audio_content.curation_id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.selected_audio_content.themeId !== this.audio_content.theme_id) {
|
||||||
|
request.themeId = this.audio_content.theme_id
|
||||||
|
}
|
||||||
|
|
||||||
if (this.selected_audio_content.isAdult !== this.audio_content.is_adult) {
|
if (this.selected_audio_content.isAdult !== this.audio_content.is_adult) {
|
||||||
request.isAdult = this.audio_content.is_adult
|
request.isAdult = this.audio_content.is_adult
|
||||||
}
|
}
|
||||||
|
@ -479,7 +499,6 @@ export default {
|
||||||
request.isCommentAvailable = this.audio_content.is_comment_available
|
request.isCommentAvailable = this.audio_content.is_comment_available
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(request)
|
|
||||||
const res = await api.modifyAudioContent(request)
|
const res = await api.modifyAudioContent(request)
|
||||||
if (res.status === 200 && res.data.success === true) {
|
if (res.status === 200 && res.data.success === true) {
|
||||||
this.cancel()
|
this.cancel()
|
||||||
|
@ -530,6 +549,25 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async getAudioContentThemeList() {
|
||||||
|
this.is_loading = true
|
||||||
|
try {
|
||||||
|
const res = await api.getAudioContentThemeList()
|
||||||
|
if (res.status === 200 && res.data.success === true) {
|
||||||
|
this.themeList = res.data.data.map((item) => {
|
||||||
|
return {title: item.theme, value: item.id}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||||
|
}
|
||||||
|
|
||||||
|
this.is_loading = false
|
||||||
|
} catch (e) {
|
||||||
|
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||||
|
this.is_loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
async getCurations() {
|
async getCurations() {
|
||||||
this.is_loading = true
|
this.is_loading = true
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue