index.ts 901 B

123456789101112131415161718192021222324252627282930313233343536
  1. import * as booking from './module/booking'
  2. import * as tracking from './module/tracking'
  3. import * as common from './module/common'
  4. import * as login from './module/login'
  5. import * as other from './module/other'
  6. import * as notificationMessage from './module/notificationMessage'
  7. import * as system from './module/system'
  8. import * as AIRobot from './module/AIRobot'
  9. import * as Delivery from './module/Delivery'
  10. import * as report from './module/report'
  11. /**
  12. * api 对象接口定义
  13. */
  14. function generateApiMap(maps: any) {
  15. const methodMap: any = {}
  16. for (const key in maps) {
  17. methodMap[key] = maps[key]
  18. }
  19. return methodMap
  20. }
  21. const apis = generateApiMap({
  22. ...booking,
  23. ...tracking,
  24. ...common,
  25. ...login,
  26. ...other,
  27. ...notificationMessage,
  28. ...system,
  29. ...AIRobot,
  30. ...Delivery,
  31. ...report
  32. })
  33. export default {
  34. ...apis // 取出所有可遍历属性赋值在新的对象上
  35. }