user.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. import request from '@/utils/request'
  2. import {
  3. upFilse
  4. } from '@/utils/request';
  5. // 订单统计信息
  6. export function orderData(data) {
  7. return request({
  8. url: '/api/order/data',
  9. method: 'get',
  10. data
  11. });
  12. }
  13. // 获取用户信息
  14. export function getUserInfo(data) {
  15. return request({
  16. url: '/api/userinfo',
  17. method: 'get',
  18. data
  19. });
  20. }
  21. // 用户分享图
  22. export function spreadBanner(data) {
  23. return request({
  24. url: '/api/spread/banner',
  25. method: 'get',
  26. data
  27. });
  28. }
  29. // 获取地址列表
  30. export function getAddressList(data) {
  31. return request({
  32. url: '/api/address/list',
  33. method: 'get',
  34. data
  35. });
  36. }
  37. // 修改地址
  38. export function addressEdit(data) {
  39. return request({
  40. url: '/api/address/edit',
  41. method: 'post',
  42. data
  43. });
  44. }
  45. // 删除地址
  46. export function addressDel(data) {
  47. return request({
  48. url: '/api/address/del',
  49. method: 'post',
  50. data
  51. });
  52. }
  53. // 设为默认地址
  54. export function setAddressDefault(data) {
  55. return request({
  56. url: '/api/address/default/set',
  57. method: 'post',
  58. data
  59. });
  60. }
  61. // 购物车列表
  62. export function getCartList(data) {
  63. return request({
  64. url: '/api/cart/list',
  65. method: 'get',
  66. data
  67. });
  68. }
  69. // 修改购物车数量
  70. export function getCartNum(data) {
  71. return request({
  72. url: '/api/cart/num',
  73. method: 'post',
  74. data
  75. });
  76. }
  77. //删除购物车
  78. export function cartDel(data) {
  79. return request({
  80. url: '/api/cart/del',
  81. method: 'post',
  82. data
  83. });
  84. }
  85. //获取收藏夹列表
  86. export function getcollectList(data) {
  87. return request({
  88. url: '/api/collect/user',
  89. method: 'get',
  90. data
  91. });
  92. }
  93. // 取消收藏
  94. export function delcollect(data) {
  95. return request({
  96. url: '/api/collect/del',
  97. method: 'post',
  98. data
  99. });
  100. }
  101. //上传图片
  102. export function upload(data) {
  103. return upFilse({
  104. url: '/api/upload/image',
  105. method: 'post',
  106. data
  107. })
  108. }
  109. //用户修改信息
  110. export function edit(data) {
  111. return request({
  112. url: '/api/user/edit',
  113. method: 'post',
  114. data
  115. });
  116. }
  117. // 推广的人数
  118. export function getSpreadPeople(data) {
  119. return request({
  120. url: '/api/spread/people',
  121. method: 'post',
  122. data
  123. })
  124. }
  125. //我的会员
  126. export function getMyTvillage(data) {
  127. return request({
  128. url: '/api/mytvillage',
  129. method: 'get',
  130. data
  131. })
  132. }
  133. //推广佣金/提现总和
  134. //3=佣金,4=提现
  135. export function getSpreadCount(data, type) {
  136. return request({
  137. url: '/api/spread/count/' + type,
  138. method: 'get',
  139. data
  140. })
  141. }
  142. //我的实体店
  143. export function getMyStore(data) {
  144. return request({
  145. url: '/api/mystore',
  146. method: 'get',
  147. data
  148. })
  149. }
  150. //编辑门店
  151. export function editStore(data) {
  152. return request({
  153. url: '/api/store_edit',
  154. method: 'post',
  155. data
  156. })
  157. }
  158. //开通会员
  159. export function becomeVip(data) {
  160. return request({
  161. url: '/api/level/recharge',
  162. method: 'post',
  163. data
  164. });
  165. }
  166. //获取会员
  167. export function getVip(data) {
  168. return request({
  169. url: '/api/level/lst',
  170. method: 'get',
  171. data
  172. });
  173. }
  174. export function transfer(data) {
  175. return request({
  176. url: '/api/transfer',
  177. method: 'post',
  178. data
  179. });
  180. }
  181. export function nickname(data) {
  182. return request({
  183. url: '/api/nickname',
  184. method: 'get',
  185. data
  186. });
  187. }
  188. export function getAddressDefault(data) {
  189. return request({
  190. url: '/api/address/default',
  191. method: 'get',
  192. data
  193. });
  194. }