Compare commits

..

No commits in common. "397fd267e0a64a651b730837bc157e2febd786a9" and "fe4b88350b4a4d8cddb562ec0920250a991f69dd" have entirely different histories.

2 changed files with 3 additions and 72 deletions

View File

@ -12,8 +12,8 @@ async function getMediaPartnerList(page) {
return Vue.axios.get("/admin/marketing/media-partner?page=" + (page - 1) + "&size=20") return Vue.axios.get("/admin/marketing/media-partner?page=" + (page - 1) + "&size=20")
} }
async function getStatistics(startDate, endDate, page) { async function getStatistics(page) {
return Vue.axios.get("/admin/marketing/statistics?startDateStr=" + startDate + "&endDateStr=" + endDate + "&page=" + (page - 1) + "&size=20") return Vue.axios.get("/admin/marketing/statistics?page=" + (page - 1) + "&size=20")
} }
export { export {

View File

@ -9,42 +9,6 @@
<br> <br>
<v-container> <v-container>
<v-row>
<v-spacer />
<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="#3bb9f1"
dark
depressed
@click="getStatistics"
>
조회
</v-btn>
</v-col>
</v-row>
<v-row> <v-row>
<v-col> <v-col>
<v-data-table <v-data-table
@ -60,7 +24,6 @@
<td colspan="4"> <td colspan="4">
총합계 총합계
</td> </td>
<td>{{ sumField('loginCount').toLocaleString() }}</td>
<td>{{ sumField('signUpCount').toLocaleString() }}</td> <td>{{ sumField('signUpCount').toLocaleString() }}</td>
<td>{{ sumField('firstPaymentCount').toLocaleString() }}</td> <td>{{ sumField('firstPaymentCount').toLocaleString() }}</td>
<td>{{ sumField('firstPaymentTotalAmount').toLocaleString() }}</td> <td>{{ sumField('firstPaymentTotalAmount').toLocaleString() }}</td>
@ -87,10 +50,6 @@
{{ item.pidName }} {{ item.pidName }}
</template> </template>
<template v-slot:item.loginCount="{ item }">
{{ item.loginCount.toLocaleString() }}
</template>
<template v-slot:item.signUpCount="{ item }"> <template v-slot:item.signUpCount="{ item }">
{{ item.signUpCount.toLocaleString() }} {{ item.signUpCount.toLocaleString() }}
</template> </template>
@ -137,17 +96,13 @@
<script> <script>
import * as api from "@/api/marketing"; import * as api from "@/api/marketing";
import datetime from "vuejs-datetimepicker";
export default { export default {
name: 'MarketingAdStatisticsView', name: 'MarketingAdStatisticsView',
components: {datetime},
data() { data() {
return { return {
is_loading: false, is_loading: false,
start_date: null,
end_date: null,
page: 1, page: 1,
total_page: 0, total_page: 0,
@ -176,12 +131,6 @@ export default {
sortable: false, sortable: false,
value: 'pidName', value: 'pidName',
}, },
{
text: '로그인 수',
align: 'center',
sortable: false,
value: 'loginCount',
},
{ {
text: '가입수', text: '가입수',
align: 'center', align: 'center',
@ -230,24 +179,6 @@ export default {
}, },
async created() { 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.getStatistics() await this.getStatistics()
}, },
@ -272,7 +203,7 @@ export default {
this.is_loading = true this.is_loading = true
try { try {
const res = await api.getStatistics(this.start_date, this.end_date, this.page); const res = await api.getStatistics(this.page);
if (res.status === 200 && res.data.success === true) { if (res.status === 200 && res.data.success === true) {
let data = res.data.data let data = res.data.data