api.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import { mockIp, mockReqId } from '../../../utils/mock';
  2. export function create() {
  3. const _resq = {
  4. data: null,
  5. code: 'Success',
  6. msg: null,
  7. requestId: mockReqId(),
  8. clientIp: mockIp(),
  9. rt: 79,
  10. success: true,
  11. };
  12. return Promise.resolve(_resq);
  13. }
  14. export function update() {
  15. const _resq = {
  16. data: null,
  17. code: 'Success',
  18. msg: null,
  19. requestId: mockReqId(),
  20. clientIp: mockIp(),
  21. rt: 79,
  22. success: true,
  23. };
  24. return Promise.resolve(_resq);
  25. }
  26. export function getDeliverCompanyList() {
  27. const _resq = {
  28. data: [
  29. {
  30. name: '中通快递',
  31. code: '0001',
  32. },
  33. {
  34. name: '申通快递',
  35. code: '0002',
  36. },
  37. {
  38. name: '圆通快递',
  39. code: '0003',
  40. },
  41. {
  42. name: '顺丰快递',
  43. code: '0004',
  44. },
  45. {
  46. name: '百世快递',
  47. code: '0005',
  48. },
  49. {
  50. name: '韵达快递',
  51. code: '0006',
  52. },
  53. {
  54. name: '邮政快递',
  55. code: '0007',
  56. },
  57. {
  58. name: '丰网快递',
  59. code: '0008',
  60. },
  61. {
  62. name: '顺丰直邮',
  63. code: '0009',
  64. },
  65. ],
  66. };
  67. return Promise.resolve(_resq);
  68. }