user.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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 spread(data) {
  28. return request({
  29. url: '/api/spread/people',
  30. method: 'POST',
  31. data
  32. });
  33. }
  34. // 获取地址列表
  35. export function getAddressList(data) {
  36. return request({
  37. url: '/api/address/list',
  38. method: 'get',
  39. data
  40. });
  41. }
  42. // 修改地址
  43. export function addressEdit(data) {
  44. return request({
  45. url: '/api/address/edit',
  46. method: 'post',
  47. data
  48. });
  49. }
  50. // 删除地址
  51. export function addressDel(data) {
  52. return request({
  53. url: '/api/address/del',
  54. method: 'post',
  55. data
  56. });
  57. }
  58. // 设为默认地址
  59. export function setAddressDefault(data) {
  60. return request({
  61. url: '/api/address/default/set',
  62. method: 'post',
  63. data
  64. });
  65. }
  66. // 购物车列表
  67. export function getCartList(data) {
  68. return request({
  69. url: '/api/cart/list',
  70. method: 'get',
  71. data
  72. });
  73. }
  74. // 修改购物车数量
  75. export function getCartNum(data) {
  76. return request({
  77. url: '/api/cart/num',
  78. method: 'post',
  79. data
  80. });
  81. }
  82. //删除购物车
  83. export function cartDel(data) {
  84. return request({
  85. url: '/api/cart/del',
  86. method: 'post',
  87. data
  88. });
  89. }
  90. //获取收藏夹列表
  91. export function getcollectList(data) {
  92. return request({
  93. url: '/api/collect/user',
  94. method: 'get',
  95. data
  96. });
  97. }
  98. // 取消收藏
  99. export function delcollect(data) {
  100. return request({
  101. url: '/api/collect/del',
  102. method: 'post',
  103. data
  104. });
  105. }
  106. //用户修改信息
  107. export function edit(data) {
  108. return request({
  109. url: '/api/user/edit',
  110. method: 'post',
  111. data
  112. });
  113. }
  114. //开通会员
  115. export function becomeVip(data) {
  116. return request({
  117. url: '/api/level/recharge',
  118. method: 'post',
  119. data
  120. });
  121. }
  122. //获取会员
  123. export function getVip(data) {
  124. return request({
  125. url: '/api/level/lst',
  126. method: 'get',
  127. data
  128. });
  129. }
  130. //申请美容院
  131. export function editStore(data) {
  132. return request({
  133. url: '/api/store_edit',
  134. method: 'post',
  135. data
  136. })
  137. }
  138. //申请美容院
  139. export function myStore(data) {
  140. return request({
  141. url: '/api/mystore',
  142. method: 'get',
  143. data
  144. })
  145. }
  146. //佣金转账
  147. export function transfer(data) {
  148. return request({
  149. url: '/api/transfer',
  150. method: 'post',
  151. data
  152. });
  153. }
  154. // 获取用户名称
  155. export function nickname(data) {
  156. return request({
  157. url: '/api/nickname',
  158. method: 'get',
  159. data
  160. });
  161. }