user.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. import request from '@/utils/request'
  2. import { upFilse } from '@/utils/request';
  3. // 订单统计信息
  4. export function orderData(data) {
  5. return request({
  6. url: '/api/order/data',
  7. method: 'get',
  8. data
  9. });
  10. }
  11. // 获取用户信息
  12. export function getUserInfo(data) {
  13. return request({
  14. url: '/api/userinfo',
  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 upload(data){
  101. return upFilse({
  102. url:'/api/upload/image',
  103. method:'post',
  104. data
  105. })
  106. }
  107. //用户修改信息
  108. export function edit(data) {
  109. return request({
  110. url: '/api/user/edit',
  111. method: 'post',
  112. data
  113. });
  114. }
  115. // 推广的人数
  116. export function getSpreadPeople(data){
  117. return request({
  118. url:'/api/spread/people',
  119. method:'post',
  120. data
  121. })
  122. }
  123. //我的会员
  124. export function getMyTvillage(data){
  125. return request({
  126. url:'/api/mytvillage',
  127. method:'get',
  128. data
  129. })
  130. }
  131. //推广佣金/提现总和
  132. //3=佣金,4=提现
  133. export function getSpreadCount(data,type) {
  134. return request({
  135. url:'/api/spread/count/'+type,
  136. method:'get',
  137. data
  138. })
  139. }
  140. //我的实体店
  141. export function getMyStore(data) {
  142. return request({
  143. url:'/api/mystore',
  144. method:'get',
  145. data
  146. })
  147. }
  148. //申请会员 店长
  149. export function enter(data) {
  150. return request({
  151. url:'/api/enter',
  152. method:'post',
  153. data
  154. })
  155. }
  156. //编辑门店
  157. export function editStore(data) {
  158. return request({
  159. url:'/api/store_edit',
  160. method:'post',
  161. data
  162. })
  163. }