user.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. import request from '@/utils/request'
  2. // 订单统计信息
  3. export function orderData(data) {
  4. return request({
  5. url: '/api/order/data',
  6. method: 'get',
  7. data
  8. });
  9. }
  10. // 获取用户信息
  11. export function getUserInfo(data) {
  12. return request({
  13. url: '/api/userinfo',
  14. method: 'get',
  15. data
  16. });
  17. }
  18. export function getUser(data) {
  19. return request({
  20. url: '/api/user',
  21. method: 'get',
  22. data
  23. });
  24. }
  25. // 用户分享图
  26. export function spreadBanner(data) {
  27. return request({
  28. url: '/api/spread/banner',
  29. method: 'get',
  30. data
  31. });
  32. }
  33. // 获取地址列表
  34. export function getAddressList(data) {
  35. return request({
  36. url: '/api/address/list',
  37. method: 'get',
  38. data
  39. });
  40. }
  41. // 修改地址
  42. export function addressEdit(data) {
  43. return request({
  44. url: '/api/address/edit',
  45. method: 'post',
  46. data
  47. });
  48. }
  49. // 删除地址
  50. export function addressDel(data) {
  51. return request({
  52. url: '/api/address/del',
  53. method: 'post',
  54. data
  55. });
  56. }
  57. // 设为默认地址
  58. export function setAddressDefault(data) {
  59. return request({
  60. url: '/api/address/default/set',
  61. method: 'post',
  62. data
  63. });
  64. }
  65. // 购物车列表
  66. export function getCartList(data) {
  67. return request({
  68. url: '/api/cart/list',
  69. method: 'get',
  70. data
  71. });
  72. }
  73. // 修改购物车数量
  74. export function getCartNum(data) {
  75. return request({
  76. url: '/api/cart/num',
  77. method: 'post',
  78. data
  79. });
  80. }
  81. //删除购物车
  82. export function cartDel(data) {
  83. return request({
  84. url: '/api/cart/del',
  85. method: 'post',
  86. data
  87. });
  88. }
  89. //获取收藏夹列表
  90. export function getcollectList(data) {
  91. return request({
  92. url: '/api/collect/user',
  93. method: 'get',
  94. data
  95. });
  96. }
  97. // 取消收藏
  98. export function delcollect(data) {
  99. return request({
  100. url: '/api/collect/del',
  101. method: 'post',
  102. data
  103. });
  104. }
  105. //http://hmd.frp.liuniu946.com/api/brokerage/list?page=1&limit=10&pm=1
  106. export function getCommissionInfo(data) {
  107. return request({
  108. url: '/api/brokerage/list',
  109. method: 'get',
  110. data
  111. });
  112. }
  113. //我的推广
  114. export function myspread(data) {
  115. return request({
  116. url: '/api/spread/people',
  117. method: 'POST',
  118. data
  119. });
  120. }
  121. //
  122. export function sqdl(data) {
  123. return request({
  124. url: '/api/user/apply',
  125. method: 'POST',
  126. data
  127. });
  128. }
  129. export function details(data, id) {
  130. return request({
  131. url: '/api/article/details/' + id,
  132. method: 'get',
  133. data
  134. });
  135. }
  136. export function yjzye(data) {
  137. return request({
  138. url: '/api/user/transformation',
  139. method: 'post',
  140. data
  141. })
  142. }
  143. //转账
  144. export function jfzz(data) {
  145. return request({
  146. url: '/api/recharge/trade_money',
  147. method: 'post',
  148. data
  149. })
  150. }
  151. export function getLevelList(data) {
  152. // api/give_level_list
  153. return request({
  154. url: '/api/user/level/grade',
  155. method: 'get',
  156. data
  157. })
  158. }
  159. export function bank(data) {
  160. return request({
  161. url: '/api/bank/edit',
  162. method: 'post',
  163. data
  164. })
  165. }
  166. export function bankInfo() {
  167. return request({
  168. url: '/api/bank/info',
  169. method: 'get'
  170. })
  171. }
  172. export function userPool() {
  173. return request({
  174. url: '/api/user/pool',
  175. method: 'get'
  176. })
  177. }
  178. //佣金转换
  179. export function rechargeWechat(data) {
  180. return request({
  181. url: '/api/recharge/wechat',
  182. method: 'post',
  183. data
  184. })
  185. }
  186. export function goft() {
  187. // recharge/resumption
  188. return request({
  189. url: '/api/recharge/resumption',
  190. method: 'post',
  191. })
  192. }
  193. export function realName(data) {
  194. return request({
  195. url: '/api/real_name',
  196. method: 'post',
  197. data
  198. })
  199. }
  200. //
  201. export function getAli(data) {
  202. return request({
  203. url: '/api/ali/info',
  204. method: 'get',
  205. data
  206. })
  207. }
  208. export function getWx(data) {
  209. return request({
  210. url: '/api/wx/info',
  211. method: 'get',
  212. data
  213. })
  214. }
  215. export function setAli(data) {
  216. return request({
  217. url: '/api/ali/edit',
  218. method: 'post',
  219. data
  220. })
  221. }
  222. export function setWx(data) {
  223. return request({
  224. url: '/api/wx/edit',
  225. method: 'post',
  226. data
  227. })
  228. }
  229. export function gxdh(data) {
  230. return request({
  231. url: '/api/recharge/trade_contribute',
  232. method: 'post',
  233. data
  234. })
  235. }