I used mock to simulate a piece of data
let list = Mock.mock ("/ pie", {
moni:{
salesTypeData:[
{
x: 0,
y: "2018-5-10",
},
{
x: 20,
y: "2018-5-11",
},
{
x: 40,
y: "2018-5-12",
},
{
x: 60,
y: "2018-5-13",
},
{
x: 80,
y: "2018-5-14",
},
{
x: 100,
y: "2018-5-15",
},
{
x: 120,
y: "2018-5-16",
},
]
}
})
export default {
list,
};
I don"t know if this is the right way to write it
fetch
undefined