user.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. import request from '@/utils/request'
  2. import { upFilse } from '@/utils/request';
  3. // 获取用户信息
  4. export function getUserInfo(data) {
  5. return request({
  6. url: '/api/user',
  7. method: 'get',
  8. data
  9. });
  10. }
  11. // 获取用户节点信息
  12. export function myPiont(data) {
  13. return request({
  14. url: '/api/my_point',
  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 uploads(data){
  61. return upFilse({
  62. url:'/api/upload/image',
  63. method:'post',
  64. data
  65. });
  66. }
  67. // 获取首页信息
  68. export function loadIndexs(data) {
  69. return request({
  70. url: '/api/index',
  71. method: 'get',
  72. data
  73. });
  74. }
  75. // 获取首页信息
  76. export function dhList(data) {
  77. return request({
  78. url: '/api/exchange/list',
  79. method: 'get',
  80. data
  81. });
  82. }
  83. //获取版本
  84. export function version(data) {
  85. return request({
  86. url: '/api/version',
  87. method: 'GET',
  88. data
  89. })
  90. }
  91. //获取二维码
  92. export function service(data) {
  93. return request({
  94. url: '/api/service',
  95. method: 'GET',
  96. data
  97. })
  98. }
  99. export function gitExtension(data) {
  100. return request({
  101. url: '/api/bill_info',
  102. method: 'GET',
  103. data
  104. })
  105. }
  106. export function article(data,id) {
  107. return request({
  108. url: '/api/article/list/'+id,
  109. method: 'GET',
  110. data
  111. });
  112. }
  113. // 购物车列表
  114. export function getCartList(data) {
  115. return request({
  116. url: '/api/cart/list',
  117. method: 'get',
  118. data
  119. });
  120. }
  121. // 修改购物车数量
  122. export function getCartNum(data) {
  123. return request({
  124. url: '/api/cart/num',
  125. method: 'post',
  126. data
  127. });
  128. }
  129. //删除购物车
  130. export function cartDel(data) {
  131. return request({
  132. url: '/api/cart/del',
  133. method: 'post',
  134. data
  135. });
  136. }