user.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. import request from '@/utils/request'
  2. import {
  3. upFilse
  4. } from '@/utils/request';
  5. // 订单统计信息
  6. export function orderData(data) {
  7. return request({
  8. url: '/api/order/data',
  9. method: 'get',
  10. data
  11. });
  12. }
  13. // 获取用户信息
  14. export function getUserInfo(data) {
  15. return request({
  16. url: '/api/user',
  17. method: 'get',
  18. data
  19. });
  20. }
  21. // 用户分享图
  22. export function spreadBanner(data) {
  23. return request({
  24. url: '/api/spread/banner',
  25. method: 'get',
  26. data
  27. });
  28. }
  29. // 获取地址列表
  30. export function getAddressList(data) {
  31. return request({
  32. url: '/api/address/list',
  33. method: 'get',
  34. data
  35. });
  36. }
  37. // 修改地址
  38. export function addressEdit(data) {
  39. return request({
  40. url: '/api/address/edit',
  41. method: 'post',
  42. data
  43. });
  44. }
  45. // 删除地址
  46. export function addressDel(data) {
  47. return request({
  48. url: '/api/address/del',
  49. method: 'post',
  50. data
  51. });
  52. }
  53. // 设为默认地址
  54. export function setAddressDefault(data) {
  55. return request({
  56. url: '/api/address/default/set',
  57. method: 'post',
  58. data
  59. });
  60. }
  61. // 购物车列表
  62. export function getCartList(data) {
  63. return request({
  64. url: '/api/cart/list',
  65. method: 'get',
  66. data
  67. });
  68. }
  69. // 修改购物车数量
  70. export function getCartNum(data) {
  71. return request({
  72. url: '/api/cart/num',
  73. method: 'post',
  74. data
  75. });
  76. }
  77. //删除购物车
  78. export function cartDel(data) {
  79. return request({
  80. url: '/api/cart/del',
  81. method: 'post',
  82. data
  83. });
  84. }
  85. //获取收藏夹列表
  86. export function getcollectList(data) {
  87. return request({
  88. url: '/api/collect/user',
  89. method: 'get',
  90. data
  91. });
  92. }
  93. // 取消收藏
  94. export function delcollect(data) {
  95. return request({
  96. url: '/api/collect/del',
  97. method: 'post',
  98. data
  99. });
  100. }
  101. //上传图片
  102. export function upload(data) {
  103. return upFilse({
  104. url: '/api/upload/image',
  105. method: 'post',
  106. data
  107. })
  108. }
  109. //用户修改信息
  110. export function edit(data) {
  111. return request({
  112. url: '/api/user/edit',
  113. method: 'post',
  114. data
  115. });
  116. }
  117. // 推广的人数
  118. export function getSpreadPeople(data) {
  119. return request({
  120. url: '/api/spread/people',
  121. method: 'post',
  122. data
  123. })
  124. }
  125. //推广佣金/提现总和
  126. //3=佣金,4=提现
  127. export function getSpreadCount(data, type) {
  128. return request({
  129. url: '/api/spread/count/' + type,
  130. method: 'get',
  131. data
  132. })
  133. }
  134. //接点人信息
  135. export function getjiedian(data, uid) {
  136. return request({
  137. url: '/api/children/parent/' + uid,
  138. method: 'get',
  139. data
  140. })
  141. }
  142. //推荐人列表
  143. // export function getReferralList(data,uid){
  144. // return request({
  145. // url:'api/children/spread/'+uid,
  146. // method:'get',
  147. // data
  148. // })
  149. // }
  150. //佣金转账
  151. export function trade(data) {
  152. return request({
  153. url: '/api/trade',
  154. method: 'post',
  155. data
  156. })
  157. }
  158. //报单列表
  159. export function getRegisterList(data) {
  160. return request({
  161. url: '/api/register/list',
  162. method: 'get',
  163. data
  164. })
  165. }
  166. //取消报单register/cancel/14
  167. export function cancelRegister(data,id) {
  168. return request({
  169. url: '/api/register/cancel/' + id,
  170. method: 'post',
  171. data
  172. })
  173. }
  174. //支付报单register/pay/15
  175. export function payRegister(data,id) {
  176. return request({
  177. url: '/api/register/pay/' + id,
  178. method: 'post',
  179. data
  180. })
  181. }
  182. //未设置接点的报单下级
  183. export function getChooseList(data){
  184. return request({
  185. url:'/api/spread/order_people',
  186. method:'get',
  187. data
  188. })
  189. }
  190. //添加下级接点
  191. export function addJiedian(data){
  192. return request({
  193. url:'/api/parent/set',
  194. method:'post',
  195. data
  196. })
  197. }