console.ts 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import { Random } from 'mockjs';
  2. import { resultSuccess } from '../_util';
  3. const consoleInfo = {
  4. //访问量
  5. visits: {
  6. dayVisits: Random.float(10000, 99999, 2, 2),
  7. rise: Random.float(10, 99),
  8. decline: Random.float(10, 99),
  9. amount: Random.float(99999, 999999, 3, 5),
  10. },
  11. //销售额
  12. saleroom: {
  13. weekSaleroom: Random.float(10000, 99999, 2, 2),
  14. amount: Random.float(99999, 999999, 2, 2),
  15. degree: Random.float(10, 99),
  16. },
  17. //订单量
  18. orderLarge: {
  19. weekLarge: Random.float(10000, 99999, 2, 2),
  20. rise: Random.float(10, 99),
  21. decline: Random.float(10, 99),
  22. amount: Random.float(99999, 999999, 2, 2),
  23. },
  24. //成交额度
  25. volume: {
  26. weekLarge: Random.float(10000, 99999, 2, 2),
  27. rise: Random.float(10, 99),
  28. decline: Random.float(10, 99),
  29. amount: Random.float(99999, 999999, 2, 2),
  30. },
  31. };
  32. export default [
  33. //主控台 卡片数据
  34. {
  35. url: '/api/dashboard/console',
  36. timeout: 1000,
  37. method: 'get',
  38. response: () => {
  39. return resultSuccess(consoleInfo);
  40. },
  41. },
  42. ];