user.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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. console.log('请求数据');
  13. return request({
  14. url: '/api/user',
  15. method: 'get',
  16. data
  17. });
  18. }
  19. // 用户分享图
  20. export function spreadBanner(data) {
  21. return request({
  22. url: '/api/spread/banner',
  23. method: 'get',
  24. data
  25. });
  26. }
  27. // 获取地址列表
  28. export function getAddressList(data) {
  29. return request({
  30. url: '/api/address/list',
  31. method: 'get',
  32. data
  33. });
  34. }
  35. // 修改地址
  36. export function addressEdit(data) {
  37. return request({
  38. url: '/api/address/edit',
  39. method: 'post',
  40. data
  41. });
  42. }
  43. // 删除地址
  44. export function addressDel(data) {
  45. return request({
  46. url: '/api/address/del',
  47. method: 'post',
  48. data
  49. });
  50. }
  51. // 设为默认地址
  52. export function setAddressDefault(data) {
  53. return request({
  54. url: '/api/address/default/set',
  55. method: 'post',
  56. data
  57. });
  58. }
  59. // 购物车列表
  60. export function getCartList(data) {
  61. return request({
  62. url: '/api/cart/list',
  63. method: 'get',
  64. data
  65. });
  66. }
  67. // 修改购物车数量
  68. export function getCartNum(data) {
  69. return request({
  70. url: '/api/cart/num',
  71. method: 'post',
  72. data
  73. });
  74. }
  75. //删除购物车
  76. export function cartDel(data) {
  77. return request({
  78. url: '/api/cart/del',
  79. method: 'post',
  80. data
  81. });
  82. }
  83. //获取收藏夹列表
  84. export function getcollectList(data) {
  85. return request({
  86. url: '/api/collect/user',
  87. method: 'get',
  88. data
  89. });
  90. }
  91. // 取消收藏
  92. export function delcollect(data) {
  93. return request({
  94. url: '/api/collect/del',
  95. method: 'post',
  96. data
  97. });
  98. }
  99. //我的推广
  100. export function spread(data) {
  101. return request({
  102. url: '/api/spread/people',
  103. method: 'POST',
  104. data
  105. });
  106. }
  107. // 我的推广卖货
  108. export function link(data) {
  109. return request({
  110. url: '/api/link/people',
  111. method: 'POST',
  112. data
  113. });
  114. }
  115. // 获取我的粉丝
  116. export function getMyfans(data) {
  117. return request({
  118. url: '/api/auction/lower',
  119. method: 'get',
  120. data
  121. });
  122. }
  123. // 转账预约券
  124. export function transfer_accounts(data) {
  125. return request({
  126. url: '/api/auction/transfer_accounts',
  127. method: 'post',
  128. data
  129. });
  130. }
  131. // 用户转账趣豆
  132. export function trade(data) {
  133. return request({
  134. url: '/api/user/trade',
  135. method: 'post',
  136. data
  137. });
  138. }
  139. // 商家转账趣豆
  140. export function admintrade(data) {
  141. return request({
  142. url: '/api/admin/order/trade',
  143. method: 'post',
  144. data
  145. });
  146. }
  147. // 申请馆长
  148. export function apply(data) {
  149. return request({
  150. url: '/api/auction/apply',
  151. method: 'post',
  152. data
  153. });
  154. }
  155. // 实名认证查询
  156. export function rate(data) {
  157. return request({
  158. url: '/api/rate',
  159. method: 'get',
  160. data
  161. });
  162. }
  163. // 馆长申请查询
  164. export function apply_status(data) {
  165. return request({
  166. url: '/api/auction/apply_status',
  167. method: 'get',
  168. data
  169. });
  170. }
  171. //文章列表
  172. export function article(data, id) {
  173. return request({
  174. url: '/api/article/list/' + id,
  175. method: 'GET',
  176. data
  177. });
  178. }
  179. //文章详情
  180. export function details(data, id) {
  181. return request({
  182. url: '/api/article/details/' + id,
  183. method: 'GET',
  184. data
  185. });
  186. }
  187. //我的商品
  188. export function user_product(data) {
  189. return request({
  190. url: '/api/auction/user_product',
  191. method: 'GET',
  192. data
  193. });
  194. }