diff --git a/mock/apiDemo/statistics.ts b/mock/apiDemo/statistics.ts index 589f63c4..c7b94ad9 100644 --- a/mock/apiDemo/statistics.ts +++ b/mock/apiDemo/statistics.ts @@ -29,7 +29,29 @@ export default [ yesterdayTotal: Math.floor(Math.random() * 1000000) / 100, }, }, - '登录成功', + '获取成功', + ); + }, + }, + { + url: '/api/statistics/chart', // + method: 'get', + timeout: 500 + Math.floor(Math.random() * 1000), + response: () => { + return success( + { + view: { + PV: [300, 500, 800, 900, 3000, 3500, 4000, 5000, 4000, 2800, 1000], //合计 + UV: [8, 16, 39, 42, 156, 160, 153, 200, 148, 140, 43], //昨日新增 + }, + origion: [1048, 735, 580, 484, 300], + allocation: [1048, 735, 580, 484, 300], + orderDistribution: { + new: [4200, 3000, 20000, 35000, 50000], + old: [5000, 14000, 28000, 26000, 42000], + }, + }, + '获取成功', ); }, }, diff --git a/src/views/dashboard/components/charts.vue b/src/views/dashboard/components/charts.vue index e291154e..3c7506a1 100644 --- a/src/views/dashboard/components/charts.vue +++ b/src/views/dashboard/components/charts.vue @@ -1,21 +1,21 @@