map.ts 567 B

12345678910111213141516171819202122232425262728
  1. import { MockMethod } from 'vite-plugin-mock'
  2. // http://mockjs.com/examples.html#Object
  3. const mapList = (): any => {
  4. const result: any[] = []
  5. for (let index = 0; index < 200; index++) {
  6. result.push({
  7. plateNumber: "豫A@natural(11111, 99999)@character('upper')",
  8. driver: '@cname()',
  9. "lng|113-114.1-10": 1,
  10. "lat|34-35.1-10": 1
  11. })
  12. }
  13. return result
  14. }
  15. export default [
  16. {
  17. url: '/getMapInfo',
  18. method: 'get',
  19. response: () => {
  20. return {
  21. code: 0,
  22. info: mapList()
  23. }
  24. },
  25. }
  26. ] as MockMethod[]