product.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. import request from '@/utils/request'
  2. // 商品列表
  3. export function lala(data) {
  4. return request({
  5. url: '/api/lala',
  6. method: 'get',
  7. data
  8. });
  9. }
  10. // 获取商品分类
  11. export function getCategoryList(data) {
  12. return request({
  13. url: '/api/category',
  14. method: 'get',
  15. data
  16. });
  17. }
  18. // 可拼团列表
  19. export function auto(data) {
  20. return request({
  21. url: '/api/lala/auto_pink',
  22. method: 'get',
  23. data
  24. });
  25. }
  26. //拼团详情
  27. export function autoDetails(data,id) {
  28. return request({
  29. url: '/api/lala/auto_pink/'+ id,
  30. method: 'get',
  31. data
  32. });
  33. }
  34. //购买自动拼团
  35. export function buyauto(data,id) {
  36. return request({
  37. url: '/api/lala/auto_pink/'+id,
  38. method: 'post',
  39. data
  40. });
  41. }
  42. export function openclose(data,id) {
  43. return request({
  44. url: '/api/lala/auto_pink/switch/'+id,
  45. method: 'post',
  46. data
  47. });
  48. }
  49. // 商品详情
  50. export function lalaDetial(data,id) {
  51. return request({
  52. url: '/api/lala/'+id,
  53. method: 'get',
  54. data
  55. });
  56. }
  57. // 购买产品
  58. export function buylala(data,id) {
  59. return request({
  60. url: '/api/lala/'+id,
  61. method: 'post',
  62. data
  63. });
  64. }
  65. export function details(data,id) {
  66. return request({
  67. url: '/api/article/details/'+id,
  68. method: 'GET',
  69. data
  70. });
  71. }
  72. //质押矿机
  73. export function mortgage(data,id) {
  74. return request({
  75. url: '/api/mining/mortgage/'+id,
  76. method: 'post',
  77. data
  78. });
  79. }
  80. //赎回矿机
  81. export function redeem(data,id) {
  82. return request({
  83. url: '/api/mining/redeem/'+id,
  84. method: 'post',
  85. data
  86. });
  87. }