72 lines
2.6 KiB
JavaScript
72 lines
2.6 KiB
JavaScript
import Vue from 'vue';
|
|
|
|
async function getCalculateLive(startDate, endDate) {
|
|
return Vue.axios.get('/admin/calculate/live?startDateStr=' + startDate + '&endDateStr=' + endDate);
|
|
}
|
|
|
|
async function getCalculateContent(startDate, endDate) {
|
|
return Vue.axios.get('/admin/calculate/content-list?startDateStr=' + startDate + '&endDateStr=' + endDate);
|
|
}
|
|
|
|
async function getCumulativeSalesByContent(page, size) {
|
|
return Vue.axios.get('/admin/calculate/cumulative-sales-by-content?page=' + (page - 1) + "&size=" + size);
|
|
}
|
|
|
|
async function getCalculateContentDonation(startDate, endDate) {
|
|
return Vue.axios.get('/admin/calculate/content-donation-list?startDateStr=' + startDate + '&endDateStr=' + endDate);
|
|
}
|
|
|
|
async function getCalculateCommunityPost(startDate, endDate, page, size) {
|
|
return Vue.axios.get(
|
|
'/admin/calculate/community-post?startDateStr=' +
|
|
startDate + '&endDateStr=' + endDate + "&page=" + (page - 1) + "&size=" + size
|
|
);
|
|
}
|
|
|
|
async function getSettlementRatio(page) {
|
|
return Vue.axios.get('/admin/calculate/ratio?page=' + (page - 1) + "&size=20'");
|
|
}
|
|
|
|
async function createCreatorSettlementRatio(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", request)
|
|
}
|
|
|
|
async function getCalculateLiveByCreator(startDate, endDate, page, size) {
|
|
return Vue.axios.get('/admin/calculate/live-by-creator?startDateStr=' +
|
|
startDate + '&endDateStr=' + endDate + '&page=' + (page - 1) + '&size=' + size
|
|
)
|
|
}
|
|
|
|
async function getCalculateContentByCreator(startDate, endDate, page, size) {
|
|
return Vue.axios.get('/admin/calculate/content-by-creator?startDateStr=' +
|
|
startDate + '&endDateStr=' + endDate + '&page=' + (page - 1) + '&size=' + size
|
|
)
|
|
}
|
|
|
|
async function getCalculateCommunityByCreator(startDate, endDate, page, size) {
|
|
return Vue.axios.get('/admin/calculate/community-by-creator?startDateStr=' +
|
|
startDate + '&endDateStr=' + endDate + '&page=' + (page - 1) + '&size=' + size
|
|
)
|
|
}
|
|
|
|
export {
|
|
getCalculateLive,
|
|
getCalculateContent,
|
|
getCumulativeSalesByContent,
|
|
getCalculateContentDonation,
|
|
getCalculateCommunityPost,
|
|
getSettlementRatio,
|
|
createCreatorSettlementRatio,
|
|
getCalculateLiveByCreator,
|
|
getCalculateContentByCreator,
|
|
getCalculateCommunityByCreator
|
|
}
|