api.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. import request from "@/utils/request.js";
  2. //获取首页数据 无需授权
  3. export function getIndexData()
  4. {
  5. return request.get("index/getIndex",{},{ noAuth : true});
  6. }
  7. //站点信息
  8. export function siteResouce()
  9. {
  10. return request.get("pub/siteResouce",{},{ noAuth : true});
  11. }
  12. //公告列表
  13. export function getNotice()
  14. {
  15. return request.post("index/newsList",{},{ noAuth : true});
  16. }
  17. //公告详情
  18. export function newsDetail(data)
  19. {
  20. return request.post("index/news",data,{ noAuth : true});
  21. }
  22. //仓库列表
  23. export function getWarehouse()
  24. {
  25. return request.get("pub/warehouse",{},{ noAuth : true});
  26. }
  27. //产品列表
  28. export function productList(data)
  29. {
  30. return request.post("index/proList",data,{ noAuth : true});
  31. }
  32. //产品详情
  33. export function productDetail(data)
  34. {
  35. return request.post("index/proItem",data,{ noAuth : true});
  36. }
  37. //推荐产品
  38. export function recommend()
  39. {
  40. return request.post("index/proRand",{},{ noAuth : true});
  41. }
  42. //获取验证码
  43. export function registerVerify(data)
  44. {
  45. return request.post("login/yzm",data,{ noAuth : true});
  46. }
  47. //注册一
  48. export function ApiReg1(data)
  49. {
  50. return request.post("login/reg1",data,{ noAuth : true});
  51. }
  52. //注册二
  53. export function ApiReg2(data)
  54. {
  55. return request.post("login/reg2",data,{ noAuth : true});
  56. }
  57. //登录
  58. export function loginApi(data)
  59. {
  60. return request.post("login/l",data,{ noAuth : true});
  61. }
  62. //重置密码验证码
  63. export function ApiForgetYzm(data)
  64. {
  65. return request.post("login/forgetYzm",data,{ noAuth : true});
  66. }
  67. //重置密码一
  68. export function ApiForget1(data)
  69. {
  70. return request.post("login/forget1",data,{ noAuth : true});
  71. }
  72. //重置密码二
  73. export function ApiForget2(data)
  74. {
  75. return request.post("login/forget2",data,{ noAuth : true});
  76. }
  77. //用户信息
  78. export function getUserInfo()
  79. {
  80. return request.get("user/init");
  81. }
  82. //订单统计
  83. export function getOrder()
  84. {
  85. return request.post("user/orderInit");
  86. }
  87. //订单列表
  88. export function getOrderList(data)
  89. {
  90. return request.post("user/getOrderList",data);
  91. }
  92. //订单详情
  93. export function orderSubItem(data)
  94. {
  95. return request.post("user/orderSubItem",data);
  96. }
  97. //邀请链接
  98. export function spreadLink()
  99. {
  100. return request.post("user/extension");
  101. }
  102. //平台列表
  103. export function platformList()
  104. {
  105. return request.post("platform/list");
  106. }
  107. //购买页仓库
  108. export function ApiWarehouse()
  109. {
  110. return request.get("user/warehouse");
  111. }
  112. //提交订单
  113. export function submitOrder(data)
  114. {
  115. return request.post("user/subOrder",data);
  116. }
  117. //支付订单
  118. export function payOrder(data)
  119. {
  120. return request.post("user/getPayOrder",data);
  121. }
  122. //余额支付
  123. export function balancePay(data)
  124. {
  125. return request.post("user/balancePay",data);
  126. }
  127. //微信支付
  128. export function wxPay(data)
  129. {
  130. return request.post("weixin/wxPay",data);
  131. }
  132. //取消订单
  133. export function cancelOrder(data)
  134. {
  135. return request.post("user/cancelOrder",data);
  136. }
  137. //充值金额列表
  138. export function rechargeInit()
  139. {
  140. return request.post("user/rechargeXinit");
  141. }
  142. //微信充值
  143. export function wxRecharge(data)
  144. {
  145. return request.post("user/wxRecharge",data);
  146. }
  147. //账单明细
  148. export function recordList(data)
  149. {
  150. return request.post("user/detailList",data);
  151. }
  152. //账户余额
  153. export function account()
  154. {
  155. return request.post("user/rechargeInit");
  156. }