Compare commits

..

19 Commits

Author SHA1 Message Date
dfaac20b63 Merge pull request '시그니처 후원 생성/수정 - 재생시간 추가' (#19) from test into main
Reviewed-on: #19
2024-05-02 06:28:56 +00:00
0d3bc1c16e Merge pull request '시리즈 등록 - 크리에이터 -> 장르로 변경' (#18) from test into main
Reviewed-on: #18
2024-04-26 19:15:33 +00:00
c88aa227fd Merge pull request '시리즈' (#17) from test into main
Reviewed-on: #17
2024-04-26 18:57:40 +00:00
3631919245 Merge pull request '콘텐츠 리스트 한정판 표시 - 판매된 개수/전체개수, 다 팔리면 Sold Out으로 표시하도록 수정' (#16) from test into main
Reviewed-on: #16
2024-03-29 03:21:24 +00:00
4a4783563e Merge pull request 'test' (#15) from test into main
Reviewed-on: #15
2024-03-28 06:58:57 +00:00
28d56ab59a Merge pull request '시그니처 관리' (#14) from test into main
Reviewed-on: #14
2024-03-13 11:39:55 +00:00
be97e0ab31 Merge pull request '시그니처 조회/등록/수정/삭제 페이지 추가' (#13) from test into main
Reviewed-on: #13
2024-03-12 06:34:30 +00:00
5e8ec80621 Merge pull request '파비콘 변경' (#12) from test into main
Reviewed-on: #12
2024-02-17 15:02:19 +00:00
0efb3ea86d Merge pull request 'test' (#11) from test into main
Reviewed-on: #11
2024-02-07 09:53:49 +00:00
c0b6a23782 Merge pull request '콘텐츠 업로드 - 미리듣기 생성하지 않을 수 있도록 수정' (#10) from test into main
Reviewed-on: #10
2024-01-30 03:31:28 +00:00
a838b3673c Merge pull request '콘텐츠 등록 - 예약 업로드 추가' (#9) from test into main
Reviewed-on: #9
2024-01-11 09:16:41 +00:00
f64f1f0fb7 Merge pull request '일자별 콘텐츠 후원 페이지 - 유/무료 구분 추가' (#8) from test into main
Reviewed-on: #8
2023-11-14 13:24:07 +00:00
3088f957e2 Merge pull request 'test' (#7) from test into main
Reviewed-on: #7
2023-11-14 12:11:01 +00:00
41f99a175c Merge pull request '콘텐츠별 누적 현황 페이지 추가' (#6) from test into main
Reviewed-on: #6
2023-11-13 15:31:10 +00:00
61b5d785a3 Merge pull request '일자별 콘텐츠 정산 페이지 추가' (#5) from test into main
Reviewed-on: #5
2023-11-13 10:07:06 +00:00
3fe7554e06 Merge pull request '콘텐츠 등록 - 대여만 가능한 콘텐츠 등록할 수 있도록 체크박스 추가' (#4) from test into main
Reviewed-on: #4
2023-10-30 02:10:49 +00:00
1def9ddd4a Merge pull request '미리듣기 시간설정 기능 추가' (#3) from test into main
Reviewed-on: #3
2023-10-04 15:43:22 +00:00
a13d442924 Merge pull request '정산 - 합계 추가' (#2) from test into main
Reviewed-on: #2
2023-10-04 07:22:59 +00:00
a1f206a3c0 Merge pull request 'test' (#1) from test into main
Reviewed-on: #1
2023-10-04 03:34:29 +00:00
10 changed files with 75 additions and 605 deletions

View File

@@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>보이스온 크리에이터 관리자</title> <title>소다라이브</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css">
</head> </head>

View File

@@ -7,7 +7,7 @@
dark dark
> >
<v-spacer /> <v-spacer />
<v-toolbar-title>보이스온 크리에이터 관리자</v-toolbar-title> <v-toolbar-title>소다라이브 크리에이터</v-toolbar-title>
<v-spacer /> <v-spacer />
</v-app-bar> </v-app-bar>
@@ -38,13 +38,4 @@
} }
} }
} }
.noscroll {
overflow-y: hidden;
}
.noscroll::-webkit-scrollbar {
overflow-y: hidden;
display: none;
}
</style> </style>

View File

@@ -5,7 +5,7 @@ async function getGenreList() {
} }
async function getSeriesList(page) { async function getSeriesList(page) {
return Vue.axios.get("/creator-admin/audio-content/series?page=" + (page - 1) + "&size=20"); return Vue.axios.get("/creator-admin/audio-content/series?page=" + (page - 1) + "&size=10");
} }
async function createSeries(formData) { async function createSeries(formData) {
@@ -55,13 +55,6 @@ async function removeContentInTheSeries(seriesId, contentId) {
) )
} }
async function updateSeriesOrders(ids) {
return Vue.axios.put(
"/creator-admin/audio-content/series/orders",
{ids: ids}
)
}
export { export {
getGenreList, getGenreList,
getSeriesList, getSeriesList,
@@ -69,7 +62,6 @@ export {
modifySeries, modifySeries,
getSeriesDetail, getSeriesDetail,
getSeriesContent, getSeriesContent,
updateSeriesOrders,
addingContentToTheSeries, addingContentToTheSeries,
removeContentInTheSeries, removeContentInTheSeries,
searchContentNotInSeries searchContentNotInSeries

View File

@@ -22,17 +22,4 @@ async function getCalculateContentDonation(startDate, endDate, page, size) {
); );
} }
async function getCalculateCommunityPost(startDate, endDate, page, size) { export {getCalculateLive, getCalculateContent, getCumulativeSalesByContent, getCalculateContentDonation}
return Vue.axios.get(
'/creator-admin/calculate/community-post?startDateStr=' +
startDate + '&endDateStr=' + endDate + "&page=" + (page - 1) + "&size=" + size
);
}
export {
getCalculateLive,
getCalculateContent,
getCumulativeSalesByContent,
getCalculateContentDonation,
getCalculateCommunityPost
}

View File

@@ -1,7 +1,7 @@
import Vue from 'vue' import Vue from 'vue'
async function getSignatureList(page, sort) { async function getSignatureList(page) {
return Vue.axios.get('/creator-admin/signature?page=' + (page - 1) + "&size=20" + "&sort-type=" + sort); return Vue.axios.get('/creator-admin/signature?page=' + (page - 1) + "&size=20");
} }
async function createSignature(formData) { async function createSignature(formData) {

View File

@@ -55,11 +55,6 @@ const routes = [
name: 'CalculateContentDonation', name: 'CalculateContentDonation',
component: () => import(/* webpackChunkName: "calculate" */ '../views/Calculate/CalculateContentDonation.vue') component: () => import(/* webpackChunkName: "calculate" */ '../views/Calculate/CalculateContentDonation.vue')
}, },
{
path: '/calculate/community-post',
name: 'CalculateCommunityPost',
component: () => import(/* webpackChunkName: "calculate" */ '../views/Calculate/CalculateCommunityPost.vue')
},
{ {
path: '/signature', path: '/signature',
name: 'SignatureManagement', name: 'SignatureManagement',
@@ -82,12 +77,6 @@ const router = new VueRouter({
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
if (to.path !== '/login') { if (to.path !== '/login') {
if (to.path === '/content/series/list') {
document.documentElement.classList.add('noscroll'); // html에 클래스 추가
} else {
document.documentElement.classList.remove('noscroll');
}
const isAuthenticated = store.getters['accountStore/isAuthenticated'] const isAuthenticated = store.getters['accountStore/isAuthenticated']
if (isAuthenticated) { if (isAuthenticated) {
next(); next();

View File

@@ -1,261 +0,0 @@
<template>
<div>
<v-toolbar dark>
<v-spacer />
<v-toolbar-title>커뮤니티 정산</v-toolbar-title>
<v-spacer />
</v-toolbar>
<br>
<v-container>
<v-row>
<v-col cols="2">
<datetime
v-model="start_date"
class="datepicker"
format="YYYY-MM-DD"
/>
</v-col>
<v-col cols="1">
~
</v-col>
<v-col cols="2">
<datetime
v-model="end_date"
class="datepicker"
format="YYYY-MM-DD"
/>
</v-col>
<v-col cols="1" />
<v-col cols="2">
<v-btn
block
color="#9970ff"
dark
depressed
@click="getCalculateCommunityPost"
>
조회
</v-btn>
</v-col>
<v-spacer />
</v-row>
<v-row>
<v-col>
<v-data-table
:headers="headers"
:items="items"
:loading="is_loading"
:items-per-page="-1"
class="elevation-1"
hide-default-footer
>
<template slot="body.prepend">
<tr>
<td colspan="4">
합계
</td>
<td>{{ sumField('totalCan').toLocaleString() }} </td>
<td>{{ sumField('totalKrw').toLocaleString() }} </td>
<td>{{ sumField('paymentFee').toLocaleString() }} </td>
<td>{{ sumField('settlementAmount').toLocaleString() }} </td>
<td>{{ sumField('tax').toLocaleString() }} </td>
<td>{{ sumField('depositAmount').toLocaleString() }} </td>
</tr>
</template>
<template v-slot:item.title="{ item }">
{{ item.title }}...
</template>
<template v-slot:item.totalCan="{ item }">
{{ item.totalCan.toLocaleString() }}
</template>
<template v-slot:item.totalKrw="{ item }">
{{ item.totalKrw.toLocaleString() }}
</template>
<template v-slot:item.paymentFee="{ item }">
{{ item.paymentFee.toLocaleString() }}
</template>
<template v-slot:item.settlementAmount="{ item }">
{{ item.settlementAmount.toLocaleString() }}
</template>
<template v-slot:item.tax="{ item }">
{{ item.tax.toLocaleString() }}
</template>
<template v-slot:item.depositAmount="{ item }">
{{ item.depositAmount.toLocaleString() }}
</template>
</v-data-table>
</v-col>
</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>
</div>
</template>
<script>
import datetime from "vuejs-datetimepicker";
import * as api from "@/api/calculate";
export default {
name: "CalculateCommunityPost",
components: {datetime},
data() {
return {
is_loading: false,
start_date: null,
end_date: null,
page: 1,
page_size: 20,
total_page: 0,
items: [],
headers: [
{
text: '날짜',
align: 'center',
sortable: false,
value: 'date',
},
{
text: '내용(앞 10글자)',
sortable: false,
value: 'title',
align: 'center',
width: "300px"
},
{
text: '판매금액(캔)',
align: 'center',
sortable: false,
value: 'can',
},
{
text: '구매유저수',
align: 'center',
sortable: false,
value: 'numberOfPurchase',
},
{
text: '합계(캔)',
align: 'center',
sortable: false,
value: 'totalCan',
},
{
text: '원화',
align: 'center',
sortable: false,
value: 'totalKrw',
},
{
text: '수수료\n(6.6%)',
align: 'center',
sortable: false,
value: 'paymentFee',
},
{
text: '정산금액',
align: 'center',
sortable: false,
value: 'settlementAmount',
},
{
text: '원천세\n(3.3%)',
align: 'center',
sortable: false,
value: 'tax',
},
{
text: '입금액',
align: 'center',
sortable: false,
value: 'depositAmount',
}
],
}
},
async created() {
const date = new Date();
const firstDate = new Date(date.getFullYear(), date.getMonth(), 1);
const lastDate = new Date(date.getFullYear(), date.getMonth() + 1, 0);
let firstDateMonth = (firstDate.getMonth() + 1).toString()
if (firstDateMonth.length < 2) {
firstDateMonth = '0' + firstDateMonth
}
let lastDateMonth = (lastDate.getMonth() + 1).toString()
if (lastDateMonth.length < 2) {
lastDateMonth = '0' + lastDateMonth
}
this.start_date = firstDate.getFullYear() + '-' + firstDateMonth + '-0' + firstDate.getDate()
this.end_date = lastDate.getFullYear() + '-' + lastDateMonth + '-' + lastDate.getDate()
await this.getCalculateCommunityPost();
},
methods: {
notifyError(message) {
this.$dialog.notify.error(message)
},
sumField(key) {
return this.items.reduce((a, b) => a + (b[key] || 0), 0)
},
async next() {
await this.getCalculateCommunityPost()
},
async getCalculateCommunityPost() {
this.is_loading = true
try {
const res = await api.getCalculateCommunityPost(this.start_date, this.end_date, this.page, this.page_size)
if (res.status === 200 && res.data.success === true) {
const data = res.data.data
const totalPage = Math.ceil(data.totalCount / this.page_size)
this.items = data.items
if (totalPage <= 0)
this.total_page = 1
else
this.total_page = totalPage
} else {
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
}
this.is_loading = false
} catch (e) {
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
this.is_loading = false
}
}
}
}
</script>

View File

@@ -14,7 +14,7 @@
<v-col> <v-col>
<v-btn <v-btn
block block
color="#3bb9f1" color="#9970ff"
dark dark
depressed depressed
@click="showWriteDialog" @click="showWriteDialog"
@@ -227,34 +227,6 @@
</v-col> </v-col>
</v-row> </v-row>
</v-card-text> </v-card-text>
<v-card-text>
<v-row align="center">
<v-col cols="4">
태그
</v-col>
<v-col cols="8">
<v-text-field
v-model="audio_content.tags"
label="예 : #연애 #커버곡 #태그"
required
/>
</v-col>
</v-row>
</v-card-text>
<v-card-text>
<v-row align="center">
<v-col cols="4">
가격
</v-col>
<v-col cols="8">
<v-text-field
v-model="audio_content.price"
label="가격"
required
/>
</v-col>
</v-row>
</v-card-text>
<v-card-text> <v-card-text>
<v-row> <v-row>
<v-col cols="4"> <v-col cols="4">
@@ -287,22 +259,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"
align="left"
>
<input
v-model="audio_content.is_point_available"
type="checkbox"
>
</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
@@ -484,7 +440,7 @@
label="가격" label="가격"
required required
/> />
유료 콘텐츠 가격을 입력하면 해당 콘텐츠의 미리듣기 시간을 설정할 있습니다.<br>미리듣기 시간은 최소 15 이상 설정해야 합니다. 유료 콘텐츠 가격을 입력하면 해당 콘텐츠의 미리듣기 시간을 설정할 있습니다.<br>미리듣기 시간은 최소 30 이상 설정해야 합니다.
</v-col> </v-col>
</v-row> </v-row>
</v-card-text> </v-card-text>
@@ -564,52 +520,18 @@
</v-row> </v-row>
</v-card-text> </v-card-text>
<v-card-text v-show="audio_content.price > 0 && is_limited_edition === false"> <v-card-text v-show="audio_content.price > 0 && is_limited_edition === false">
<v-row align="center"> <v-row>
<v-col cols="4"> <v-col cols="4">
소장 설정 대여만 가능
</v-col> </v-col>
<v-col cols="8"> <v-col
<v-radio-group cols="8"
v-model="audio_content.purchase_option" align="left"
row >
<input
v-model="audio_content.is_only_rental"
type="checkbox"
> >
<v-radio
value="BOTH"
label="소장/대여"
/>
<v-radio
value="BUY_ONLY"
label="소장만"
/>
<v-radio
value="RENT_ONLY"
label="대여만"
/>
<v-spacer />
</v-radio-group>
</v-col>
</v-row>
</v-card-text>
<v-card-text v-show="audio_content.price >= 50">
<v-row align="center">
<v-col cols="4">
콘텐츠 내용 전체 오픈 설정
</v-col>
<v-col cols="8">
<v-radio-group
v-model="audio_content.is_full_detail_visible"
row
>
<v-radio
:value="false"
label="구매한 사람만"
/>
<v-radio
:value="true"
label="전체"
/>
<v-spacer />
</v-radio-group>
</v-col> </v-col>
</v-row> </v-row>
</v-card-text> </v-card-text>
@@ -645,22 +567,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"
align="left"
>
<input
v-model="audio_content.is_point_available"
type="checkbox"
>
</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
@@ -746,15 +652,15 @@ export default {
audio_content: { audio_content: {
price: 0, price: 0,
is_adult: false, is_adult: false,
is_point_available: false, is_generate_preview: true,
is_generate_preview: false,
is_comment_available: true, is_comment_available: true,
is_full_detail_visible: true,
purchase_option: 'BOTH',
}, },
audio_contents: [], audio_contents: [],
themeList: [], themeList: [],
selected_audio_content: {}, selected_audio_content: {},
utm_source: '',
utm_medium: '',
utm_campaign: '',
} }
}, },
@@ -793,12 +699,9 @@ export default {
this.audio_content.id = item.audioContentId this.audio_content.id = item.audioContentId
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.price = item.price
this.audio_content.is_adult = item.isAdult this.audio_content.is_adult = item.isAdult
this.audio_content.is_point_available = item.isPointAvailable
this.audio_content.is_comment_available = item.isCommentAvailable this.audio_content.is_comment_available = item.isCommentAvailable
this.audio_content.cover_image_url = item.coverImageUrl this.audio_content.cover_image_url = item.coverImageUrl
this.audio_content.tags = item.tags
this.show_modify_dialog = true this.show_modify_dialog = true
}, },
@@ -807,10 +710,7 @@ export default {
this.audio_content = { this.audio_content = {
price: 0, price: 0,
is_adult: false, is_adult: false,
is_point_available: false,
is_comment_available: true, is_comment_available: true,
is_full_detail_visible: true,
purchase_option: 'BOTH',
} }
this.reservation_time = '' this.reservation_time = ''
this.reservation_time = '' this.reservation_time = ''
@@ -918,14 +818,12 @@ export default {
themeId: this.audio_content.theme_id, themeId: this.audio_content.theme_id,
isAdult: this.audio_content.is_adult, isAdult: this.audio_content.is_adult,
isGeneratePreview: this.audio_content.price > 0 ? this.audio_content.is_generate_preview : false, isGeneratePreview: this.audio_content.price > 0 ? this.audio_content.is_generate_preview : false,
purchaseOption: this.audio_content.purchase_option, isOnlyRental: this.audio_content.is_only_rental,
isPointAvailable: this.audio_content.is_point_available, isCommentAvailable: this.audio_content.is_comment_available
isCommentAvailable: this.audio_content.is_comment_available,
isFullDetailVisible: this.audio_content.is_full_detail_visible
} }
if (this.audio_content.limited > 0) { if (this.audio_content.limited > 0) {
request.purchaseOption = 'BUY_ONLY' request.isOnlyRental = false
} }
if (this.audio_content.price > 0 && this.is_limited_edition === true) { if (this.audio_content.price > 0 && this.is_limited_edition === true) {
@@ -957,7 +855,7 @@ export default {
!this.isValidTimeFormat(previewStartTime) || !this.isValidTimeFormat(previewStartTime) ||
!this.isValidTimeFormat(previewEndTime) !this.isValidTimeFormat(previewEndTime)
) { ) {
this.notifyError("미리 듣기 시간 형식은 00:00:15 과 같아야 합니다") this.notifyError("미리 듣기 시간 형식은 00:30:00 과 같아야 합니다")
this.is_loading = false this.is_loading = false
return return
} }
@@ -969,8 +867,8 @@ export default {
const totalSeconds2 = h2 * 3600 + m2 * 60 + s2; const totalSeconds2 = h2 * 3600 + m2 * 60 + s2;
const timeDifference = totalSeconds2 - totalSeconds1; const timeDifference = totalSeconds2 - totalSeconds1;
if (timeDifference < 15) { if (timeDifference < 30) {
this.notifyError("미리 듣기의 최소 시간은 15초 입니다.") this.notifyError("미리 듣기의 최소 시간은 30초 입니다.")
this.is_loading = false this.is_loading = false
return return
} }
@@ -1061,22 +959,10 @@ export default {
request.isAdult = this.audio_content.is_adult request.isAdult = this.audio_content.is_adult
} }
if (this.selected_audio_content.isPointAvailable !== this.audio_content.is_point_available) {
request.isPointAvailable = this.audio_content.is_point_available
}
if (this.selected_audio_content.isCommentAvailable !== this.audio_content.is_comment_available) { if (this.selected_audio_content.isCommentAvailable !== this.audio_content.is_comment_available) {
request.isCommentAvailable = this.audio_content.is_comment_available request.isCommentAvailable = this.audio_content.is_comment_available
} }
if (this.audio_content.price !== this.selected_audio_content.price) {
request.price = this.audio_content.price
}
if (this.audio_content.tags !== this.selected_audio_content.tags) {
request.tags = this.audio_content.tags
}
if (this.audio_content.cover_image !== null) { if (this.audio_content.cover_image !== null) {
formData.append("coverImage", this.audio_content.cover_image) formData.append("coverImage", this.audio_content.cover_image)
} }

View File

@@ -22,54 +22,44 @@
</v-btn> </v-btn>
</v-col> </v-col>
</v-row> </v-row>
<div <v-row>
ref="scroll_container" <v-col
class="scroll_container" v-for="(item, i) in series_list"
@scroll="onScroll" :key="i"
> cols="3"
<draggable
v-model="series_list"
class="row"
@end="onDropCallback(series_list)"
> >
<v-col <v-card>
v-for="(item, i) in series_list" <v-card-title>
:key="i" <v-spacer />
cols="2" <v-img
> :src="item.coverImageUrl"
<v-card> class="cover-image"
<v-card-title> @click="selectSeries(item)"
<v-spacer /> />
<v-img <v-spacer />
:src="item.coverImageUrl" </v-card-title>
class="cover-image" <v-card-text class="series-title-container">
@click="selectSeries(item)" {{ item.title }}
/> </v-card-text>
<v-spacer /> <v-card-actions>
</v-card-title> <v-spacer />
<v-card-text class="series-title-container"> <v-btn
{{ item.title }} text
</v-card-text> @click="showModifyDialog(item)"
<v-card-actions> >
<v-spacer /> 수정
<v-btn </v-btn>
text <v-btn
@click="showModifyDialog(item)" text
> @click="deleteConfirm(item)"
수정 >
</v-btn> 삭제
<v-btn </v-btn>
text <v-spacer />
@click="deleteConfirm(item)" </v-card-actions>
> </v-card>
삭제 </v-col>
</v-btn> </v-row>
<v-spacer />
</v-card-actions>
</v-card>
</v-col>
</draggable>
</div>
</v-container> </v-container>
<v-dialog <v-dialog
@@ -355,11 +345,10 @@
<script> <script>
import * as api from '@/api/audio_content_series'; import * as api from '@/api/audio_content_series';
import Draggable from "vuedraggable";
export default { export default {
name: "ContentSeriesList", name: "ContentSeriesList",
components: {Draggable},
data() { data() {
return { return {
is_loading: false, is_loading: false,
@@ -389,14 +378,6 @@ export default {
}, },
methods: { methods: {
async onScroll() {
const scrollContainer = this.$refs.scroll_container;
const threshold = scrollContainer.scrollHeight - scrollContainer.clientHeight;
if (scrollContainer.scrollTop >= threshold - 10 && this.total_page >= this.page) {
await this.getSeriesList();
}
},
imageAdd(payload) { imageAdd(payload) {
const file = payload; const file = payload;
if (file) { if (file) {
@@ -504,18 +485,8 @@ export default {
this.$router.push({name: 'ContentSeriesDetail', params: {seriesId: series.seriesId}}) this.$router.push({name: 'ContentSeriesDetail', params: {seriesId: series.seriesId}})
}, },
async onDropCallback(items) {
const ids = items.map((item) => {
return item.seriesId
})
const res = await api.updateSeriesOrders(ids)
if (res.status === 200 && res.data.success === true) {
this.notifySuccess(res.data.message)
}
},
async getSeriesGenreList() { async getSeriesGenreList() {
this.is_loading = true
try { try {
const res = await api.getGenreList() const res = await api.getGenreList()
if (res.status === 200 && res.data.success === true) { if (res.status === 200 && res.data.success === true) {
@@ -525,24 +496,23 @@ export default {
} else { } else {
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
} }
this.is_loading = false
} catch (e) { } catch (e) {
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
this.is_loading = false
} }
}, },
async getSeriesList() { async getSeriesList() {
if (this.is_loading) return;
this.is_loading = true this.is_loading = true
try { try {
const res = await api.getSeriesList(this.page) const res = await api.getSeriesList(this.page)
if (res.status === 200 && res.data.success === true) { if (res.status === 200 && res.data.success === true) {
const data = res.data.data const data = res.data.data
const total_page = Math.ceil(data.totalCount / 10)
if (this.page === 1) this.series_list.length = 0; const total_page = Math.ceil(data.totalCount / 20)
this.page += 1; this.series_list = data.items
this.series_list.push(...data.items);
if (total_page <= 0) if (total_page <= 0)
this.total_page = 1 this.total_page = 1
@@ -695,16 +665,6 @@ export default {
</script> </script>
<style scoped> <style scoped>
.scroll_container {
margin-top: 30px;
height: 100vh;
overflow-y: auto;
}
.scroll_container > .row {
padding-bottom: 280px;
}
.image-select label { .image-select label {
display: inline-block; display: inline-block;
padding: 10px 20px; padding: 10px 20px;
@@ -742,6 +702,6 @@ export default {
} }
.cover-image { .cover-image {
aspect-ratio: 1/1.3; aspect-ratio: 1/1.4;
} }
</style> </style>

View File

@@ -20,57 +20,6 @@
</v-btn> </v-btn>
</v-col> </v-col>
</v-row> </v-row>
<v-row class="row-sort">
<v-col>
<input
id="sort-newest"
v-model="sort_type"
type="radio"
value="NEWEST"
class="radio-sort"
@change="changeSortType"
>
<label
for="sort-newest"
class="radio-label-sort"
>
최신순
</label>
</v-col>
<v-col>
<input
id="sort-can-high"
v-model="sort_type"
type="radio"
value="CAN_HIGH"
class="radio-sort"
@change="changeSortType"
>
<label
for="sort-can-high"
class="radio-label-sort"
>
높은캔순
</label>
</v-col>
<v-col>
<input
id="sort-can-low"
v-model="sort_type"
type="radio"
value="CAN_LOW"
class="radio-sort"
@change="changeSortType"
>
<label
for="sort-can-low"
class="radio-label-sort"
>
낮은캔순
</label>
</v-col>
<v-col cols="10" />
</v-row>
<v-row> <v-row>
<v-col> <v-col>
<v-data-table <v-data-table
@@ -397,7 +346,6 @@ export default {
image_url: null, image_url: null,
is_active: null, is_active: null,
selected_signature_can: {}, selected_signature_can: {},
sort_type: 'NEWEST',
headers: [ headers: [
{ {
@@ -501,15 +449,11 @@ export default {
this.show_modify_dialog = true this.show_modify_dialog = true
}, },
async changeSortType() {
await this.getSignatureList();
},
async getSignatureList() { async getSignatureList() {
this.is_loading = true this.isLoading = true
try { try {
let res = await api.getSignatureList(this.page, this.sort_type); let res = await api.getSignatureList(this.page);
if (res.status === 200 && res.data.success === true) { if (res.status === 200 && res.data.success === true) {
const data = res.data.data const data = res.data.data
@@ -525,7 +469,7 @@ export default {
} catch (e) { } catch (e) {
this.notifyError("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") this.notifyError("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
} finally { } finally {
this.is_loading = false this.isLoading = false
} }
}, },
@@ -695,22 +639,4 @@ export default {
display: block; display: block;
margin: 0 auto; margin: 0 auto;
} }
.row-sort {
margin-top: 40px;
}
.radio-sort {
display: none;
}
.radio-label-sort {
font-weight: normal;
color: black;
}
.radio-sort:checked + .radio-label-sort {
font-weight: bold;
color: #3bb9f1;
}
</style> </style>