game.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. import request from '@/utils/request'
  2. // 互娱 游戏列表
  3. export function getGameList(data) {
  4. return request({
  5. url: `/api/game`,
  6. method: 'get',
  7. data
  8. });
  9. }
  10. // 互娱 获取当前游戏历史记录
  11. export function getGame(data,id) {
  12. return request({
  13. url: `/api/game/room/${id}`,
  14. method: 'get',
  15. data
  16. });
  17. }
  18. // 互娱 游戏k线
  19. export function gameKline(data,type) {
  20. return request({
  21. url: `/api/kline/${type}`,
  22. method: 'get',
  23. data
  24. });
  25. }
  26. // 互娱 获取钱包
  27. export function gameWallet() {
  28. return request({
  29. url: `/api/wallet`,
  30. method: 'get',
  31. });
  32. }
  33. // 互娱 获取交易记录
  34. export function gameBetList(data) {
  35. return request({
  36. url: `/api/game/bet/${data.id}`,
  37. method: 'get',
  38. data
  39. });
  40. }
  41. // 互娱 押注
  42. export function gameBetIn(data) {
  43. return request({
  44. url: `/api/game/bet/${data.id}`,
  45. method: 'post',
  46. data
  47. });
  48. }
  49. // 互娱 测试
  50. export function gameTest() {
  51. return request({
  52. url: `/api/test`,
  53. method: 'post',
  54. });
  55. }
  56. // 充值
  57. export function gamecharge(data) {
  58. return request({
  59. url: `/api/charge`,
  60. method: 'get',
  61. data
  62. });
  63. }
  64. // 充值完成
  65. export function gamechargePost(data) {
  66. return request({
  67. url: `/api/charge`,
  68. method: 'post',
  69. data
  70. });
  71. }