diff --git a/mock/app.js b/mock/app.js
index 7eba2a4..3f16805 100644
--- a/mock/app.js
+++ b/mock/app.js
@@ -16,7 +16,6 @@ let dataKey = mockStorge('AdminUsers',[
}
])
-console.log(global[dataKey]);
module.exports = {
'POST /api/login' (req, res) {
diff --git a/mock/dashboard.js b/mock/dashboard.js
index ae167f4..8eec901 100644
--- a/mock/dashboard.js
+++ b/mock/dashboard.js
@@ -3,8 +3,27 @@ const Mock = require('mockjs')
const Watch = require("watchjs")
import mockStorge from '../src/utils/mockStorge'
-console.log(mockStorge);
+
+let dataKey = mockStorge('Dashboard',Mock.mock({
+ 'sales|16': [
+ {
+ 'name|+1': 2000,
+ 'Clothes|200-500': 1,
+ 'Food|180-700': 1,
+ 'Electronics|300-850': 1,
+ }
+ ],
+ quote:{
+ name: 'Joho Doe',
+ title: 'Graphic Designer',
+ content: `I'm selfish, impatient and a little insecure. I make mistakes, I am out of control and at times hard to handle. But if you can't handle me at my worst, then you sure as hell don't deserve me at my best.`,
+ avatar: 'http://img.hb.aicdn.com/bc442cf0cc6f7940dcc567e465048d1a8d634493198c4-sPx5BR_fw236'
+ },
+}))
module.exports = {
-
+ 'GET /api/dashboard' (req, res) {
+ console.log(global[dataKey])
+ res.json(global[dataKey])
+ },
}
diff --git a/mock/users.js b/mock/users.js
index 8b51347..718afaf 100644
--- a/mock/users.js
+++ b/mock/users.js
@@ -28,8 +28,6 @@ let dataKey = mockStorge('UsersList',Mock.mock({
let usersListData = global[dataKey]
-console.log(global[dataKey]);
-
module.exports = {
'GET /api/users' (req, res) {
diff --git a/src/components/dashboard/sales.js b/src/components/dashboard/sales.js
index 3c6c592..c7e5796 100644
--- a/src/components/dashboard/sales.js
+++ b/src/components/dashboard/sales.js
@@ -4,23 +4,19 @@ import styles from './sales.less'
import {color} from '../../utils'
import {LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer} from 'recharts'
-const data = [
- {name: '2000', Clothes: 400, Food: 240, Electronics: 240},
- {name: '2011', Clothes: 300, Food: 198, Electronics: 220},
- {name: '2012', Clothes: 200, Food: 980, Electronics: 229},
- {name: '2013', Clothes: 278, Food: 398, Electronics: 200},
- {name: '2014', Clothes: 189, Food: 480, Electronics: 281},
- {name: '2015', Clothes: 239, Food: 380, Electronics: 250},
- {name: '2016', Clothes: 349, Food: 430, Electronics: 210},
-];
-
function Sales(props) {
return (
Yearly Sales
-
-