// test.ts

import { MockMethod } from 'vite-plugin-mock'
export default [
  {
    url: '/mock/api/get/resource/image-list',
    method: 'get',
    response: ({ }) => {
      return {
        code: 0,
        data: {
          name: 'vben',
        },
      }
    },
  },
  {
    url: '/mock/api/get/example/bar',
    method: 'post',
    timeout: 2000,
    response: {
      code: 0,
      data: [
        { name: '苹果', price: 20, count: 10 },
        { name: '香蕉', price: 10, count: 20},
        { name: '西瓜', price: 25, count: 30 },
        { name: '葡萄', price: 12, count: 40},
      ],
    },
  },
  {
    url: '/mock/api/get/example/line',
    method: 'post',
    timeout: 2000,
    response: {
      code: 0,
      data: [
        { name: '一月', apple: 1654, vivo: 1234, mi: 3421 },
        { name: '二月', apple: 4322, vivo: 4321, mi: 2343 },
        { name: '三月', apple: 4345, vivo: 3221, mi: 3221  },
        { name: '四月', apple: 3222, vivo: 1222, mi: 1222 },
      ],
    },
  },
  {
    url: '/mock/api/get/example/pie',
    method: 'post',
    timeout: 2000,
    response: {
      code: 0,
      data: [
        { name: '一月', apple: 1654, vivo: 1234, mi: 3421 },
        { name: '二月', apple: 4322, vivo: 4321, mi: 2343 },
        { name: '三月', apple: 4345, vivo: 3221, mi: 3221  },
        { name: '四月', apple: 3222, vivo: 1222, mi: 1222 },
      ],
    },
  },
] as MockMethod[]