import Mock from "mockjs";

const data = Mock.mock({
  "items|+1": [
    {
      time: "2020.04",
      rec: 100,
      otherRec: 200,
      pay: 110,
      otherPay: 210,
    },
  ],
});

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