import Mock from "mockjs";

const data = Mock.mock({
  "items|4": [
    {
      "time|+1": ["2020.04", "2020.03", "2020.02", "2020.01"],
    },
  ],
});

export default [
  {
    url: `/selectData`,
    type: "post",
    response: (req, res, next) => {
      // req.body 可获取post参数
      // req.query 可获取get参数
      const items = data.items;
      return {
        body: {
          total: items.length,
          items: items,
        },
        head: {
          errorCode: "0",
          data: null,
        },
      };
    },
  },
];
