console.ts 1009 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import { Random } from 'mockjs';
  2. import { resultSuccess } from '../_util';
  3. const consoleInfo = {
  4. visits: {
  5. dayVisits: Random.float(10000, 99999, 2, 2),
  6. rise: Random.float(10, 99),
  7. decline: Random.float(10, 99),
  8. amount: Random.float(99999, 999999, 3, 5),
  9. },
  10. saleroom: {
  11. weekSaleroom: Random.float(10000, 99999, 2, 2),
  12. amount: Random.float(99999, 999999, 2, 2),
  13. degree: Random.float(10, 99),
  14. },
  15. orderLarge: {
  16. weekLarge: Random.float(10000, 99999, 2, 2),
  17. rise: Random.float(10, 99),
  18. decline: Random.float(10, 99),
  19. amount: Random.float(99999, 999999, 2, 2),
  20. },
  21. volume: {
  22. weekLarge: Random.float(10000, 99999, 2, 2),
  23. rise: Random.float(10, 99),
  24. decline: Random.float(10, 99),
  25. amount: Random.float(99999, 999999, 2, 2),
  26. },
  27. };
  28. export default [
  29. {
  30. url: '/api/dashboard/console',
  31. timeout: 1000,
  32. method: 'get',
  33. response: () => {
  34. return resultSuccess(consoleInfo);
  35. },
  36. },
  37. ];