user.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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 getAddressDefault(data) {
  12. return request({
  13. url: '/api/address/default',
  14. method: 'get',
  15. data
  16. });
  17. }
  18. // 获取单个地址
  19. export function getAddressDetail(data,id) {
  20. return request({
  21. url: '/api/address/detail/'+ id,
  22. method: 'get',
  23. data
  24. });
  25. }
  26. // 砍价列表
  27. export function getBargainList(data) {
  28. return request({
  29. url: '/api/bargain/list',
  30. method: 'get',
  31. data
  32. });
  33. }
  34. // 获取用户信息
  35. export function userinfo(data) {
  36. return request({
  37. url: '/api/userinfo',
  38. method: 'get',
  39. data
  40. });
  41. }
  42. // 获取用户信息
  43. export function userinfos(data) {
  44. return request({
  45. url: '/api/user',
  46. method: 'get',
  47. data
  48. });
  49. }
  50. // 获取佣金明细
  51. export function getCommissionInfo(data,type) {
  52. return request({
  53. url: '/api/spread/commission/' + type,
  54. method: 'get',
  55. data
  56. });
  57. }
  58. // /*
  59. // * 资金明细(types|0=全部,1=消费,2=充值,3=返佣,4=提现)
  60. // * */
  61. // export function getCommissionInfo(q, types) {
  62. // return request.get("spread/commission/" + types, q);
  63. // }
  64. /**
  65. * 获取分销海报图片
  66. *
  67. */
  68. export function spreadBanner(type){
  69. return request({
  70. url: '/api/spread/banner?type='+type,
  71. method: 'get'
  72. });
  73. }
  74. /*
  75. * 会员等级列表
  76. *
  77. */
  78. // export function userLevelGrade(){
  79. // return request.get('user/level/grade');
  80. // }
  81. export function userLevelGrade(data) {
  82. return request({
  83. url: '/api/user/level/grade',
  84. method: 'get',
  85. data
  86. });
  87. }
  88. /**
  89. * 获取某个等级任务
  90. * @param int id 任务id
  91. */
  92. export function userLevelTask(id){
  93. return request({
  94. url: '/api/user/level/task/'+id,
  95. method: 'get',
  96. });
  97. }
  98. // 获取客服列表
  99. export function serviceList(data) {
  100. return request({
  101. url: '/api/user/service/list',
  102. method: 'get',
  103. data
  104. });
  105. }
  106. // 客服详情
  107. export function getChatRecord(to_uid, data) {
  108. return request({
  109. url: "/api/user/service/record/" + to_uid,
  110. method: 'get',
  111. data
  112. });
  113. }
  114. /**
  115. * 客服详情
  116. */
  117. // export function getChatRecord(to_uid, data) {
  118. // return request.get("user/service/record/" + to_uid, data);
  119. // }
  120. //获取产品详情
  121. export function getProductDetail(id) {
  122. return request({
  123. url: '/product/detail/' + id,
  124. method: 'get',
  125. data: {}
  126. });
  127. }