mock.ts 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. import * as Config from '../../config.local'
  2. export const env = Config.env
  3. export const appId = Config.appId
  4. /**
  5. * 一篇后端返回的文档数据
  6. */
  7. export const documentRes = {
  8. data: [
  9. {
  10. _id: '5b2509efdc9c81268a7348d3',
  11. a: 'a',
  12. b: 23,
  13. c: {
  14. a: 'a',
  15. b: 'b'
  16. },
  17. d: [
  18. '1',
  19. '2',
  20. {
  21. $date: 1529234575
  22. }
  23. ],
  24. e: true,
  25. f: null,
  26. g: {
  27. coordinates: [23, -78],
  28. type: 'Point'
  29. },
  30. w: {
  31. $date: 1529154030
  32. }
  33. }
  34. ],
  35. db_name: 'default',
  36. env_key: 'tcbenv-ZkSRV2p8',
  37. pager: {
  38. offset: 0,
  39. length: 6,
  40. total: 1
  41. },
  42. uin: 100003143464
  43. }
  44. /**
  45. * 一篇请求的文档
  46. */
  47. export const documentReq = {
  48. a: 'a',
  49. b: 23,
  50. c: {
  51. c1: 'c1',
  52. c2: ['1', '2'],
  53. c3: true
  54. },
  55. d: [
  56. 'd1',
  57. 'd2',
  58. {
  59. d3: 'd3'
  60. }
  61. ],
  62. e: true,
  63. f: {
  64. f: false
  65. },
  66. h: null,
  67. g: {
  68. type: 'Point',
  69. coordinates: [23, -93]
  70. },
  71. w: {
  72. $timestamp: 1529327280
  73. }
  74. }