Compare commits

..

No commits in common. "f168403048ac88ee91ab832e41452601dcf05804" and "82ee1584e7bdf53793c8feee79d90f3d29d87730" have entirely different histories.

2 changed files with 5 additions and 39 deletions

View File

@ -1,7 +1,7 @@
import Vue from 'vue'; import Vue from 'vue';
async function getLive(page, size) { async function getLive() {
return Vue.axios.get('/admin/live?page=' + (page - 1) + '&size=' + size) return Vue.axios.get('/admin/live')
} }
export { getLive } export { getLive }

View File

@ -31,10 +31,6 @@
{{ item.content }} {{ item.content }}
</template> </template>
<template v-slot:item.numberOfParticipants="{ item }">
{{ item.numberOfParticipants }}
</template>
<template v-slot:item.nickname="{ item }"> <template v-slot:item.nickname="{ item }">
{{ item.managerNickname }} {{ item.managerNickname }}
</template> </template>
@ -59,7 +55,7 @@
<span v-else>공개</span> <span v-else>공개</span>
</template> </template>
<template v-slot:item.password="{ item }"> <template v-slot:item.nickname="{ item }">
{{ item.password }} {{ item.password }}
</template> </template>
@ -70,16 +66,6 @@
</v-data-table> </v-data-table>
</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>
</div> </div>
</template> </template>
@ -93,9 +79,6 @@ export default {
data() { data() {
return { return {
isLoading: false, isLoading: false,
page: 1,
page_size: 20,
total_page: 0,
liveList: [], liveList: [],
headers: [ headers: [
{ {
@ -116,12 +99,6 @@ export default {
sortable: false, sortable: false,
value: 'content', value: 'content',
}, },
{
text: '현재참여인원',
align: 'center',
sortable: false,
value: 'numberOfParticipants',
},
{ {
text: '방장', text: '방장',
align: 'center', align: 'center',
@ -175,27 +152,16 @@ export default {
this.$dialog.notify.success(message) this.$dialog.notify.success(message)
}, },
async next() {
await this.getLive()
},
async getLive() { async getLive() {
this.isLoading = true this.isLoading = true
try { try {
this.isLoading = false this.isLoading = false
const res = await api.getLive(this.page, this.page_size) const res = await api.getLive()
if (res.status === 200 && res.data.success === true) { if (res.status === 200 && res.data.success === true) {
const data = res.data.data; this.liveList = res.data.data.liveList
const totalPage = Math.ceil(data.totalCount / this.page_size)
this.liveList = data.liveList
if (totalPage <= 0)
this.total_page = 1
else
this.total_page = totalPage
} else { } else {
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
} }