diff --git a/src/api/dashboard.js b/src/api/dashboard.js index ba8ceea..574bb0f 100644 --- a/src/api/dashboard.js +++ b/src/api/dashboard.js @@ -1,16 +1,33 @@ import request from '@/utils/request' + -export function getCounts() { +export function getcustomerData(params) { return request({ - url: '/api/admin/get-counts', - method: 'get' + url: '/api/admin/home/customer', + method: 'get', + params: params }) -} - - -export function getChartsData(params) { +} +export function getorderData(params) { + return request({ + url: '/api/admin/home/order', + method: 'get', + params: params + }) +} + + +export function getcustomeritemData(params) { + return request({ + url: '/api/admin/home/customer-item', + method: 'get', + params: params + }) +} + +export function getorderitemData(params) { return request({ - url: '/api/admin/get-charts-data', + url: '/api/admin/home/order-item', method: 'get', params: params }) diff --git a/src/views/dashboard/components/BarChart.vue b/src/views/dashboard/components/BarChart.vue new file mode 100644 index 0000000..199f14c --- /dev/null +++ b/src/views/dashboard/components/BarChart.vue @@ -0,0 +1,146 @@ + + + + + + diff --git a/src/views/dashboard/components/LineChart.vue b/src/views/dashboard/components/LineChart.vue new file mode 100644 index 0000000..73ffc34 --- /dev/null +++ b/src/views/dashboard/components/LineChart.vue @@ -0,0 +1,143 @@ + + + + + + diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue new file mode 100644 index 0000000..cf270bb --- /dev/null +++ b/src/views/dashboard/components/PanelGroup.vue @@ -0,0 +1,396 @@ + + + + + + + + 订单统计 + + + 当日下单/取消 + + + + + + + 支付: + {{totaldata.order.order_list.total.order_date.paid}} + + + + + + + + 退款: + {{totaldata.order.order_list.total.order_date.refunded}} + + + + + + 当月下单/取消 + + + + + + 支付: + {{totaldata.order.order_list.total.order_month.paid}} + + + + + + + 退款: + {{totaldata.order.order_list.total.order_month.refunded}} + + + + + + + + + 客户数量 + + + + 总注册数 / 总手机号授权 + + + + + + + + + + + + + + + + 今日注册 / 手机号授权 + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/dashboard/components/PieChart.vue b/src/views/dashboard/components/PieChart.vue new file mode 100644 index 0000000..3979b90 --- /dev/null +++ b/src/views/dashboard/components/PieChart.vue @@ -0,0 +1,163 @@ + + + + + + diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index dde336e..43dfc0a 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -1,24 +1,148 @@ - - + + + + + + + + + + + 客户与订单 + + + + + + + + + + + - -