Compare commits

..

75 Commits

Author SHA1 Message Date
492859dae3 Merge pull request 'test' (#76) from test into main
Reviewed-on: #76
2025-09-16 06:16:32 +00:00
18b59b5598 Merge pull request 'test' (#75) from test into main
Reviewed-on: #75
2025-09-14 09:04:57 +00:00
5fcdd7f06d Merge pull request '캐릭터 챗봇' (#74) from test into main
Reviewed-on: #74
2025-09-10 06:26:02 +00:00
1e149f7e41 Merge pull request '쿠폰생성 - 쿠폰타입(포인트, 캔) 선택 추가' (#73) from test into main
Reviewed-on: #73
2025-06-10 11:01:52 +00:00
aca3767a24 Merge pull request 'test' (#72) from test into main
Reviewed-on: #72
2025-05-20 07:21:28 +00:00
d51655f15e Merge pull request '포인트 정책 등록/수정 페이지 추가' (#71) from test into main
Reviewed-on: #71
2025-04-24 03:28:52 +00:00
47dd32939f Merge pull request '일별 전체 회원 수 - 이메일, 구글, 카카오 회원 수 추가' (#70) from test into main
Reviewed-on: #70
2025-04-10 02:35:33 +00:00
2e1891ab08 Merge pull request '회원리스트 - 로그인 타입 필드 추가' (#69) from test into main
Reviewed-on: #69
2025-04-09 10:44:30 +00:00
99d70cc8f7 Merge pull request '이벤트 배너 수정 - 링크 지우기 추가' (#68) from test into main
Reviewed-on: #68
2025-04-07 14:48:10 +00:00
9f1675e82d Merge pull request '광고통계 - 로그인 수를 가장 오른쪽으로 이동' (#67) from test into main
Reviewed-on: #67
2025-04-02 02:11:35 +00:00
c2838be2ed Merge pull request '일별 전체 회원 수 통계' (#66) from test into main
Reviewed-on: #66
2025-03-31 03:54:56 +00:00
b5c2941c0d Merge pull request '앱 실행 수 추가' (#65) from test into main
Reviewed-on: #65
2025-03-28 05:58:43 +00:00
d5c01d8d23 Merge pull request '광고통계 - 빠른검색 (날짜 지정) 추가' (#64) from test into main
Reviewed-on: #64
2025-03-17 04:58:02 +00:00
7118b0649a Merge pull request '비밀번호 재설정 기능 추가' (#63) from test into main
Reviewed-on: #63
2025-03-17 03:09:41 +00:00
8f5346581e Merge pull request '일별 전체 회원 수 페이지 추가' (#62) from test into main
Reviewed-on: #62
2025-03-14 16:08:06 +00:00
e43f2e30be Merge pull request '충전 이벤트, 이벤트 배너 - 기간 설정에 시간 추가' (#61) from test into main
Reviewed-on: #61
2025-03-14 03:34:42 +00:00
397fd267e0 Merge pull request 'test' (#60) from test into main
Reviewed-on: #60
2025-03-11 08:07:48 +00:00
fe4b88350b Merge pull request '광고 통계 페이지' (#59) from test into main
Reviewed-on: #59
2025-03-05 13:53:32 +00:00
537474e162 Merge pull request '마케팅 - 매체 파트너 코드 페이지 추가' (#58) from test into main
Reviewed-on: #58
2025-03-05 09:54:31 +00:00
b5abdf3cf5 Merge pull request 'test' (#57) from test into main
Reviewed-on: #57
2025-02-18 15:12:52 +00:00
a2e457b5e8 Merge pull request 'test' (#56) from test into main
Reviewed-on: #56
2025-02-09 13:25:35 +00:00
05ddd417cd Merge pull request '콘텐츠 배너 등록/수정' (#54) from test into main
Reviewed-on: #54
2025-01-17 16:46:45 +00:00
e70426af68 Merge pull request 'test' (#53) from test into main
Reviewed-on: #53
2025-01-17 06:00:59 +00:00
81b33e1322 Merge pull request '오디션 지원 취소기능 적용' (#52) from test into main
Reviewed-on: #52
2025-01-08 06:34:54 +00:00
588fcfbe90 Merge pull request '오디션 지원자 연락처 표시' (#51) from test into main
Reviewed-on: #51
2025-01-07 20:10:23 +00:00
ff2c126382 Merge pull request '오디션 메뉴 추가' (#50) from test into main
Reviewed-on: #50
2025-01-07 17:20:32 +00:00
702daca29f Merge pull request '소다라이브 -> 보이스온' (#49) from test into main
Reviewed-on: #49
2024-11-21 12:59:05 +00:00
8e9008a3c1 Merge pull request '이벤트 기간 추가' (#48) from test into main
Reviewed-on: #48
2024-10-31 03:17:44 +00:00
5c0c00aad4 Merge pull request '크리에이터 리스트 - 프로필 이미지 다운로드 버튼 추가' (#47) from test into main
Reviewed-on: #47
2024-10-24 03:07:00 +00:00
e0949c6d73 Merge pull request 'test' (#46) from test into main
Reviewed-on: #46
2024-10-16 04:18:55 +00:00
0449bac8d5 Merge pull request '전체 개수 추가' (#45) from test into main
Reviewed-on: #45
2024-10-15 04:18:01 +00:00
d412c15c9d Merge pull request '시리즈 리스트 - 작품 개수 추가' (#44) from test into main
Reviewed-on: #44
2024-10-14 15:43:15 +00:00
ed16a6ddad Merge pull request '시리즈 리스트 페이지 추가' (#43) from test into main
Reviewed-on: #43
2024-10-14 10:14:19 +00:00
f06e2d41e0 Merge pull request '전체 크리에이터 수 추가' (#42) from test into main
Reviewed-on: #42
2024-09-26 11:38:53 +00:00
7505269db3 Merge pull request '크리에이터별 정산 - 페이징 추가' (#41) from test into main
Reviewed-on: #41
2024-08-01 05:16:04 +00:00
15eeb6943d Merge pull request '크리에이터 기준 라이브, 콘텐츠, 커뮤니티 합계 정산 페이지 추가' (#40) from test into main
Reviewed-on: #40
2024-07-08 14:41:28 +00:00
7e7ed46cea Merge pull request '크리에이터 기준 라이브, 콘텐츠, 커뮤니티 합계 정산 페이지 추가' (#39) from test into main
Reviewed-on: #39
2024-07-08 14:37:08 +00:00
fd01786649 Merge pull request 'test' (#38) from test into main
Reviewed-on: #38
2024-07-08 14:22:01 +00:00
c48c1c2f09 Merge pull request '크리에이터 정산비율 등록페이지 추가' (#37) from test into main
Reviewed-on: #37
2024-06-11 08:11:57 +00:00
9bcf3a3cdb Merge pull request '커뮤니티 정산' (#36) from test into main
Reviewed-on: #36
2024-06-06 14:59:58 +00:00
4c5b987d98 Merge pull request 'test' (#35) from test into main
Reviewed-on: #35
2024-06-03 22:24:23 +00:00
f168403048 Merge pull request '라이브 리스트 - 현재참여인원 추가' (#34) from test into main
Reviewed-on: #34
2024-05-28 18:16:18 +00:00
82ee1584e7 Merge pull request '커뮤니티 정산 페이지 추가' (#33) from test into main
Reviewed-on: #33
2024-05-28 16:13:16 +00:00
65cb918389 Merge pull request '시그니처 관리 - 재생 시간 등록/수정 기능 추가' (#32) from test into main
Reviewed-on: #32
2024-05-02 07:17:34 +00:00
784baf9a2f Merge pull request '시리즈 장르 - 등록/삭제 페이지 추가' (#31) from test into main
Reviewed-on: #31
2024-04-26 19:06:32 +00:00
7a85ac41cc Merge pull request '관리자 - 캔 충전현황' (#30) from test into main
Reviewed-on: #30
2024-04-01 11:34:15 +00:00
9d4c9437cf Merge pull request '관리자 - 캔 충전현황' (#29) from test into main
Reviewed-on: #29
2024-04-01 11:27:14 +00:00
68845aeae1 Merge pull request '콘텐츠 리스트 한정판 표시' (#28) from test into main
Reviewed-on: #28
2024-03-29 05:00:01 +00:00
bbdca29337 Merge pull request '콘텐츠 리스트' (#27) from test into main
Reviewed-on: #27
2024-03-28 06:43:25 +00:00
c14c041daa Merge pull request 'test' (#26) from test into main
Reviewed-on: #26
2024-03-19 07:50:16 +00:00
a515a144eb Merge pull request 'test' (#25) from test into main
Reviewed-on: #25
2024-03-13 11:42:23 +00:00
54a6773905 Merge pull request 'test' (#24) from test into main
Reviewed-on: #24
2024-03-12 07:54:10 +00:00
d97087b4e9 Merge pull request '시그니처 캔 등록 페이지 추가' (#23) from test into main
Reviewed-on: #23
2024-03-08 13:59:51 +00:00
ddb2449053 Merge pull request '파비콘 변경' (#22) from test into main
Reviewed-on: #22
2024-02-17 14:56:25 +00:00
8aca07cdf7 Merge pull request '콘텐츠 수정' (#21) from test into main
Reviewed-on: #21
2024-02-08 18:25:50 +00:00
0ba845d95a Merge pull request '콘텐츠 리스트 - 오픈예정일 추가' (#20) from test into main
Reviewed-on: #20
2024-01-11 09:27:25 +00:00
64b1fd5395 Merge pull request '수정 기능 추가' (#19) from test into main
Reviewed-on: #19
2024-01-03 15:25:28 +00:00
639bea70fa Merge pull request '쿠폰 관리 페이지 추가' (#18) from test into main
Reviewed-on: #18
2024-01-03 10:33:23 +00:00
6a89ba059b Merge pull request '푸시 발송 대상 지정 UI 추가' (#17) from test into main
Reviewed-on: #17
2023-11-24 07:01:10 +00:00
ff83041585 Merge pull request '연령제한 표시 추가' (#16) from test into main
Reviewed-on: #16
2023-11-21 16:25:21 +00:00
e660be0bf4 Merge pull request '일자별 콘텐츠 후원 페이지 - 유/무료 구분 추가' (#15) from test into main
Reviewed-on: #15
2023-11-14 13:36:49 +00:00
62cdd57069 Merge pull request '일자별 콘텐츠 후원 페이지 - 유/무료 구분 추가' (#14) from test into main
Reviewed-on: #14
2023-11-14 13:34:37 +00:00
f8346ed5ef Merge pull request '일자별 콘텐츠 후원 페이지 - 유/무료 구분 추가' (#13) from test into main
Reviewed-on: #13
2023-11-14 13:19:50 +00:00
9656b9a9d1 Merge pull request '일자별 콘텐츠 후원 페이지 추가' (#12) from test into main
Reviewed-on: #12
2023-11-14 08:57:15 +00:00
97a58266bb Merge pull request 'orderType 추가, 판매수 -> 누적 판매수 로 변경' (#11) from test into main
Reviewed-on: #11
2023-11-13 14:52:38 +00:00
8fc0cfa345 Merge pull request '콘텐츠별 누적 현황 페이지 - 총 콘텐츠 개수 표시' (#10) from test into main
Reviewed-on: #10
2023-11-13 14:08:26 +00:00
22f9c2287d Merge pull request '콘텐츠별 누적 현황 페이지 추가' (#9) from test into main
Reviewed-on: #9
2023-11-13 13:46:19 +00:00
9284f7d5c3 Merge pull request '콘텐츠 정산 - 엑셀 다운로드 추가' (#8) from test into main
Reviewed-on: #8
2023-11-13 08:46:43 +00:00
e6f27a4529 Merge pull request '콘텐츠 정산 - 헤더 순서 변경' (#7) from test into main
Reviewed-on: #7
2023-11-10 13:56:50 +00:00
6a33d1c024 Merge pull request '콘텐츠 정산 페이지 추가' (#6) from test into main
Reviewed-on: #6
2023-11-10 10:51:32 +00:00
3b83789c15 Merge pull request 'test' (#5) from test into main
Reviewed-on: #5
2023-10-06 15:09:02 +00:00
55f0ab9af3 Merge pull request '크리에이터 라이브 정산 - 인원 추가, 코인 -> 캔' (#4) from test into main
Reviewed-on: #4
2023-10-03 12:15:25 +00:00
9b168a6112 Merge pull request '크리에이터 라이브 정산 페이지 추가' (#3) from test into main
Reviewed-on: #3
2023-10-03 09:25:39 +00:00
c47937933e Merge pull request 'test' (#2) from test into main
Reviewed-on: #2
2023-08-25 07:50:32 +00:00
4744fe7d9a Merge pull request '채널공유 - 파이어베이스 링크, 도메인, 프로젝트명 변경' (#1) from test into main
Reviewed-on: #1
2023-08-22 03:39:44 +00:00
18 changed files with 93 additions and 1640 deletions

View File

@@ -1,89 +1,34 @@
import Vue from "vue";
import Vue from 'vue';
async function getAudioContentSeriesList(page) {
return Vue.axios.get("/admin/audio-content/series?page=" + (page - 1) + "&size=10");
return Vue.axios.get("/admin/audio-content/series?page=" + (page - 1) + "&size=10");
}
async function getAudioContentSeriesGenreList() {
return Vue.axios.get("/admin/audio-content/series/genre");
return Vue.axios.get('/admin/audio-content/series/genre');
}
async function createAudioContentSeriesGenre(genre, is_adult) {
return Vue.axios.post("/admin/audio-content/series/genre", { genre: genre, isAdult: is_adult });
return Vue.axios.post('/admin/audio-content/series/genre', {genre: genre, isAdult: is_adult})
}
async function updateAudioContentSeriesGenre(request) {
return Vue.axios.put("/admin/audio-content/series/genre", request);
return Vue.axios.put('/admin/audio-content/series/genre', request)
}
async function updateAudioContentSeriesGenreOrders(ids) {
return Vue.axios.put("/admin/audio-content/series/genre/orders", { ids: ids });
return Vue.axios.put('/admin/audio-content/series/genre/orders', {ids: ids})
}
async function searchSeriesList(searchWord) {
return Vue.axios.get("/admin/audio-content/series/search?search_word=" + searchWord);
}
// 시리즈 수정
async function updateAudioContentSeries(request) {
return Vue.axios.put("/admin/audio-content/series", request);
}
// ========================
// 시리즈 배너 API
// ========================
// 배너 리스트 조회
async function getSeriesBannerList(page = 1, size = 20) {
return Vue.axios.get("/admin/audio-content/series/banner/list", {
params: { page: page - 1, size }
});
}
// 배너 등록
async function createSeriesBanner(bannerData) {
const formData = new FormData();
if (bannerData.image) formData.append("image", bannerData.image);
const requestData = { seriesId: bannerData.seriesId };
formData.append("request", JSON.stringify(requestData));
return Vue.axios.post("/admin/audio-content/series/banner/register", formData, {
headers: { "Content-Type": "multipart/form-data" }
});
}
// 배너 수정
async function updateSeriesBanner(bannerData) {
const formData = new FormData();
if (bannerData.image) formData.append("image", bannerData.image);
const requestData = { seriesId: bannerData.seriesId, bannerId: bannerData.bannerId };
formData.append("request", JSON.stringify(requestData));
return Vue.axios.put("/admin/audio-content/series/banner/update", formData, {
headers: { "Content-Type": "multipart/form-data" }
});
}
// 배너 삭제
async function deleteSeriesBanner(bannerId) {
// 백엔드 사양이 불명확하여 쿼리 파라미터로 전송
return Vue.axios.delete("/admin/audio-content/series/banner/" + bannerId);
}
// 배너 순서 변경
async function updateSeriesBannerOrder(ids) {
return Vue.axios.put("/admin/audio-content/series/banner/orders", { ids });
return Vue.axios.get("/admin/audio-content/series/search?search_word=" + searchWord)
}
export {
getAudioContentSeriesList,
getAudioContentSeriesGenreList,
createAudioContentSeriesGenre,
updateAudioContentSeriesGenre,
updateAudioContentSeriesGenreOrders,
searchSeriesList,
updateAudioContentSeries,
// series banner
getSeriesBannerList,
createSeriesBanner,
updateSeriesBanner,
deleteSeriesBanner,
updateSeriesBannerOrder
};
getAudioContentSeriesList,
getAudioContentSeriesGenreList,
createAudioContentSeriesGenre,
updateAudioContentSeriesGenre,
updateAudioContentSeriesGenreOrders,
searchSeriesList
}

View File

@@ -24,7 +24,7 @@ async function getCalculateCommunityPost(startDate, endDate, page, size) {
}
async function getSettlementRatio(page) {
return Vue.axios.get('/admin/calculate/ratio?page=' + (page - 1) + "&size=20");
return Vue.axios.get('/admin/calculate/ratio?page=' + (page - 1) + "&size=20'");
}
async function createCreatorSettlementRatio(creatorSettlementRatio) {
@@ -57,21 +57,6 @@ async function getCalculateCommunityByCreator(startDate, endDate, page, size) {
)
}
async function updateCreatorSettlementRatio(creatorSettlementRatio) {
const request = {
memberId: creatorSettlementRatio.creator_id,
subsidy: creatorSettlementRatio.subsidy,
liveSettlementRatio: creatorSettlementRatio.liveSettlementRatio,
contentSettlementRatio: creatorSettlementRatio.contentSettlementRatio,
communitySettlementRatio: creatorSettlementRatio.communitySettlementRatio
};
return Vue.axios.post('/admin/calculate/ratio/update', request);
}
async function deleteCreatorSettlementRatio(memberId) {
return Vue.axios.post('/admin/calculate/ratio/delete/' + memberId);
}
export {
getCalculateLive,
getCalculateContent,
@@ -80,8 +65,6 @@ export {
getCalculateCommunityPost,
getSettlementRatio,
createCreatorSettlementRatio,
updateCreatorSettlementRatio,
deleteCreatorSettlementRatio,
getCalculateLiveByCreator,
getCalculateContentByCreator,
getCalculateCommunityByCreator

View File

@@ -5,16 +5,16 @@ async function deleteCan(id) {
}
async function getCans() {
return Vue.axios.get('/admin/can');
return Vue.axios.get('/can');
}
async function insertCan(can, rewardCan, price, currency) {
const request = {can: can, rewardCan: rewardCan, price: price, currency}
async function insertCan(can, rewardCan, price) {
const request = {can: can, rewardCan: rewardCan, price: price}
return Vue.axios.post('/admin/can', request);
}
async function paymentCan(can, method, memberIds) {
const request = {memberIds: memberIds, method: method, can: can}
async function paymentCan(can, method, member_id) {
const request = {memberId: member_id, method: method, can: can}
return Vue.axios.post('/admin/can/charge', request)
}

View File

@@ -7,20 +7,13 @@ async function getCharacterList(page = 1, size = 20) {
})
}
// 캐릭터 검색 (배너용 기존 함수)
// 캐릭터 검색
async function searchCharacters(searchTerm, page = 1, size = 20) {
return Vue.axios.get('/admin/chat/banner/search-character', {
params: { searchTerm, page: page - 1, size }
})
}
// 캐릭터 리스트 검색 (요구사항: /admin/chat/character/search)
async function searchCharacterList(searchTerm, page = 1, size = 20) {
return Vue.axios.get('/admin/chat/character/search', {
params: { searchTerm, page: page - 1, size }
})
}
// 캐릭터 상세 조회
async function getCharacter(id) {
return Vue.axios.get(`/admin/chat/character/${id}`)
@@ -264,7 +257,6 @@ async function getCharacterCalculateList({ startDateStr, endDateStr, sort = 'TOT
export {
getCharacterList,
searchCharacters,
searchCharacterList,
getCharacter,
createCharacter,
updateCharacter,

View File

@@ -4,11 +4,8 @@ async function getChargeStatus(startDate, endDate) {
return Vue.axios.get('/admin/charge/status?startDateStr=' + startDate + '&endDateStr=' + endDate);
}
async function getChargeStatusDetail(startDate, paymentGateway, currency) {
return Vue.axios.get('/admin/charge/status/detail?startDateStr=' + startDate
+ '&paymentGateway=' + paymentGateway
+ '&currency=' + currency
);
async function getChargeStatusDetail(startDate, paymentGateway) {
return Vue.axios.get('/admin/charge/status/detail?startDateStr=' + startDate + '&paymentGateway=' + paymentGateway);
}
export { getChargeStatus, getChargeStatusDetail }

View File

@@ -52,40 +52,13 @@ async function resetPassword(id) {
return Vue.axios.post("/admin/member/password/reset", request)
}
/**
* 닉네임으로 회원 검색 API
* - 서버 구현 차이를 흡수하기 위해 nickname, search_word 두 파라미터 모두 전송
* - 응답은 다음 두 형태를 모두 허용하고 배열로 정규화하여 반환
* 1) [{ id, nickname }, ...]
* 2) { data: [{ id, nickname }, ...] }
* @param {string} query
* @returns {Promise<Array<{id:number,nickname:string}>>}
*/
async function searchMembersByNickname(query) {
try {
const res = await Vue.axios.get('/admin/member/search-by-nickname', {
params: { search_word: query }
})
if (res && Array.isArray(res.data)) {
return res.data
}
if (res && res.data && Array.isArray(res.data.data)) {
return res.data.data
}
return []
} catch (e) {
return []
}
}
export {
login,
getMemberList,
searchMember,
getCreatorList,
searchCreator,
updateMember,
getCreatorAllList,
resetPassword,
searchMembersByNickname
login,
getMemberList,
searchMember,
getCreatorList,
searchCreator,
updateMember,
getCreatorAllList,
resetPassword
}

View File

@@ -1,6 +1,6 @@
import Vue from 'vue';
// 공통: 값 그대로 전달 (빈 문자열 유지)
// 공통: 빈 문자열 -> null
function toNullIfBlank(value) {
if (typeof value === 'string') {
return value.trim() === '' ? null : value;
@@ -25,12 +25,7 @@ export async function createOriginal(data) {
category: toNullIfBlank(data.category),
isAdult: !!data.isAdult,
description: toNullIfBlank(data.description),
originalLink: toNullIfBlank(data.originalLink), // 원천 원작 링크
originalWork: toNullIfBlank(data.originalWork),
writer: toNullIfBlank(data.writer),
studio: toNullIfBlank(data.studio),
originalLinks: Array.isArray(data.originalLinks) ? data.originalLinks : [],
tags: Array.isArray(data.tags) ? data.tags : []
originalLink: toNullIfBlank(data.originalLink)
};
formData.append('request', JSON.stringify(request));
return Vue.axios.post('/admin/chat/original/register', formData, {
@@ -44,7 +39,12 @@ export async function updateOriginal(data, image = null) {
if (image) formData.append('image', image);
const processed = {};
Object.keys(data).forEach(key => {
processed[key] = data[key];
const value = data[key];
if (typeof value === 'string' || value === '') {
processed[key] = toNullIfBlank(value)
} else {
processed[key] = value
}
})
formData.append('request', JSON.stringify(processed));
return Vue.axios.put('/admin/chat/original/update', formData, {

View File

@@ -97,26 +97,6 @@ export default {
if (res.status === 200 && res.data.success === true && res.data.data.length > 0) {
this.items = res.data.data
// '시리즈 관리' 메뉴에 '배너 등록' 하위 메뉴 추가
try {
const seriesMenu = this.items.find(m => m && m.title === '시리즈 관리')
if (seriesMenu) {
if (!Array.isArray(seriesMenu.items)) {
seriesMenu.items = seriesMenu.items ? [].concat(seriesMenu.items) : []
}
const exists = seriesMenu.items.some(ci => ci && ci.route === '/content/series/banner')
if (!exists) {
seriesMenu.items.push({
title: '배너 등록',
route: '/content/series/banner',
items: null
})
}
}
} catch (e) {
// ignore
}
// 캐릭터 챗봇 메뉴 추가
this.items.push({
title: '캐릭터 챗봇',

View File

@@ -120,11 +120,6 @@ const routes = [
name: 'ContentSeriesRecommendFree',
component: () => import(/* webpackChunkName: "series" */ '../views/Series/ContentSeriesRecommendFree.vue')
},
{
path: '/content/series/banner',
name: 'ContentSeriesBanner',
component: () => import(/* webpackChunkName: "series" */ '../views/Series/ContentSeriesBanner.vue')
},
{
path: '/promotion/event',
name: 'EventView',

View File

@@ -8,29 +8,11 @@
<br>
<v-container>
<v-autocomplete
v-model="selectedMembers"
:items="displaySearchItems"
:loading="searchLoading"
:search-input.sync="searchQuery"
label="닉네임으로 사용자 검색 (여러 명 선택 가능)"
item-text="nickname"
item-value="id"
return-object
multiple
small-chips
clearable
outlined
cache-items
:value-comparator="compareMember"
@update:search-input="onSearch"
/>
<v-text-field
v-model="manualInput"
label="회원번호 직접 입력 (여러 개 입력 가능, 콤마/공백 구분)"
v-model="account_id"
label="회원번호"
outlined
clearable
required
/>
<v-text-field
@@ -52,7 +34,7 @@
<v-col>
<v-btn
block
color="#3bb9f1"
color="#9970ff"
dark
depressed
@click="confirm"
@@ -70,7 +52,7 @@
<v-card>
<v-card-title> 지급 확인</v-card-title>
<v-card-text>
지급 대상: {{ confirmTargets.join(', ') }}
회원번호: {{ account_id }}
</v-card-text>
<v-card-text>
기록내용: {{ method }}
@@ -106,7 +88,6 @@
<script>
import * as api from '@/api/can'
import { searchMembersByNickname } from '@/api/member'
export default {
name: "CanCharge",
@@ -115,60 +96,12 @@ export default {
return {
show_confirm: false,
is_loading: false,
// 기존 account_id -> member_id로 명칭 변경 및 다중 입력 구조로 변경
selectedMembers: [], // 검색으로 선택된 사용자 {id, nickname} 객체 배열
searchItems: [],
searchLoading: false,
searchQuery: '',
searchDebounceTimer: null,
lastSearchToken: 0,
manualInput: '', // 수동 입력: 회원번호 여러 개 (콤마/공백 구분)
account_id: '',
method: '',
can: ''
}
},
computed: {
// 확인 다이얼로그에 표시할 대상 이름들
confirmTargets() {
const names = []
// 검색으로 선택된 사용자 닉네임
if (this.selectedMembers && this.selectedMembers.length > 0) {
names.push(...this.selectedMembers.map(m => m.nickname))
}
// 수동 입력 회원번호는 번호 그대로 표기
const manualIds = this.parseManualIds()
if (manualIds.length > 0) {
names.push(...manualIds.map(String))
}
return names
},
// 검색 결과 목록에 현재 선택된 사용자들을 항상 포함시켜
// 선택 chip이 사라지지 않도록 보장
displaySearchItems() {
const map = new Map()
;(this.selectedMembers || []).forEach(m => {
if (m && (m.id !== undefined && m.id !== null)) {
map.set(String(m.id), m)
}
})
;(this.searchItems || []).forEach(m => {
if (m && (m.id !== undefined && m.id !== null)) {
const key = String(m.id)
if (!map.has(key)) map.set(key, m)
}
})
return Array.from(map.values())
}
},
beforeDestroy() {
if (this.searchDebounceTimer) {
clearTimeout(this.searchDebounceTimer)
this.searchDebounceTimer = null
}
},
methods: {
notifyError(message) {
this.$dialog.notify.error(message)
@@ -178,91 +111,19 @@ export default {
this.$dialog.notify.success(message)
},
// v-autocomplete의 선택 비교를 id 기준으로 수행
compareMember(a, b) {
if (a === b) return true
if (!a || !b) return false
const aid = typeof a === 'object' ? a.id : a
const bid = typeof b === 'object' ? b.id : b
if (aid === undefined || bid === undefined || aid === null || bid === null) return false
return String(aid) === String(bid)
},
onSearch(val) {
this.searchQuery = val
// 입력이 없으면 즉시 초기화하고 이전 타이머/로딩을 정리
if (!val || val.trim().length === 0) {
if (this.searchDebounceTimer) {
clearTimeout(this.searchDebounceTimer)
this.searchDebounceTimer = null
}
this.searchLoading = false
this.searchItems = []
return
}
// 디바운스: 입력 멈춘 뒤에만 호출
if (this.searchDebounceTimer) {
clearTimeout(this.searchDebounceTimer)
this.searchDebounceTimer = null
}
this.searchDebounceTimer = setTimeout(async () => {
if (val.trim().length >= 2) {
const token = ++this.lastSearchToken
this.searchLoading = true
try {
const items = await searchMembersByNickname(val)
// 가장 최근 쿼리에 대한 응답만 반영
if (token === this.lastSearchToken) {
this.searchItems = items
}
} catch (e) {
if (token === this.lastSearchToken) {
this.searchItems = []
}
} finally {
if (token === this.lastSearchToken) {
this.searchLoading = false
}
}
}
}, 300)
},
parseManualIds() {
if (!this.manualInput) return []
return this.manualInput
.split(/[\s,]+/)
.map(s => s.trim())
.filter(s => s.length > 0 && /^\d+$/.test(s))
.map(s => Number(s))
},
buildMemberIds() {
const idsFromSearch = (this.selectedMembers || []).map(m => Number(m.id)).filter(id => !isNaN(id))
const idsFromManual = this.parseManualIds()
// 중복 제거
const set = new Set([...idsFromSearch, ...idsFromManual])
return Array.from(set)
},
confirm() {
// 유효성 검증
if (this.account_id.trim() === '' || isNaN(this.account_id)) {
return this.notifyError('캔을 지급할 회원의 회원번호를 입력하세요.')
}
if (this.method.trim() === '') {
return this.notifyError('기록할 내용을 입력하세요')
}
if (this.can === '' || isNaN(this.can)) {
if (isNaN(this.can)) {
return this.notifyError('캔은 숫자만 넣을 수 있습니다.')
}
const memberIds = this.buildMemberIds()
if (memberIds.length === 0) {
return this.notifyError('캔을 지급할 대상을 추가하세요. (닉네임 검색 선택 또는 회원번호 입력)')
}
if (!this.is_loading) {
this.show_confirm = true
}
@@ -279,15 +140,10 @@ export default {
try {
this.show_confirm = false
const memberIds = this.buildMemberIds()
const res = await api.paymentCan(Number(this.can), this.method, memberIds)
const res = await api.paymentCan(Number(this.can), this.method, this.account_id)
if (res.status === 200 && res.data.success === true) {
this.notifySuccess('캔이 지급되었습니다.')
// 상태 초기화
this.selectedMembers = []
this.searchItems = []
this.searchQuery = ''
this.manualInput = ''
this.account_id = ''
this.method = ''
this.can = ''
this.is_loading = false

View File

@@ -21,7 +21,7 @@
<v-col>
<v-btn
block
color="#3bb9f1"
color="#9970ff"
dark
depressed
v-bind="attrs"
@@ -39,16 +39,16 @@
class="elevation-1"
hide-default-footer
>
<template v-slot:item.priceStr="{ item }">
{{ formatMoney(item.priceStr, item.currency) }}
<template v-slot:item.price="{ item }">
{{ item.price.toLocaleString('en-US') }}
</template>
<template v-slot:item.can="{ item }">
{{ formatNumber(item.can) }}
{{ item.can.toLocaleString('en-US') }}
</template>
<template v-slot:item.rewardCan="{ item }">
{{ formatNumber(item.rewardCan) }}
{{ item.rewardCan.toLocaleString('en-US') }}
</template>
<template v-slot:item.management="{ item }">
@@ -70,13 +70,7 @@
<v-card-text>
<v-text-field
v-model="price"
label="가격"
required
/>
<v-select
v-model="currency"
:items="currencies"
label="화폐 단위"
label="원화"
required
/>
</v-card-text>
@@ -131,17 +125,12 @@ export default {
price: null,
can: null,
reward_can: null,
currency: 'KRW',
currencies: [
{ text: 'KRW (한국 원)', value: 'KRW' },
{ text: 'USD (미국 달러)', value: 'USD' }
],
headers: [
{
text: '가격(VAT포함)',
text: '원화(VAT포함)',
align: 'center',
sortable: false,
value: 'priceStr',
value: 'price',
},
{
text: '충전캔',
@@ -184,26 +173,9 @@ export default {
this.can = null
this.price = null
this.reward_can = null
this.currency = 'KRW'
this.selected_can = null
},
formatMoney(priceStr, currencyCode, locale = navigator.language) {
const price = Number(priceStr);
const formatted = new Intl.NumberFormat(locale, {
style: 'currency',
currency: currencyCode
}).format(price);
return formatted.replace(/([^\d\s])(\d)/, '$1 $2');
},
formatNumber(num) {
return new Intl.NumberFormat(navigator.language, {
style: 'decimal'
}).format(num);
},
async getCans() {
this.isLoading = true
try {
@@ -232,14 +204,13 @@ export default {
async submit() {
this.isLoading = true
const res = await api.insertCan(this.can, this.reward_can, this.price, this.currency)
const res = await api.insertCan(this.can, this.reward_can, this.price)
if (res.status === 200 && res.data.success === true) {
this.show_dialog = false
this.can = null
this.price = null
this.reward_can = null
this.currency = 'KRW'
this.selected_can = null
this.notifySuccess(res.data.message || '등록되었습니다.')

View File

@@ -62,7 +62,7 @@
</template>
<template v-slot:item.chargeAmount="{ item }">
{{ formatMoney(item.chargeAmount, item.currency) }}
{{ item.chargeAmount.toLocaleString() }}
</template>
<template v-slot:item.locale="{ item }">
@@ -107,7 +107,7 @@
</template>
<template v-slot:item.amount="{ item }">
{{ formatMoney(item.amount, item.locale) }}
{{ item.amount.toLocaleString() }}
</template>
<template v-slot:item.datetime="{ item }">
@@ -204,12 +204,6 @@ export default {
sortable: false,
value: 'chargeCount',
},
{
text: '화폐단위',
align: 'center',
sortable: false,
value: 'currency',
},
{
text: 'PG',
sortable: false,
@@ -254,15 +248,6 @@ export default {
this.show_popup_dialog = false
},
formatMoney(price, currencyCode, locale = navigator.language) {
const formatted = new Intl.NumberFormat(locale, {
style: 'currency',
currency: currencyCode
}).format(price);
return formatted.replace(/([^\d\s])(\d)/, '$1 $2');
},
async getChargeStatus() {
this.is_loading = true
@@ -286,7 +271,7 @@ export default {
this.is_loading = true
try {
const res = await api.getChargeStatusDetail(value.date, value.pg, value.currency)
const res = await api.getChargeStatusDetail(value.date, value.pg)
if (res.status === 200 && res.data.success === true) {
this.detail_items = res.data.data
this.show_popup_dialog = true

View File

@@ -9,7 +9,7 @@
<br>
<v-container>
<v-row align="center">
<v-row>
<v-col cols="4">
<v-btn
color="primary"
@@ -19,29 +19,6 @@
캐릭터 추가
</v-btn>
</v-col>
<v-col
cols="8"
class="d-flex justify-end align-center"
>
<v-text-field
v-model="searchTerm"
label="검색어"
placeholder="캐릭터명, 태그, mbti 검색"
outlined
dense
hide-details
style="max-width: 320px;"
class="mr-2"
@keyup.enter="onSearch"
/>
<v-btn
:style="{ backgroundColor: '#3bb9f1', color: 'white' }"
:disabled="is_loading"
@click="onSearch"
>
검색
</v-btn>
</v-col>
</v-row>
<v-row>
<v-col>
@@ -267,7 +244,7 @@
</template>
<script>
import { getCharacterList, updateCharacter, searchCharacterList } from '@/api/character'
import { getCharacterList, updateCharacter } from '@/api/character'
export default {
name: "CharacterList",
@@ -283,8 +260,7 @@ export default {
page: 1,
total_page: 0,
characters: [],
selected_character: {},
searchTerm: ''
selected_character: {}
}
},
@@ -393,18 +369,10 @@ export default {
await this.getCharacters()
},
onSearch() {
this.page = 1;
this.getCharacters();
},
async getCharacters() {
this.is_loading = true
try {
const hasSearch = this.searchTerm && this.searchTerm.trim() !== '';
const response = hasSearch
? await searchCharacterList(this.searchTerm.trim(), this.page, 20)
: await getCharacterList(this.page);
const response = await getCharacterList(this.page);
if (response && response.status === 200) {
if (response.data.success === true) {

View File

@@ -44,9 +44,8 @@
</div>
<div>카테고리(장르): {{ detail.category || '-' }}</div>
<div>19 여부: {{ detail.isAdult ? '예' : '아니오' }}</div>
<div>원천 원작: {{ detail.originalWork || '-' }}</div>
<div class="mt-1">
원천 원작 링크:
<div>
원작 링크:
<a
v-if="detail.originalLink"
:href="detail.originalLink"
@@ -55,40 +54,6 @@
>{{ detail.originalLink }}</a>
<span v-else>-</span>
</div>
<div>/그림: {{ detail.writer || '-' }}</div>
<div>제작사: {{ detail.studio || '-' }}</div>
<div class="mt-1">
원작 링크:
<template v-if="detail.originalLinks && detail.originalLinks.length">
<div>
<div
v-for="(link, idx) in detail.originalLinks"
:key="idx"
>
<a
:href="link"
target="_blank"
rel="noopener"
>{{ link }}</a>
</div>
</div>
</template>
<span v-else>-</span>
</div>
<div class="mt-1">
태그:
<template v-if="detail.tags && detail.tags.length">
<v-chip
v-for="(t, i) in detail.tags"
:key="i"
small
class="mr-1 mb-1"
>
{{ t }}
</v-chip>
</template>
<span v-else>-</span>
</div>
<div class="mt-2">
작품 소개:
</div>

View File

@@ -93,42 +93,15 @@
</v-col>
</v-row>
<!-- 추가 메타 정보 (요구 순서: /그림, 제작사, 원천원작, 원천 원작 링크) -->
<v-row>
<v-col
cols="12"
md="6"
>
<v-text-field
v-model="form.writer"
label="글/그림"
outlined
dense
/>
</v-col>
<v-col
cols="12"
md="6"
>
<v-text-field
v-model="form.studio"
label="제작사"
outlined
dense
/>
</v-col>
</v-row>
<v-row>
<v-col
cols="12"
md="6"
>
<v-text-field
v-model="form.originalWork"
label="원천 원작"
outlined
dense
<v-switch
v-model="form.isAdult"
label="19금 여부"
inset
/>
</v-col>
<v-col
@@ -137,7 +110,7 @@
>
<v-text-field
v-model="form.originalLink"
label="원천 원작 링크"
label="원작 링크"
outlined
dense
:rules="originalLinkRules"
@@ -146,116 +119,6 @@
</v-col>
</v-row>
<v-row>
<v-col
cols="12"
md="12"
>
<v-switch
v-model="form.isAdult"
label="19금 여부"
inset
/>
</v-col>
</v-row>
<!-- 원작 링크(여러 ) 추가 -->
<v-row>
<v-col cols="12">
<v-divider class="my-4" />
<h3 class="mb-2">
원작 링크
</h3>
<v-row>
<v-col cols="11">
<v-text-field
v-model="newOriginalLink"
label="원작 링크 추가"
outlined
dense
@keyup.enter="addOriginalLink"
/>
</v-col>
<v-col cols="1">
<v-btn
color="primary"
class="mt-1"
block
:disabled="!newOriginalLink || !newOriginalLink.trim()"
@click="addOriginalLink"
>
추가
</v-btn>
</v-col>
</v-row>
<v-card
outlined
class="mt-2"
>
<v-list v-if="form.originalLinks && form.originalLinks.length > 0">
<v-list-item
v-for="(link, idx) in form.originalLinks"
:key="idx"
>
<v-list-item-content>
<v-list-item-title class="text-truncate">
{{ link }}
</v-list-item-title>
</v-list-item-content>
<v-list-item-action>
<v-btn
small
color="error"
@click="removeOriginalLink(idx)"
>
삭제
</v-btn>
</v-list-item-action>
</v-list-item>
</v-list>
<v-card-text
v-else
class="grey--text"
>
추가된 원작 링크가 없습니다.
</v-card-text>
</v-card>
</v-col>
</v-row>
<!-- 태그 -->
<v-row>
<v-col cols="12">
<v-divider class="my-4" />
<h3 class="mb-2">
태그
</h3>
<v-combobox
v-model="form.tags"
multiple
chips
small-chips
deletable-chips
outlined
dense
label="태그를 입력 후 엔터로 추가"
@keydown.space.prevent="onTagSpace"
>
<template v-slot:selection="{ attrs, item, select, selected }">
<v-chip
v-bind="attrs"
:input-value="selected"
close
@click="select"
@click:close="removeTag(item)"
>
{{ item }}
</v-chip>
</template>
</v-combobox>
</v-col>
</v-row>
<v-row>
<v-col cols="12">
<v-textarea
@@ -296,7 +159,6 @@ export default {
isEdit: false,
isFormValid: false,
previewImage: null,
newOriginalLink: '',
form: {
id: null,
image: null,
@@ -306,18 +168,13 @@ export default {
category: '',
isAdult: false,
description: '',
originalLink: '', // 원천 원작 링크(파라미터명 유지)
originalWork: '',
writer: '',
studio: '',
originalLinks: [], // 추가 원작 링크들
tags: []
originalLink: ''
},
originalInitial: null,
imageRules: [v => (this.isEdit ? true : (!!v || '이미지를 선택하세요'))],
contentTypeRules: [v => (this.isEdit ? true : (!!(v && v.toString().trim()) || '콘텐츠 타입은 필수입니다'))],
categoryRules: [v => (this.isEdit ? true : (!!(v && v.toString().trim()) || '카테고리는 필수입니다'))],
originalLinkRules: [v => (this.isEdit ? true : (!!(v && v.toString().trim()) || '원천 원작 링크는 필수입니다'))],
originalLinkRules: [v => (this.isEdit ? true : (!!(v && v.toString().trim()) || '원작 링크는 필수입니다'))],
descriptionRules: [v => (this.isEdit ? true : (!!(v && v.toString().trim()) || '작품 소개는 필수입니다'))]
}
},
@@ -327,11 +184,8 @@ export default {
},
hasNonImageChanges() {
if (!this.isEdit || !this.originalInitial) return false;
const fields = ['title', 'contentType', 'category', 'isAdult', 'description', 'originalLink', 'originalWork', 'writer', 'studio'];
const basicChanged = fields.some(f => this.form[f] !== this.originalInitial[f]);
const arraysChanged = !this.arraysEqual(this.form.originalLinks, this.originalInitial.originalLinks)
|| !this.arraysEqual(this.form.tags, this.originalInitial.tags);
return basicChanged || arraysChanged;
const fields = ['title', 'contentType', 'category', 'isAdult', 'description', 'originalLink'];
return fields.some(f => this.form[f] !== this.originalInitial[f]);
},
hasEditChanges() {
return this.imageChanged || this.hasNonImageChanges;
@@ -365,44 +219,6 @@ export default {
notifyError(message) { this.$dialog.notify.error(message) },
notifySuccess(message) { this.$dialog.notify.success(message) },
goBack() { this.$router.push('/original-work') },
arraysEqual(a, b) {
const arrA = Array.isArray(a) ? a : [];
const arrB = Array.isArray(b) ? b : [];
if (arrA.length !== arrB.length) return false;
for (let i = 0; i < arrA.length; i++) {
if (arrA[i] !== arrB[i]) return false;
}
return true;
},
addOriginalLink() {
if (!this.newOriginalLink || !this.newOriginalLink.trim()) return;
const val = this.newOriginalLink.trim();
if (!this.form.originalLinks) this.form.originalLinks = [];
if (!this.form.originalLinks.includes(val)) {
this.form.originalLinks.push(val);
}
this.newOriginalLink = '';
},
removeOriginalLink(index) {
if (!this.form.originalLinks) return;
this.form.originalLinks.splice(index, 1);
},
onTagSpace() {
// CharacterForm의 태그 방식과 유사: 마지막 항목을 공백 기준으로 확정
if (!Array.isArray(this.form.tags)) this.form.tags = [];
const last = this.form.tags[this.form.tags.length - 1];
if (typeof last === 'string' && last.trim()) {
let processed = last.trim().replace(/\s+/g, '');
if (processed.length > 50) processed = processed.substring(0, 50);
this.form.tags.splice(this.form.tags.length - 1, 1, processed);
this.$nextTick(() => this.form.tags.push(''));
}
},
removeTag(item) {
if (!Array.isArray(this.form.tags)) return;
const idx = this.form.tags.indexOf(item);
if (idx >= 0) this.form.tags.splice(idx, 1);
},
async load(id) {
try {
const res = await getOriginal(id);
@@ -417,12 +233,7 @@ export default {
category: d.category || '',
isAdult: !!d.isAdult,
description: d.description || '',
originalLink: d.originalLink || '',
originalWork: d.originalWork || '',
writer: d.writer || '',
studio: d.studio || '',
originalLinks: Array.isArray(d.originalLinks) ? d.originalLinks.slice() : [],
tags: Array.isArray(d.tags) ? d.tags.slice() : []
originalLink: d.originalLink || ''
}
this.originalInitial = {
id: d.id,
@@ -432,12 +243,7 @@ export default {
category: d.category || '',
isAdult: !!d.isAdult,
description: d.description || '',
originalLink: d.originalLink || '',
originalWork: d.originalWork || '',
writer: d.writer || '',
studio: d.studio || '',
originalLinks: Array.isArray(d.originalLinks) ? d.originalLinks.slice() : [],
tags: Array.isArray(d.tags) ? d.tags.slice() : []
originalLink: d.originalLink || ''
}
} else {
this.notifyError('상세 조회 실패');
@@ -455,7 +261,7 @@ export default {
}
if (this.isEdit) {
const fields = ['title', 'contentType', 'category', 'isAdult', 'description', 'originalLink', 'originalWork', 'writer', 'studio'];
const fields = ['title', 'contentType', 'category', 'isAdult', 'description', 'originalLink'];
const patch = { id: this.form.id };
if (this.originalInitial) {
fields.forEach(f => {
@@ -463,12 +269,6 @@ export default {
patch[f] = this.form[f];
}
});
if (!this.arraysEqual(this.form.originalLinks, this.originalInitial.originalLinks)) {
patch.originalLinks = this.form.originalLinks;
}
if (!this.arraysEqual(this.form.tags, this.originalInitial.tags)) {
patch.tags = this.form.tags;
}
}
const image = this.form.image || null;
if (Object.keys(patch).length === 1 && !image) {

View File

@@ -53,24 +53,6 @@
<template v-slot:item.communitySettlementRatio="{ item }">
{{ item.communitySettlementRatio }}%
</template>
<template v-slot:item.actions="{ item }">
<v-btn
small
color="primary"
text
@click="openEdit(item)"
>
수정
</v-btn>
<v-btn
small
color="red"
text
@click="confirmDelete(item)"
>
삭제
</v-btn>
</template>
</v-data-table>
</v-col>
</v-row>
@@ -91,20 +73,13 @@
persistent
>
<v-card>
<v-card-title>{{ is_edit ? '크리에이터 정산비율 수정' : '크리에이터 정산비율' }}</v-card-title>
<v-card-text v-show="!is_edit">
<v-card-title>크리에이터 정산비율</v-card-title>
<v-card-text>
<v-text-field
v-model="creator_settlement_ratio.creator_id"
label="크리에이터 번호"
/>
</v-card-text>
<v-card-text v-show="is_edit">
<v-text-field
v-model="creator_settlement_ratio.nickname"
disabled
label="크리에이터 닉네임"
/>
</v-card-text>
<v-card-text>
<v-text-field
v-model="creator_settlement_ratio.subsidy"
@@ -143,7 +118,7 @@
text
@click="validate"
>
{{ is_edit ? '수정하기' : '등록하기' }}
등록하기
</v-btn>
</v-card-actions>
</v-card>
@@ -167,8 +142,6 @@ export default {
items: [],
creator_settlement_ratio: {},
show_write_dialog: false,
is_edit: false,
editing_item_id: null,
headers: [
{
text: '닉네임',
@@ -200,12 +173,6 @@ export default {
sortable: false,
value: 'communitySettlementRatio',
},
{
text: '관리',
align: 'center',
sortable: false,
value: 'actions',
},
],
}
},
@@ -224,16 +191,11 @@ export default {
},
showWriteDialog() {
this.is_edit = false
this.editing_item_id = null
this.creator_settlement_ratio = {}
this.show_write_dialog = true
},
cancel() {
this.creator_settlement_ratio = {}
this.is_edit = false
this.editing_item_id = null
this.show_write_dialog = false
},
@@ -263,11 +225,7 @@ export default {
return
}
if (this.is_edit) {
this.updateCreatorSettlementRatio();
} else {
this.createCreatorSettlementRatio();
}
this.createCreatorSettlementRatio();
},
async createCreatorSettlementRatio() {
@@ -295,71 +253,6 @@ export default {
this.is_loading = false
},
async updateCreatorSettlementRatio() {
if (this.is_loading) return;
this.is_loading = true
try {
// 수정은 생성과 동일한 파라미터를 전송 (memberId 기준)
const payload = { ...this.creator_settlement_ratio }
const res = await api.updateCreatorSettlementRatio(payload)
if (res.status === 200 && res.data.success === true) {
this.cancel()
this.notifySuccess(res.data.message || '수정되었습니다.')
this.items = []
await this.getSettlementRatio()
} else {
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
}
} catch (e) {
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
} finally {
this.is_loading = false
}
},
openEdit(item) {
this.is_edit = true
this.editing_item_id = null
this.creator_settlement_ratio = {
creator_id: item.memberId,
nickname: item.nickname,
subsidy: item.subsidy,
liveSettlementRatio: item.liveSettlementRatio,
contentSettlementRatio: item.contentSettlementRatio,
communitySettlementRatio: item.communitySettlementRatio,
}
this.show_write_dialog = true
},
async confirmDelete(item) {
try {
const ok = await this.$dialog.confirm({ text: '삭제하시겠습니까?', title: '확인', actions: { false: '취소', true: '삭제' } })
if (!ok) return
} catch (e) {
// 일부 구현체는 confirm이 boolean이 아닌 경우가 있음
}
this.deleteCreatorSettlementRatio(item)
},
async deleteCreatorSettlementRatio(item) {
if (this.is_loading) return;
this.is_loading = true
try {
const memberId = item.memberId
const res = await api.deleteCreatorSettlementRatio(memberId)
if (res.status === 200 && res.data.success === true) {
this.notifySuccess(res.data.message || '삭제되었습니다.')
this.items = this.items.filter(x => (x.memberId) !== memberId)
} else {
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
}
} catch (e) {
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
} finally {
this.is_loading = false
}
},
async getSettlementRatio() {
this.is_loading = true
@@ -386,6 +279,10 @@ export default {
},
async next() {
if (this.search_word.length < 2) {
this.search_word = ''
}
await this.getSettlementRatio()
},
},

View File

@@ -1,529 +0,0 @@
<template>
<div>
<v-toolbar dark>
<v-btn
icon
@click="goBack"
>
<v-icon>mdi-arrow-left</v-icon>
</v-btn>
<v-spacer />
<v-toolbar-title>시리즈 배너 관리</v-toolbar-title>
<v-spacer />
</v-toolbar>
<v-container>
<v-row>
<v-col cols="4">
<v-btn
color="primary"
dark
@click="showAddDialog"
>
배너 추가
</v-btn>
</v-col>
<v-spacer />
</v-row>
<!-- 로딩 표시 -->
<v-row v-if="isLoading && banners.length === 0">
<v-col class="text-center">
<v-progress-circular
indeterminate
color="primary"
size="64"
/>
</v-col>
</v-row>
<!-- 배너 그리드 -->
<v-row>
<draggable
v-model="banners"
class="row"
style="width: 100%"
:options="{ animation: 150 }"
@end="onDragEnd"
>
<v-col
v-for="banner in banners"
:key="banner.id"
cols="12"
sm="6"
md="4"
lg="3"
class="banner-item"
>
<v-card
class="mx-auto"
max-width="300"
>
<v-img
:src="banner.imagePath || banner.imageUrl"
height="200"
contain
/>
<v-card-text class="text-center">
<div>{{ resolveSeriesTitle(banner) }}</div>
</v-card-text>
<v-card-actions>
<v-spacer />
<v-btn
small
color="primary"
@click="showEditDialog(banner)"
>
수정
</v-btn>
<v-btn
small
color="error"
@click="confirmDelete(banner)"
>
삭제
</v-btn>
<v-spacer />
</v-card-actions>
</v-card>
</v-col>
</draggable>
</v-row>
<!-- 데이터가 없을 표시 -->
<v-row v-if="!isLoading && banners.length === 0">
<v-col class="text-center">
<p>등록된 배너가 없습니다.</p>
</v-col>
</v-row>
<!-- 무한 스크롤 로딩 -->
<v-row v-if="isLoading && banners.length > 0">
<v-col class="text-center">
<v-progress-circular
indeterminate
color="primary"
/>
</v-col>
</v-row>
</v-container>
<!-- 배너 추가/수정 다이얼로그 -->
<v-dialog
v-model="showDialog"
max-width="600px"
persistent
>
<v-card>
<v-card-title>
<span class="headline">{{ isEdit ? '배너 수정' : '배너 추가' }}</span>
</v-card-title>
<v-card-text>
<v-container>
<v-row>
<v-col cols="12">
<v-file-input
v-model="bannerForm.image"
label="배너 이미지"
accept="image/*"
prepend-icon="mdi-camera"
show-size
truncate-length="15"
:rules="imageRules"
outlined
/>
</v-col>
</v-row>
<v-row v-if="previewImage || (isEdit && bannerForm.imageUrl)">
<v-col
cols="12"
class="text-center"
>
<v-img
:src="previewImage || bannerForm.imageUrl"
max-height="200"
contain
/>
</v-col>
</v-row>
<v-row>
<v-col cols="12">
<v-text-field
v-model="searchKeyword"
label="시리즈 검색"
outlined
@keyup.enter="searchSeries"
/>
</v-col>
</v-row>
<v-row v-if="searchResults.length > 0">
<v-col cols="12">
<v-list>
<v-list-item
v-for="series in searchResults"
:key="series.id"
@click="selectSeries(series)"
>
<v-list-item-avatar>
<v-img :src="series.imageUrl" />
</v-list-item-avatar>
<v-list-item-content>
<v-list-item-title>{{ series.title || series.name }}</v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-list>
</v-col>
</v-row>
<v-row v-if="searchPerformed && searchResults.length === 0">
<v-col cols="12">
<v-alert
type="info"
outlined
>
검색결과가 없습니다.
</v-alert>
</v-col>
</v-row>
<v-row v-if="selectedSeries">
<v-col cols="12">
<v-alert
type="info"
outlined
>
<v-row align="center">
<v-col cols="auto">
<v-avatar size="50">
<v-img :src="selectedSeries.imageUrl" />
</v-avatar>
</v-col>
<v-col>
<div class="font-weight-medium">
선택된 시리즈: {{ selectedSeries.title || selectedSeries.name }}
</div>
</v-col>
</v-row>
</v-alert>
</v-col>
</v-row>
</v-container>
</v-card-text>
<v-card-actions>
<v-spacer />
<v-btn
color="blue darken-1"
text
@click="closeDialog"
>
취소
</v-btn>
<v-btn
color="blue darken-1"
text
:disabled="!isFormValid || isSubmitting"
@click="saveBanner"
>
{{ isSubmitting ? '저장중...' : (isEdit ? '수정' : '추가') }}
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<!-- 삭제 확인 다이얼로그 -->
<v-dialog
v-model="showDeleteDialog"
max-width="400px"
>
<v-card>
<v-card-title class="headline">
삭제 확인
</v-card-title>
<v-card-text>
배너를 삭제하시겠습니까?
</v-card-text>
<v-card-actions>
<v-spacer />
<v-btn
color="blue darken-1"
text
@click="showDeleteDialog = false"
>
취소
</v-btn>
<v-btn
color="red darken-1"
text
:disabled="isSubmitting"
@click="deleteBanner"
>
삭제
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</div>
</template>
<script>
import draggable from 'vuedraggable'
import {
getSeriesBannerList,
createSeriesBanner,
updateSeriesBanner,
deleteSeriesBanner,
updateSeriesBannerOrder,
searchSeriesList
} from '@/api/audio_content_series'
export default {
name: 'ContentSeriesBanner',
components: { draggable },
data() {
return {
isLoading: false,
isSubmitting: false,
banners: [],
page: 1,
hasMoreItems: true,
showDialog: false,
showDeleteDialog: false,
isEdit: false,
selectedBanner: null,
selectedSeries: null,
searchKeyword: '',
searchResults: [],
searchPerformed: false,
previewImage: null,
bannerForm: {
image: null,
imageUrl: '',
seriesId: null,
bannerId: null
},
imageRules: [
v => !!v || this.isEdit || '이미지를 선택하세요'
]
}
},
computed: {
isFormValid() {
return (this.bannerForm.image || (this.isEdit && this.bannerForm.imageUrl)) && this.selectedSeries
}
},
watch: {
'bannerForm.image'(newImage) {
if (newImage) {
this.createImagePreview(newImage)
} else {
this.previewImage = null
}
}
},
mounted() {
this.loadBanners()
window.addEventListener('scroll', this.handleScroll)
},
beforeDestroy() {
window.removeEventListener('scroll', this.handleScroll)
},
methods: {
notifyError(message) {
this.$dialog && this.$dialog.notify && this.$dialog.notify.error ? this.$dialog.notify.error(message) : console.error(message)
},
notifySuccess(message) {
this.$dialog && this.$dialog.notify && this.$dialog.notify.success ? this.$dialog.notify.success(message) : console.log(message)
},
goBack() {
this.$router.push('/content/series/list')
},
resolveSeriesTitle(banner) {
return banner.seriesTitle || banner.seriesName || banner.title || banner.name || '시리즈'
},
async loadBanners() {
if (this.isLoading || !this.hasMoreItems) return
this.isLoading = true
try {
const response = await getSeriesBannerList(this.page)
if (response && response.status === 200 && response.data && response.data.success === true) {
const data = response.data.data
const newBanners = (data && (data.content || data.items || data)) || []
this.banners = [...this.banners, ...newBanners]
this.hasMoreItems = newBanners.length > 0
this.page++
} else {
this.notifyError('배너 목록을 불러오는데 실패했습니다.')
}
} catch (e) {
this.notifyError('배너 목록을 불러오는데 실패했습니다.')
} finally {
this.isLoading = false
}
},
handleScroll() {
const scrollPosition = window.innerHeight + window.scrollY
const documentHeight = document.documentElement.offsetHeight
if (scrollPosition >= documentHeight - 200 && !this.isLoading && this.hasMoreItems) {
this.loadBanners()
}
},
showAddDialog() {
this.isEdit = false
this.selectedSeries = null
this.bannerForm = { image: null, imageUrl: '', seriesId: null, bannerId: null }
this.previewImage = null
this.searchKeyword = ''
this.searchResults = []
this.searchPerformed = false
this.showDialog = true
},
showEditDialog(banner) {
this.isEdit = true
this.selectedBanner = banner
this.selectedSeries = {
id: banner.seriesId,
title: banner.seriesTitle || banner.seriesName || banner.title || banner.name,
imageUrl: banner.seriesImageUrl
}
this.bannerForm = {
image: null,
imageUrl: banner.imageUrl || banner.imagePath,
seriesId: banner.seriesId,
bannerId: banner.id
}
this.previewImage = null
this.searchKeyword = ''
this.searchResults = []
this.searchPerformed = false
this.showDialog = true
},
closeDialog() {
this.showDialog = false
this.selectedSeries = null
this.bannerForm = { image: null, imageUrl: '', seriesId: null, bannerId: null }
this.previewImage = null
this.searchKeyword = ''
this.searchResults = []
this.searchPerformed = false
},
confirmDelete(banner) {
this.selectedBanner = banner
this.showDeleteDialog = true
},
createImagePreview(file) {
if (!file) return
const reader = new FileReader()
reader.onload = (e) => {
this.previewImage = e.target.result
}
reader.readAsDataURL(file)
},
async searchSeries() {
if (!this.searchKeyword || this.searchKeyword.length < 2) {
this.notifyError('검색어를 2글자 이상 입력하세요.')
return
}
try {
const response = await searchSeriesList(this.searchKeyword)
if (response && response.status === 200 && response.data && response.data.success === true) {
const data = response.data.data
this.searchResults = Array.isArray(data) ? data : (data && (data.content || data.items)) || []
this.searchPerformed = true
}
} catch (error) {
console.error('시리즈 검색 오류:', error)
this.notifyError('시리즈 검색에 실패했습니다.')
}
},
selectSeries(series) {
this.selectedSeries = series
this.bannerForm.seriesId = series.id
this.searchResults = []
},
async saveBanner() {
if (!this.isFormValid || this.isSubmitting) return
this.isSubmitting = true
try {
if (this.isEdit) {
const response = await updateSeriesBanner({
image: this.bannerForm.image,
seriesId: this.selectedSeries.id,
bannerId: this.bannerForm.bannerId
})
if (response && response.status === 200 && response.data && response.data.success === true) {
this.notifySuccess('배너가 수정되었습니다.')
} else {
this.notifyError('배너 수정을 실패했습니다.')
}
} else {
const response = await createSeriesBanner({
image: this.bannerForm.image,
seriesId: this.selectedSeries.id
})
if (response && response.status === 200 && response.data && response.data.success === true) {
this.notifySuccess('배너가 추가되었습니다.')
this.closeDialog()
this.refreshBanners()
} else {
this.notifyError('배너 추가를 실패했습니다.')
}
}
} catch (error) {
console.error('배너 저장 오류:', error)
this.notifyError('배너 저장에 실패했습니다.')
} finally {
this.isSubmitting = false
}
},
async deleteBanner() {
if (!this.selectedBanner || this.isSubmitting) return
this.isSubmitting = true
try {
const response = await deleteSeriesBanner(this.selectedBanner.id)
if (response && response.status === 200 && response.data && response.data.success === true) {
this.notifySuccess('배너가 삭제되었습니다.')
this.showDeleteDialog = false
this.refreshBanners()
} else {
this.notifyError('배너 삭제에 실패했습니다.')
}
} catch (error) {
console.error('배너 삭제 오류:', error)
this.notifyError('배너 삭제에 실패했습니다.')
} finally {
this.isSubmitting = false
}
},
refreshBanners() {
this.banners = []
this.page = 1
this.hasMoreItems = true
this.loadBanners()
},
async onDragEnd() {
try {
const bannerIds = this.banners.map(banner => banner.id)
const response = await updateSeriesBannerOrder(bannerIds)
if (response && response.status === 200 && response.data && response.data.success === true) {
this.notifySuccess('배너 순서가 변경되었습니다.')
} else {
this.notifyError('배너 순서 변경에 실패했습니다.')
}
} catch (error) {
console.error('배너 순서 변경 오류:', error)
this.notifyError('배너 순서 변경에 실패했습니다.')
this.refreshBanners()
}
}
}
}
</script>
<style scoped>
.banner-item {
transition: all 0.3s;
}
.banner-item:hover {
transform: translateY(-5px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
</style>

View File

@@ -44,15 +44,9 @@
<th class="text-center">
연재여부
</th>
<th class="text-center">
연재요일
</th>
<th class="text-center">
19
</th>
<th class="text-center">
수정
</th>
</tr>
</thead>
<tbody>
@@ -79,20 +73,19 @@
<td>
<vue-show-more-text
:text="item.title"
:lines="2"
:lines="3"
/>
</td>
<td style="max-width: 200px !important; word-break:break-all; height: auto;">
<vue-show-more-text
:text="item.introduction"
:lines="2"
:lines="3"
/>
</td>
<td>{{ item.creatorNickname }}</td>
<td>{{ item.genre }}</td>
<td>{{ item.numberOfWorks }}</td>
<td>{{ item.state }}</td>
<td>{{ formatPublishedDays(item.publishedDaysOfWeek) }}</td>
<td>
<div v-if="item.isAdult">
O
@@ -101,17 +94,6 @@
X
</div>
</td>
<td class="text-center">
<v-btn
small
color="#3bb9f1"
dark
depressed
@click="openEditDialog(item)"
>
수정
</v-btn>
</td>
</tr>
</tbody>
</template>
@@ -129,165 +111,6 @@
</v-col>
</v-row>
</v-container>
<v-dialog
v-model="show_edit_dialog"
max-width="700px"
persistent
>
<v-card>
<v-card-title>
시리즈 수정
</v-card-title>
<v-card-text>
<v-row>
<v-col
cols="3"
class="text-center"
>
<v-img
:src="edit_target.coverImageUrl"
max-width="120"
max-height="120"
class="rounded-circle"
/>
</v-col>
<v-col cols="9">
<div style="font-weight:600;">
{{ edit_target.title }}
</div>
<div
v-if="edit_target.introduction"
style="max-height:80px; overflow:auto; word-break:break-all;"
>
{{ edit_target.introduction }}
</div>
</v-col>
</v-row>
<v-divider class="my-4" />
<v-row align="center">
<v-col
cols="4"
class="d-flex align-center"
>
장르
</v-col>
<v-col
cols="8"
class="d-flex align-center"
>
<v-select
v-model="edit_form.genreId"
:items="genre_list"
item-text="genre"
item-value="id"
:loading="is_loading_genres"
:disabled="is_saving || is_loading_genres"
label="장르를 선택하세요"
dense
hide-details
/>
</v-col>
</v-row>
<v-row align="center">
<v-col
cols="4"
class="d-flex align-center"
>
연재 요일
</v-col>
<v-col
cols="8"
class="d-flex align-center"
>
<v-row
dense
class="flex-grow-1"
>
<v-col
v-for="opt in daysOfWeekOptions"
:key="opt.value"
cols="6"
sm="4"
md="3"
class="py-0 my-0"
>
<v-checkbox
v-model="edit_form.publishedDaysOfWeek"
:label="opt.text"
:value="opt.value"
:disabled="is_saving"
dense
hide-details
class="ma-0 pa-0"
/>
</v-col>
</v-row>
</v-col>
</v-row>
<v-row align="center">
<v-col
cols="4"
class="d-flex align-center"
>
오리지널
</v-col>
<v-col
cols="8"
class="d-flex align-center"
>
<v-checkbox
v-model="edit_form.isOriginal"
:disabled="is_saving"
dense
hide-details
class="ma-0 pa-0"
/>
</v-col>
</v-row>
<v-row align="center">
<v-col
cols="4"
class="d-flex align-center"
>
19
</v-col>
<v-col
cols="8"
class="d-flex align-center"
>
<v-checkbox
v-model="edit_form.isAdult"
:disabled="is_saving"
dense
hide-details
class="ma-0 pa-0"
/>
</v-col>
</v-row>
</v-card-text>
<v-card-actions>
<v-spacer />
<v-btn
text
:disabled="is_saving"
@click="cancelEdit"
>
취소
</v-btn>
<v-btn
color="#3bb9f1"
dark
depressed
:loading="is_saving"
:disabled="is_saving"
@click="saveEdit"
>
저장
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</div>
</template>
@@ -307,52 +130,7 @@ export default {
page: 1,
total_page: 0,
total_count: 0,
series_list: [],
// 수정 다이얼로그 상태/데이터
show_edit_dialog: false,
is_saving: false,
is_loading_genres: false,
genre_list: [],
edit_target: {},
edit_form: {
genreId: null,
isOriginal: false,
isAdult: false,
publishedDaysOfWeek: []
},
daysOfWeekOptions: [
{ value: 'RANDOM', text: '랜덤' },
{ value: 'SUN', text: '일' },
{ value: 'MON', text: '월' },
{ value: 'TUE', text: '화' },
{ value: 'WED', text: '수' },
{ value: 'THU', text: '목' },
{ value: 'FRI', text: '금' },
{ value: 'SAT', text: '토' }
]
}
},
watch: {
'edit_form.publishedDaysOfWeek': {
handler(newVal, oldVal) {
if (!Array.isArray(newVal)) return;
const hasRandom = newVal.includes('RANDOM');
const hadRandom = Array.isArray(oldVal) && oldVal.includes('RANDOM');
const others = newVal.filter(v => v !== 'RANDOM');
// RANDOM과 특정 요일은 함께 설정될 수 없음
if (hasRandom && others.length > 0) {
if (hadRandom) {
// RANDOM 상태에서 다른 요일을 선택한 경우 → RANDOM 제거, 나머지만 유지
this.edit_form.publishedDaysOfWeek = others;
} else {
// 다른 요일이 선택된 상태에서 RANDOM을 선택한 경우 → RANDOM만 유지
this.edit_form.publishedDaysOfWeek = ['RANDOM'];
}
}
},
deep: true
series_list: []
}
},
@@ -369,19 +147,6 @@ export default {
this.$dialog.notify.success(message)
},
// 연재 요일 표시용 포맷터
formatPublishedDays(days) {
if (!Array.isArray(days) || days.length === 0) return '-'
// RANDOM 우선 처리
if (days.includes('RANDOM')) return '랜덤'
const map = this.daysOfWeekOptions.reduce((acc, cur) => {
acc[cur.value] = cur.text
return acc
}, {})
const labels = days.map(d => map[d] || d)
return labels.join(', ')
},
async getAudioContentSeries() {
this.is_loading = true
@@ -411,96 +176,6 @@ export default {
async next() {
await this.getAudioContentSeries()
},
openEditDialog(item) {
this.edit_target = item
this.show_edit_dialog = true
this.is_saving = false
this.loadGenresThenInit()
},
async loadGenresThenInit() {
try {
this.is_loading_genres = true
if (!this.genre_list || this.genre_list.length === 0) {
const res = await api.getAudioContentSeriesGenreList()
if (res.status === 200 && res.data.success === true) {
this.genre_list = res.data.data || []
} else {
this.notifyError(res.data.message || '장르 목록을 불러오지 못했습니다.')
}
}
} catch (e) {
this.notifyError('장르 목록을 불러오지 못했습니다. 다시 시도해 주세요.')
} finally {
this.is_loading_genres = false
this.initEditForm()
}
},
initEditForm() {
const item = this.edit_target || {}
let genreId = item.genreId || null
if (!genreId && item.genre && this.genre_list && this.genre_list.length > 0) {
const found = this.genre_list.find(g => g.genre === item.genre)
if (found) genreId = found.id
}
// 초기 publishedDaysOfWeek 정규화 (RANDOM과 특정 요일 혼재 금지)
let published = Array.isArray(item.publishedDaysOfWeek) ? [...item.publishedDaysOfWeek] : []
if (published.includes('RANDOM')) {
const others = published.filter(v => v !== 'RANDOM')
published = others.length > 0 ? ['RANDOM'] : ['RANDOM']
}
this.edit_form = {
genreId: genreId,
isOriginal: typeof item.isOriginal === 'boolean' ? item.isOriginal : false,
isAdult: typeof item.isAdult === 'boolean' ? item.isAdult : false,
publishedDaysOfWeek: published
}
},
cancelEdit() {
this.show_edit_dialog = false
this.edit_target = {}
this.edit_form = {
genreId: null,
isOriginal: false,
isAdult: false,
publishedDaysOfWeek: []
}
},
async saveEdit() {
if (this.is_saving) return
if (!this.edit_form.genreId) {
this.notifyError('장르를 선택해 주세요.')
return
}
this.is_saving = true
try {
const days = Array.isArray(this.edit_form.publishedDaysOfWeek) ? this.edit_form.publishedDaysOfWeek : []
const payloadDays = days.includes('RANDOM') ? ['RANDOM'] : days
const request = {
seriesId: this.edit_target.id,
genreId: this.edit_form.genreId,
isOriginal: this.edit_form.isOriginal,
isAdult: this.edit_form.isAdult,
publishedDaysOfWeek: payloadDays
}
const res = await api.updateAudioContentSeries(request)
if (res.status === 200 && res.data.success === true) {
this.notifySuccess('수정되었습니다.')
this.show_edit_dialog = false
await this.getAudioContentSeries()
} else {
this.notifyError(res.data.message || '수정에 실패했습니다. 다시 시도해 주세요.')
}
} catch (e) {
this.notifyError('수정에 실패했습니다. 다시 시도해 주세요.')
} finally {
this.is_saving = false
}
},
}
}
</script>