common.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. module.exports = [
  2. // 游戏平台
  3. {
  4. url: '/v1/recharge/channel/platform',
  5. type: 'get',
  6. response: config => {
  7. return {
  8. code: 200,
  9. status: true,
  10. data: {
  11. data: [
  12. {
  13. 'pid': 'd65aa6d7614589bffe62456b88e98811',
  14. 'platform': 'MM',
  15. 'disRate': 9.8,
  16. 'rate': 9.7,
  17. 'type': 0,
  18. 'length': 2
  19. }
  20. ]
  21. },
  22. message: '成功'
  23. }
  24. }
  25. },
  26. // 渠道余额
  27. {
  28. url: '/v1/getMainChannelMoney',
  29. type: 'post',
  30. response: config => {
  31. return {
  32. code: 200,
  33. status: true,
  34. data: {
  35. data: 8816
  36. },
  37. message: '成功'
  38. }
  39. }
  40. },
  41. // 渠道账号
  42. {
  43. url: '/v1/recharge/channel/platform',
  44. type: 'get',
  45. response: config => {
  46. return {
  47. code: 200,
  48. status: true,
  49. data: {
  50. data: [
  51. {
  52. 'cid': 18150,
  53. 'title': null,
  54. 'account': 'MM17696178'
  55. },
  56. {
  57. 'cid': 18368,
  58. 'title': '',
  59. 'account': 'MM14590945'
  60. }
  61. ]
  62. },
  63. message: '成功'
  64. }
  65. }
  66. },
  67. // 查询充值账号是否正常
  68. {
  69. url: '/v1/recharge/player/type',
  70. type: 'post',
  71. response: config => {
  72. if (Math.round(Math.random() * 2) < 1) {
  73. return {
  74. code: 200,
  75. status: true,
  76. data: [],
  77. message: '成功'
  78. }
  79. } else {
  80. return {
  81. code: 200,
  82. status: false,
  83. data: [],
  84. message: '失败'
  85. }
  86. }
  87. }
  88. }
  89. ]