diff --git a/api/newFun.js b/api/newFun.js index e28bbb2..56f6253 100644 --- a/api/newFun.js +++ b/api/newFun.js @@ -207,4 +207,8 @@ export const addTransfer = (param) => { // 记录编辑---店长 export const editTransfer = (param) => { return request.post('order/editTransfer', param) +} +// 数据统计 +export const statistics = (param) => { + return request.post('data/statistics', param) } \ No newline at end of file diff --git a/pages/news/user/report.vue b/pages/news/user/report.vue index 03f200b..07bdea7 100644 --- a/pages/news/user/report.vue +++ b/pages/news/user/report.vue @@ -131,7 +131,7 @@ 累计佣金已结算金额{{infor.commissionData.settleTotalMoney}} - 累计佣金结算金额{{infor.commissionData.nosettleTotalMoney}} + 累计佣金结算金额{{infor.commissionData.noSettleTotalMoney}} @@ -157,38 +157,15 @@ endTime: '', recentDate: '', infor: { - orderData: { - orderMoney: 135, - orderCount: 362, - orderPayUser: 324, - orderCostMoney: 475, - orderInterest: 50, - payMemberCount: 60, - payDealerCount: 83, - }, - refundData: { - refundCount: 350, - refundTotalMoney: 240, - }, - userData: { - visitorCount: 240, - viewCount: 750, - newUserCount: 120, - }, - commissionData: { - settleTotalMoney: 290, - nosettleTotalMoney: 345, - } + orderData: {}, + refundData: {}, + userData: {}, + commissionData: {} } } }, onLoad() { this.getNumberPages() - var yesterday = this.getDay(-1) - var th_7 = this.getDay(-7); - var th_15 = this.getDay(-15) - var th_30 = this.getDay(-30) - console.log(yesterday, th_7, th_15, th_30) }, methods: { @@ -207,10 +184,12 @@ if (this.dateIndex == 3) { day = -30 } - this.recentDate = this.getDay(day); - console.log(this.recentDate) + this.startTime = this.getDay(day); + this.endTime = this.getDay(0) + }, + quantityFilter() { + this.getNumberPages() }, - quantityFilter() {}, getTime(e) { this.startTime = e.startDate; this.endTime = e.endDate; @@ -224,10 +203,12 @@ getNumberPages() { const that = this return new Promise((resolve, reject) => { - newFunApi.addressList({ - user_id: 10006 + newFunApi.statistics({ + startDate: this.startTime, + endDate: this.endTime }) .then(result => { + this.infor = result.data.data console.log(result) }) .catch(reject) @@ -252,20 +233,6 @@ } return m; }, - // getDate(type) { - // const date = new Date(); - // let year = date.getFullYear(); - // let month = date.getMonth() + 1; - // let day = date.getDate(); - // if (type === 'start') { - // year = year - 60; - // } else if (type === 'end') { - // year = year + 2; - // } - // month = month > 9 ? month : '0' + month; - // day = day > 9 ? day : '0' + day; - // return `${year}-${month}-${day}`; - // } } }