Compare commits
No commits in common. "ff83041585031b7b35ea10b67c295da95274e193" and "e660be0bf49f1c58ba6094f8256a1df6795ccc8a" have entirely different histories.
ff83041585
...
e660be0bf4
|
@ -41,6 +41,16 @@
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
<v-row class="text-center">
|
||||||
|
<v-col>
|
||||||
|
<v-pagination
|
||||||
|
v-model="page"
|
||||||
|
:length="total_page"
|
||||||
|
circle
|
||||||
|
@input="next"
|
||||||
|
/>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
</v-container>
|
</v-container>
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-dialog
|
<v-dialog
|
||||||
|
@ -137,50 +147,6 @@
|
||||||
</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-row>
|
|
||||||
<v-col>
|
|
||||||
<input
|
|
||||||
id="no-auth"
|
|
||||||
v-model="event.isAdult"
|
|
||||||
type="radio"
|
|
||||||
value="false"
|
|
||||||
>
|
|
||||||
<label for="no-auth">
|
|
||||||
본인인증을 하지 않은 유저만
|
|
||||||
</label>
|
|
||||||
</v-col>
|
|
||||||
<v-col>
|
|
||||||
<input
|
|
||||||
id="auth"
|
|
||||||
v-model="event.isAdult"
|
|
||||||
type="radio"
|
|
||||||
value="true"
|
|
||||||
>
|
|
||||||
<label for="auth">
|
|
||||||
본인인증을 한 유저만
|
|
||||||
</label>
|
|
||||||
</v-col>
|
|
||||||
<v-col>
|
|
||||||
<input
|
|
||||||
id="both"
|
|
||||||
v-model="event.isAdult"
|
|
||||||
type="radio"
|
|
||||||
value=""
|
|
||||||
>
|
|
||||||
<label for="both">
|
|
||||||
상관없음
|
|
||||||
</label>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-card-text>
|
|
||||||
<v-card-actions v-show="!is_loading">
|
<v-card-actions v-show="!is_loading">
|
||||||
<v-btn
|
<v-btn
|
||||||
v-show="is_modify"
|
v-show="is_modify"
|
||||||
|
@ -262,8 +228,9 @@ export default {
|
||||||
return {
|
return {
|
||||||
is_loading: false,
|
is_loading: false,
|
||||||
is_modify: false,
|
is_modify: false,
|
||||||
|
page: 1,
|
||||||
events: [],
|
events: [],
|
||||||
event: { isAdult: '' },
|
event: {},
|
||||||
show_write_dialog: false,
|
show_write_dialog: false,
|
||||||
show_delete_confirm_dialog: false,
|
show_delete_confirm_dialog: false,
|
||||||
}
|
}
|
||||||
|
@ -329,8 +296,11 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async next() {
|
||||||
|
await this.getEvents()
|
||||||
|
},
|
||||||
|
|
||||||
showWriteDialog() {
|
showWriteDialog() {
|
||||||
this.event.isAdult = ''
|
|
||||||
this.show_write_dialog = true
|
this.show_write_dialog = true
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -342,14 +312,13 @@ export default {
|
||||||
this.event.link = item.link
|
this.event.link = item.link
|
||||||
this.event.title = item.title
|
this.event.title = item.title
|
||||||
this.event.isPopup = item.isPopup
|
this.event.isPopup = item.isPopup
|
||||||
this.event.isAdult = item.isAdult === null ? '' : item.isAdult
|
|
||||||
this.event.popupImageUrl = item.popupImageUrl
|
this.event.popupImageUrl = item.popupImageUrl
|
||||||
this.show_write_dialog = true
|
this.show_write_dialog = true
|
||||||
},
|
},
|
||||||
|
|
||||||
cancel() {
|
cancel() {
|
||||||
this.is_modify = false
|
this.is_modify = false
|
||||||
this.event = { isAdult: '' }
|
this.event = {}
|
||||||
this.show_write_dialog = false
|
this.show_write_dialog = false
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -396,17 +365,13 @@ export default {
|
||||||
formData.append("link", this.event.link)
|
formData.append("link", this.event.link)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.event.isAdult !== undefined && this.event.isAdult !== null && this.event.isAdult !== '') {
|
|
||||||
formData.append("isAdult", JSON.parse(this.event.isAdult))
|
|
||||||
}
|
|
||||||
|
|
||||||
const res = await api.save(formData)
|
const res = await api.save(formData)
|
||||||
if (res.status === 200 && res.data.success === true) {
|
if (res.status === 200 && res.data.success === true) {
|
||||||
this.show_write_dialog = false
|
this.show_write_dialog = false
|
||||||
this.notifySuccess('등록되었습니다.')
|
this.notifySuccess('등록되었습니다.')
|
||||||
this.page = 1
|
this.page = 1
|
||||||
await this.getEvents()
|
await this.getEvents()
|
||||||
this.event = { isAdult: '' }
|
this.event = {}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||||
|
@ -447,17 +412,13 @@ export default {
|
||||||
formData.append("link", this.event.link)
|
formData.append("link", this.event.link)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.event.isAdult !== undefined && this.event.isAdult !== null && this.event.isAdult !== '') {
|
|
||||||
formData.append("isAdult", JSON.parse(this.event.isAdult))
|
|
||||||
}
|
|
||||||
|
|
||||||
const res = await api.modify(formData)
|
const res = await api.modify(formData)
|
||||||
if (res.status === 200 && res.data.success === true) {
|
if (res.status === 200 && res.data.success === true) {
|
||||||
this.show_write_dialog = false
|
this.show_write_dialog = false
|
||||||
this.notifySuccess('수정되었습니다.')
|
this.notifySuccess('수정되었습니다.')
|
||||||
this.page = 1
|
this.page = 1
|
||||||
await this.getEvents()
|
await this.getEvents()
|
||||||
this.event = { isAdult: '' }
|
this.event = {}
|
||||||
this.is_modify = false
|
this.is_modify = false
|
||||||
} else {
|
} else {
|
||||||
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||||
|
|
Loading…
Reference in New Issue