Compare commits
No commits in common. "af45c0093e90eafad3799e1984d7a042835d4fc0" and "152fe817e86d8734e0f0c2ed763cc5b86b83dfe1" have entirely different histories.
af45c0093e
...
152fe817e8
|
@ -19,8 +19,8 @@ async function modifyAudioContent(request) {
|
||||||
return Vue.axios.put("/admin/audio-content", request)
|
return Vue.axios.put("/admin/audio-content", request)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getBannerList(tabId) {
|
async function getBannerList() {
|
||||||
return Vue.axios.get("/admin/audio-content/banner?tabId=" + tabId)
|
return Vue.axios.get("/admin/audio-content/banner")
|
||||||
}
|
}
|
||||||
|
|
||||||
async function saveBanner(formData) {
|
async function saveBanner(formData) {
|
||||||
|
@ -63,10 +63,6 @@ async function getAudioContentThemeList() {
|
||||||
return Vue.axios.get("/admin/audio-content/theme")
|
return Vue.axios.get("/admin/audio-content/theme")
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getAudioContentMainTabList() {
|
|
||||||
return Vue.axios.get("/admin/audio-content/main/tab")
|
|
||||||
}
|
|
||||||
|
|
||||||
export {
|
export {
|
||||||
getAudioContentList,
|
getAudioContentList,
|
||||||
searchAudioContent,
|
searchAudioContent,
|
||||||
|
@ -79,6 +75,5 @@ export {
|
||||||
saveCuration,
|
saveCuration,
|
||||||
modifyCuration,
|
modifyCuration,
|
||||||
updateCurationOrders,
|
updateCurationOrders,
|
||||||
getAudioContentThemeList,
|
getAudioContentThemeList
|
||||||
getAudioContentMainTabList
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,25 +16,11 @@
|
||||||
<template v-slot:activator="{ on, attrs }">
|
<template v-slot:activator="{ on, attrs }">
|
||||||
<v-container>
|
<v-container>
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col cols="9">
|
<v-col cols="10" />
|
||||||
<v-radio-group
|
|
||||||
v-model="selected_tab_id"
|
|
||||||
row
|
|
||||||
@change="getBanners"
|
|
||||||
>
|
|
||||||
<v-radio
|
|
||||||
v-for="tab in tabs"
|
|
||||||
:key="tab.tabId"
|
|
||||||
:label="tab.title"
|
|
||||||
:value="tab.tabId"
|
|
||||||
/>
|
|
||||||
</v-radio-group>
|
|
||||||
</v-col>
|
|
||||||
<v-spacer />
|
|
||||||
<v-col>
|
<v-col>
|
||||||
<v-btn
|
<v-btn
|
||||||
block
|
block
|
||||||
color="#3BB9F1"
|
color="#9970ff"
|
||||||
dark
|
dark
|
||||||
depressed
|
depressed
|
||||||
v-bind="attrs"
|
v-bind="attrs"
|
||||||
|
@ -89,26 +75,6 @@
|
||||||
<v-card-title v-else>
|
<v-card-title v-else>
|
||||||
배너 등록
|
배너 등록
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
<v-card-text>
|
|
||||||
<v-row align="center">
|
|
||||||
<v-col cols="4">
|
|
||||||
메인 탭
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="8">
|
|
||||||
<v-radio-group
|
|
||||||
v-model="banner.tab_id"
|
|
||||||
row
|
|
||||||
>
|
|
||||||
<v-radio
|
|
||||||
v-for="tab in tabs"
|
|
||||||
:key="tab.tabId"
|
|
||||||
:label="tab.title"
|
|
||||||
:value="tab.tabId"
|
|
||||||
/>
|
|
||||||
</v-radio-group>
|
|
||||||
</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,15 +293,13 @@ 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'},
|
||||||
banners: [],
|
banners: [],
|
||||||
events: [],
|
events: [],
|
||||||
creators: [],
|
creators: [],
|
||||||
series: [],
|
series: [],
|
||||||
search_query_creator: '',
|
search_query_creator: '',
|
||||||
search_query_series: '',
|
search_query_series: '',
|
||||||
tabs: [],
|
|
||||||
selected_tab_id: 1
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -355,7 +319,7 @@ export default {
|
||||||
|
|
||||||
async created() {
|
async created() {
|
||||||
await this.getEvents()
|
await this.getEvents()
|
||||||
await this.getAudioContentMainTabList()
|
await this.getBanners()
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -379,7 +343,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'}
|
||||||
this.selected_banner = {}
|
this.selected_banner = {}
|
||||||
this.search_query_creator = ''
|
this.search_query_creator = ''
|
||||||
this.search_query_series = ''
|
this.search_query_series = ''
|
||||||
|
@ -393,27 +357,6 @@ export default {
|
||||||
this.$dialog.notify.success(message)
|
this.$dialog.notify.success(message)
|
||||||
},
|
},
|
||||||
|
|
||||||
async getAudioContentMainTabList() {
|
|
||||||
this.is_loading = true
|
|
||||||
|
|
||||||
try {
|
|
||||||
const res = await api.getAudioContentMainTabList()
|
|
||||||
if (res.status === 200 && res.data.success === true) {
|
|
||||||
const data = res.data.data
|
|
||||||
|
|
||||||
this.tabs = data
|
|
||||||
this.selected_tab_id = data[0].tabId
|
|
||||||
await this.getBanners()
|
|
||||||
} else {
|
|
||||||
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
|
||||||
} finally {
|
|
||||||
this.is_loading = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
showModifyBannerDialog(banner) {
|
showModifyBannerDialog(banner) {
|
||||||
this.is_modify = true
|
this.is_modify = true
|
||||||
this.selected_banner = banner
|
this.selected_banner = banner
|
||||||
|
@ -431,7 +374,6 @@ export default {
|
||||||
this.banner.series_title = banner.seriesTitle
|
this.banner.series_title = banner.seriesTitle
|
||||||
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
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.is_selecting = false; // 선택 상태 해제
|
this.is_selecting = false; // 선택 상태 해제
|
||||||
|
@ -510,10 +452,6 @@ export default {
|
||||||
request.seriesId = this.banner.series_id
|
request.seriesId = this.banner.series_id
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.banner.tab_id !== 1) {
|
|
||||||
request.tabId = this.banner.tab_id
|
|
||||||
}
|
|
||||||
|
|
||||||
formData.append("request", JSON.stringify(request))
|
formData.append("request", JSON.stringify(request))
|
||||||
|
|
||||||
const res = await api.saveBanner(formData)
|
const res = await api.saveBanner(formData)
|
||||||
|
@ -585,10 +523,6 @@ export default {
|
||||||
request.isAdult = this.banner.is_adult
|
request.isAdult = this.banner.is_adult
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.selected_banner.tabId !== this.banner.tab_id) {
|
|
||||||
request.tabId = this.banner.tab_id
|
|
||||||
}
|
|
||||||
|
|
||||||
formData.append("request", JSON.stringify(request))
|
formData.append("request", JSON.stringify(request))
|
||||||
|
|
||||||
const res = await api.modifyBanner(formData)
|
const res = await api.modifyBanner(formData)
|
||||||
|
@ -746,7 +680,7 @@ export default {
|
||||||
async getBanners() {
|
async getBanners() {
|
||||||
this.is_loading = true
|
this.is_loading = true
|
||||||
try {
|
try {
|
||||||
const res = await api.getBannerList(this.selected_tab_id)
|
const res = await api.getBannerList()
|
||||||
if (res.status === 200 && res.data.success === true) {
|
if (res.status === 200 && res.data.success === true) {
|
||||||
this.banners = res.data.data
|
this.banners = res.data.data
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue