user.js 3.6 KB

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