first commit
This commit is contained in:
74
src/api/audio_content.js
Normal file
74
src/api/audio_content.js
Normal file
@@ -0,0 +1,74 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
async function getAudioContentList(page) {
|
||||
return Vue.axios.get(
|
||||
"/admin/audio-content/list?page=" + (page - 1) +
|
||||
"&size=10"
|
||||
)
|
||||
}
|
||||
|
||||
async function searchAudioContent(searchWord, page){
|
||||
return Vue.axios.get(
|
||||
"/admin/audio-content/search?search_word=" + searchWord +
|
||||
"&page=" + (page - 1) +
|
||||
"&size=10"
|
||||
)
|
||||
}
|
||||
|
||||
async function modifyAudioContent(request) {
|
||||
return Vue.axios.put("/admin/audio-content", request)
|
||||
}
|
||||
|
||||
async function getBannerList() {
|
||||
return Vue.axios.get("/admin/audio-content/banner")
|
||||
}
|
||||
|
||||
async function saveBanner(formData) {
|
||||
return Vue.axios.post('/admin/audio-content/banner', formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async function modifyBanner(formData) {
|
||||
return Vue.axios.put('/admin/audio-content/banner', formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async function updateBannerOrders(ids) {
|
||||
return Vue.axios.put('/admin/audio-content/banner/orders', {ids: ids})
|
||||
}
|
||||
|
||||
async function getCurations() {
|
||||
return Vue.axios.get("/admin/audio-content/curation")
|
||||
}
|
||||
|
||||
async function saveCuration(request) {
|
||||
return Vue.axios.post("/admin/audio-content/curation", request)
|
||||
}
|
||||
|
||||
async function modifyCuration(request) {
|
||||
return Vue.axios.put("/admin/audio-content/curation", request)
|
||||
}
|
||||
|
||||
async function updateCurationOrders(ids) {
|
||||
return Vue.axios.put('/admin/audio-content/curation/orders', {ids: ids})
|
||||
}
|
||||
|
||||
export {
|
||||
getAudioContentList,
|
||||
searchAudioContent,
|
||||
modifyAudioContent,
|
||||
getBannerList,
|
||||
saveBanner,
|
||||
modifyBanner,
|
||||
updateBannerOrders,
|
||||
getCurations,
|
||||
saveCuration,
|
||||
modifyCuration,
|
||||
updateCurationOrders
|
||||
}
|
23
src/api/audio_content_theme.js
Normal file
23
src/api/audio_content_theme.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
async function enrollment(formData) {
|
||||
return Vue.axios.post('/admin/audio-content/theme', formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async function getThemes() {
|
||||
return Vue.axios.get('/admin/audio-content/theme');
|
||||
}
|
||||
|
||||
async function deleteTheme(themeId) {
|
||||
return Vue.axios.delete('/admin/audio-content/theme/' + themeId)
|
||||
}
|
||||
|
||||
async function updateThemeOrders(ids) {
|
||||
return Vue.axios.put('/admin/audio-content/theme/orders', { ids: ids })
|
||||
}
|
||||
|
||||
export { enrollment, getThemes, deleteTheme, updateThemeOrders }
|
7
src/api/calculate.js
Normal file
7
src/api/calculate.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
async function getCalculateCreator(startDate, endDate) {
|
||||
return Vue.axios.get('/admin/calculate/creator?startDateStr=' + startDate + '&endDateStr=' + endDate);
|
||||
}
|
||||
|
||||
export { getCalculateCreator }
|
17
src/api/charge_event.js
Normal file
17
src/api/charge_event.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
async function save(title, startDateString, endDateString, availableCount, addPercent) {
|
||||
const request = {title, startDateString, endDateString, availableCount, addPercent}
|
||||
return Vue.axios.post("/event/charge", request)
|
||||
}
|
||||
|
||||
async function modify(id, title, startDateString, endDateString, availableCount, addPercent, isActive) {
|
||||
const request = {id, title, startDateString, endDateString, availableCount, addPercent, isActive}
|
||||
return Vue.axios.put("/event/charge", request)
|
||||
}
|
||||
|
||||
async function getChargeEventList() {
|
||||
return Vue.axios.get('/event/charge/list')
|
||||
}
|
||||
|
||||
export {save, modify, getChargeEventList}
|
11
src/api/charge_status.js
Normal file
11
src/api/charge_status.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
async function getChargeStatus(startDate, endDate) {
|
||||
return Vue.axios.get('/admin/charge/status?startDateStr=' + startDate + '&endDateStr=' + endDate);
|
||||
}
|
||||
|
||||
async function getChargeStatusDetail(startDate, paymentGateway) {
|
||||
return Vue.axios.get('/admin/charge/status/detail?startDateStr=' + startDate + '&paymentGateway=' + paymentGateway);
|
||||
}
|
||||
|
||||
export { getChargeStatus, getChargeStatusDetail }
|
27
src/api/coin.js
Normal file
27
src/api/coin.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
async function deleteCoin(id) {
|
||||
return Vue.axios.delete('/coin/' + id);
|
||||
}
|
||||
|
||||
async function modifyCoin(id, coin, rewardCoin, price) {
|
||||
const request = {id: id, coin: coin, rewardCoin: rewardCoin, price: price}
|
||||
return Vue.axios.put('/coin', request);
|
||||
}
|
||||
|
||||
|
||||
async function getCoins() {
|
||||
return Vue.axios.get('/coin');
|
||||
}
|
||||
|
||||
async function insertCoin(coin, rewardCoin, price) {
|
||||
const request = {coin: coin, rewardCoin: rewardCoin, price: price}
|
||||
return Vue.axios.post('/coin', request);
|
||||
}
|
||||
|
||||
async function paymentCoin(coin, method, account_id) {
|
||||
const request = {accountId: account_id, method: method, coin: coin}
|
||||
return Vue.axios.post('/admin/coin/charge', request)
|
||||
}
|
||||
|
||||
export {getCoins, insertCoin, modifyCoin, deleteCoin, paymentCoin}
|
27
src/api/counselor_situation.js
Normal file
27
src/api/counselor_situation.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
async function createSituation(formData) {
|
||||
return Vue.axios.post('/recommend_situation', formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
async function getSituationList() {
|
||||
return Vue.axios.get('/recommend_situation/admin')
|
||||
}
|
||||
|
||||
async function modifySituation(id, formData) {
|
||||
return Vue.axios.put('/recommend_situation/' + id, formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
async function deleteSituation(id) {
|
||||
return Vue.axios.delete('/recommend_situation/' + id)
|
||||
}
|
||||
|
||||
export { createSituation, getSituationList, modifySituation, deleteSituation }
|
31
src/api/counselor_tag.js
Normal file
31
src/api/counselor_tag.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
async function enrollment(formData) {
|
||||
return Vue.axios.post('/account/counselor/tag', formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async function getTags() {
|
||||
return Vue.axios.get('/account/counselor/tag');
|
||||
}
|
||||
|
||||
async function deleteTag(tagId) {
|
||||
return Vue.axios.delete('/account/counselor/tag/' + tagId)
|
||||
}
|
||||
|
||||
async function modifyTag(tagId, formData) {
|
||||
return Vue.axios.put('/account/counselor/tag/' + tagId, formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
async function updateTagOrders(ids) {
|
||||
return Vue.axios.put('/account/counselor/tag/orders', { ids: ids })
|
||||
}
|
||||
|
||||
export { enrollment, getTags, deleteTag, modifyTag, updateTagOrders }
|
27
src/api/event.js
Normal file
27
src/api/event.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
async function save(formData) {
|
||||
return Vue.axios.post('/event', formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async function modify(formData) {
|
||||
return Vue.axios.put('/event', formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async function deleteEvent(id) {
|
||||
return Vue.axios.delete("/event/" + id)
|
||||
}
|
||||
|
||||
async function getEvents() {
|
||||
return Vue.axios.get("/event")
|
||||
}
|
||||
|
||||
export {save, modify, deleteEvent, getEvents}
|
19
src/api/explorer.js
Normal file
19
src/api/explorer.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
async function getExplorerSections(page) {
|
||||
return Vue.axios.get("/admin/explorer?page=" + (page - 1) + "&size=20");
|
||||
}
|
||||
|
||||
async function updateExplorerSectionsOrders(firstOrders, ids) {
|
||||
return Vue.axios.put('/admin/explorer/orders', { firstOrders: firstOrders, ids: ids })
|
||||
}
|
||||
|
||||
async function createExplorerSection(item) {
|
||||
return Vue.axios.post("/admin/explorer", item);
|
||||
}
|
||||
|
||||
async function updateExplorerSection(item) {
|
||||
return Vue.axios.put("/admin/explorer", item)
|
||||
}
|
||||
|
||||
export { createExplorerSection, updateExplorerSection, getExplorerSections, updateExplorerSectionsOrders }
|
24
src/api/faq.js
Normal file
24
src/api/faq.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
async function save(question, answer, category) {
|
||||
const request = {question: question, answer: answer, category: category}
|
||||
return Vue.axios.post("/faq", request)
|
||||
}
|
||||
|
||||
async function modify(request) {
|
||||
return Vue.axios.put("/faq", request)
|
||||
}
|
||||
|
||||
async function deleteFaq(id) {
|
||||
return Vue.axios.delete("/faq/" + id)
|
||||
}
|
||||
|
||||
async function getFaqs(category) {
|
||||
return Vue.axios.get("/faq?category=" + category)
|
||||
}
|
||||
|
||||
async function getCategories() {
|
||||
return Vue.axios.get("/faq/category")
|
||||
}
|
||||
|
||||
export {save, modify, deleteFaq, getCategories, getFaqs}
|
73
src/api/firebase_dynamic_link.js
Normal file
73
src/api/firebase_dynamic_link.js
Normal file
@@ -0,0 +1,73 @@
|
||||
import axios from "axios";
|
||||
|
||||
const url = "https://firebasedynamiclinks.googleapis.com/v1/shortLinks?key=AIzaSyAOY4pgYs2swcllYCWjJF3bZUkNC6LWPqI"
|
||||
|
||||
async function shareCreatorChannel(channelInfo, utmSource, utmMedium, utmCampaign) {
|
||||
const data = {
|
||||
"dynamicLinkInfo": {
|
||||
"domainUriPrefix": "https://yozm.page.link",
|
||||
"link": "https://yozm.day/?channel_id=" + channelInfo.id,
|
||||
"androidInfo": {
|
||||
"androidPackageName": "kr.co.vividnext.sodalive",
|
||||
},
|
||||
"iosInfo": {
|
||||
"iosBundleId": "kr.co.vividnext.yozm",
|
||||
"iosAppStoreId": "1630284226"
|
||||
},
|
||||
"analyticsInfo": {
|
||||
"googlePlayAnalytics": {
|
||||
"utmSource": utmSource,
|
||||
"utmMedium": utmMedium,
|
||||
"utmCampaign": utmCampaign,
|
||||
},
|
||||
},
|
||||
"socialMetaTagInfo": {
|
||||
"socialTitle": "요즘라이브",
|
||||
"socialDescription": "요즘라이브 " + channelInfo.nickname + "님의 채널입니다.",
|
||||
"socialImageLink": channelInfo.profileUrl
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return axios.post(url, data, {
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async function shareAudioContent(audioContent, utmSource, utmMedium, utmCampaign) {
|
||||
const data = {
|
||||
"dynamicLinkInfo": {
|
||||
"domainUriPrefix": "https://yozm.page.link",
|
||||
"link": "https://yozm.day/?audio_content_id=" + audioContent.audioContentId,
|
||||
"androidInfo": {
|
||||
"androidPackageName": "kr.co.vividnext.yozm",
|
||||
},
|
||||
"iosInfo": {
|
||||
"iosBundleId": "kr.co.vividnext.yozm",
|
||||
"iosAppStoreId": "1630284226"
|
||||
},
|
||||
"analyticsInfo": {
|
||||
"googlePlayAnalytics": {
|
||||
"utmSource": utmSource,
|
||||
"utmMedium": utmMedium,
|
||||
"utmCampaign": utmCampaign,
|
||||
},
|
||||
},
|
||||
"socialMetaTagInfo": {
|
||||
"socialTitle": audioContent.title + " - " + audioContent.creatorNickname,
|
||||
"socialDescription": "지금 요즘라이브에서 이 콘텐츠 감상하기",
|
||||
"socialImageLink": audioContent.coverImageUrl
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return axios.post(url, data, {
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export { shareCreatorChannel, shareAudioContent }
|
7
src/api/live.js
Normal file
7
src/api/live.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
async function getLive() {
|
||||
return Vue.axios.get('/admin/live')
|
||||
}
|
||||
|
||||
export { getLive }
|
31
src/api/live_tag.js
Normal file
31
src/api/live_tag.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
async function enrollment(formData) {
|
||||
return Vue.axios.post('/suda/tag', formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async function getTags() {
|
||||
return Vue.axios.get('/suda/tag');
|
||||
}
|
||||
|
||||
async function deleteTag(tagId) {
|
||||
return Vue.axios.delete('/suda/tag/' + tagId)
|
||||
}
|
||||
|
||||
async function modifyTag(tagId, formData) {
|
||||
return Vue.axios.put('/suda/tag/' + tagId, formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
async function updateTagOrders(ids) {
|
||||
return Vue.axios.put('/suda/tag/orders', { ids: ids })
|
||||
}
|
||||
|
||||
export { enrollment, getTags, deleteTag, modifyTag, updateTagOrders }
|
53
src/api/member.js
Normal file
53
src/api/member.js
Normal file
@@ -0,0 +1,53 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
async function login(email, password) {
|
||||
return Vue.axios.post('/member/login', {
|
||||
email,
|
||||
password,
|
||||
isAdmin: true,
|
||||
});
|
||||
}
|
||||
|
||||
async function getAccountList(page) {
|
||||
return Vue.axios.get(
|
||||
"/admin/account/list?page=" + (page - 1) +
|
||||
"&size=20"
|
||||
)
|
||||
}
|
||||
|
||||
async function searchAccount(searchWord, page) {
|
||||
return Vue.axios.get(
|
||||
"/admin/account/search?search_word=" + searchWord +
|
||||
"&page=" + (page - 1) +
|
||||
"&size=20"
|
||||
)
|
||||
}
|
||||
|
||||
async function getCreatorAccountList(page) {
|
||||
return Vue.axios.get(
|
||||
"/admin/account/creator/list?page=" + (page - 1) +
|
||||
"&size=20"
|
||||
)
|
||||
}
|
||||
|
||||
async function searchCreatorAccount(searchWord, page) {
|
||||
return Vue.axios.get(
|
||||
"/admin/account/creator/search?search_word=" + searchWord +
|
||||
"&page=" + (page - 1) +
|
||||
"&size=20"
|
||||
)
|
||||
}
|
||||
|
||||
async function updateAccount(id, user_type) {
|
||||
const request = {id, userType: user_type}
|
||||
return Vue.axios.put("/admin/account", request)
|
||||
}
|
||||
|
||||
export {
|
||||
login,
|
||||
getAccountList,
|
||||
searchAccount,
|
||||
getCreatorAccountList,
|
||||
searchCreatorAccount,
|
||||
updateAccount
|
||||
}
|
7
src/api/menu.js
Normal file
7
src/api/menu.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
async function getMenus() {
|
||||
return Vue.axios.get("/menu");
|
||||
}
|
||||
|
||||
export { getMenus }
|
34
src/api/notice.js
Normal file
34
src/api/notice.js
Normal file
@@ -0,0 +1,34 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
async function save(title, content) {
|
||||
const request = {title: title, content: content}
|
||||
return Vue.axios.post("/notice", request)
|
||||
}
|
||||
|
||||
async function modify(id, title, content) {
|
||||
const request = {id: id}
|
||||
|
||||
if (title.trim().length > 0) {
|
||||
request.title = title
|
||||
}
|
||||
|
||||
if (content.trim().length > 0) {
|
||||
request.content = content
|
||||
}
|
||||
|
||||
return Vue.axios.put("/notice", request)
|
||||
}
|
||||
|
||||
async function deleteNotice(id) {
|
||||
return Vue.axios.delete("/notice/" + id)
|
||||
}
|
||||
|
||||
async function getNotices(page) {
|
||||
return Vue.axios.get(
|
||||
"/notice?page=" + (page - 1) +
|
||||
"&size=20" +
|
||||
"&timezone=" + Intl.DateTimeFormat().resolvedOptions().timeZone
|
||||
)
|
||||
}
|
||||
|
||||
export {save, modify, deleteNotice, getNotices}
|
11
src/api/push.js
Normal file
11
src/api/push.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
async function sendPush(accountIds, title, message) {
|
||||
return Vue.axios.post('/push', {
|
||||
accountIds,
|
||||
title,
|
||||
message
|
||||
})
|
||||
}
|
||||
|
||||
export { sendPush }
|
15
src/api/recommend_counselor.js
Normal file
15
src/api/recommend_counselor.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
async function addRecommendCounselor(id) {
|
||||
return Vue.axios.post('/recommend_counselor', { id });
|
||||
}
|
||||
|
||||
async function getRecommendCounselorList() {
|
||||
return Vue.axios.get('/recommend_counselor/admin');
|
||||
}
|
||||
|
||||
async function deleteRecommendCounselor(id) {
|
||||
return Vue.axios.delete('/recommend_counselor/' + id);
|
||||
}
|
||||
|
||||
export { addRecommendCounselor, getRecommendCounselorList, deleteRecommendCounselor }
|
27
src/api/recommend_suda_creator.js
Normal file
27
src/api/recommend_suda_creator.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
async function createRecommendSudaCreator(formData) {
|
||||
return Vue.axios.post('/admin/suda/recommend-suda-creator', formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async function updateRecommendSudaCreator(formData) {
|
||||
return Vue.axios.put('/admin/suda/recommend-suda-creator', formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async function updateRecommendSudaCreatorOrders(firstOrders, ids) {
|
||||
return Vue.axios.put('/admin/suda/recommend-suda-creator/orders', { firstOrders: firstOrders, ids: ids })
|
||||
}
|
||||
|
||||
async function getRecommendSudaCreator(page) {
|
||||
return Vue.axios.get("/admin/suda/recommend-suda-creator?page=" + (page - 1) + "&size=20");
|
||||
}
|
||||
|
||||
export { createRecommendSudaCreator, updateRecommendSudaCreator, updateRecommendSudaCreatorOrders, getRecommendSudaCreator };
|
16
src/api/stplat.js
Normal file
16
src/api/stplat.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
async function getTermsOfService() {
|
||||
return Vue.axios.get("/stplat/terms_of_service")
|
||||
}
|
||||
|
||||
async function getPrivacyPolicy() {
|
||||
return Vue.axios.get("/stplat/privacy_policy")
|
||||
}
|
||||
|
||||
async function modify(id, description) {
|
||||
const request = { id, description }
|
||||
return Vue.axios.post("/stplat/modify", request)
|
||||
}
|
||||
|
||||
export { getTermsOfService, getPrivacyPolicy, modify }
|
Reference in New Issue
Block a user