import Mock from "mockjs";

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

export default [
  {
    url: `/home-voucher`,
    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,
        },
      };
    },
  },
];
