index.ts 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. import { loginStore } from '@/stores'
  2. import http from '@/services/http'
  3. import tradeServer from '@/services/socket/trade'
  4. const { userId } = loginStore.$mapGetters()
  5. /**
  6. * 查询收货地址信息
  7. */
  8. export function queryUserReceiveInfo(params: Model.UserReceiveInfoReq) {
  9. params.userid = userId.value
  10. return http.commonRequest<Model.UserReceiveInfoRsp[]>({
  11. url: '/Qhj/QueryUserReceiveInfo',
  12. params,
  13. })
  14. }
  15. /**
  16. * 查询发票信息
  17. */
  18. export function queryWrUserReceiptInfo(params: Model.WrUserReceiptInfoReq) {
  19. params.userid = userId.value
  20. return http.commonRequest<Model.WrUserReceiptInfoRsp[]>({
  21. url: '/WrTrade2/QueryWrUserReceiptInfo',
  22. params,
  23. })
  24. }
  25. /**
  26. * 新增修改收货地址
  27. */
  28. export function userReceiveInfo(params: Proto.UserReceiveInfoReq) {
  29. return tradeServer.sendMessage<Proto.UserReceiveInfoRsp>({
  30. params,
  31. reqName: 'UserReceiveInfoReq',
  32. rspName: 'UserReceiveInfoRsp'
  33. })
  34. }
  35. /**
  36. * 删除收货地址
  37. */
  38. export function delUserReceiveInfo(params: Proto.DelUserReceiveInfoReq) {
  39. return tradeServer.sendMessage<Proto.DelUserReceiveInfoRsp>({
  40. params,
  41. reqName: 'DelUserReceiveInfoReq',
  42. rspName: 'DelUserReceiveInfoRsp'
  43. })
  44. }
  45. /**
  46. * 设置默认收货地址
  47. */
  48. export function userReceiveIsDefault(params: Proto.UserReceiveIsDefaultReq) {
  49. return tradeServer.sendMessage<Proto.UserReceiveIsDefaultRsp>({
  50. params,
  51. reqName: 'UserReceiveIsDefaultReq',
  52. rspName: 'UserReceiveIsDefaultRsp'
  53. })
  54. }
  55. /**
  56. * 新增修改用户发票信息
  57. */
  58. export function userReceiptInfo(params: Proto.UserReceiptInfoReq) {
  59. return tradeServer.sendMessage<Proto.UserReceiptInfoRsp>({
  60. params,
  61. reqName: 'UserReceiptInfoReq',
  62. rspName: 'UserReceiptInfoRsp'
  63. })
  64. }
  65. /**
  66. * 删除用户发票信息
  67. */
  68. export function delUserReceiptInfo(params: Proto.DelUserReceiptInfoReq) {
  69. return tradeServer.sendMessage<Proto.DelUserReceiptInfoRsp>({
  70. params,
  71. reqName: 'DelUserReceiptInfoReq',
  72. rspName: 'DelUserReceiptInfoRsp'
  73. })
  74. }
  75. /**
  76. * 交易商头像
  77. */
  78. export function dealerHead(params: Proto.DealerHeadReq) {
  79. return tradeServer.sendMessage<Proto.DealerHeadRsp>({
  80. params,
  81. reqName: 'DealerHeadReq',
  82. rspName: 'DealerHeadRsp'
  83. })
  84. }
  85. /**
  86. * 更新用户头像
  87. */
  88. export function updateUserHeadUrl(data: Model.UserHeadUrlReq) {
  89. return http.commonRequest({
  90. method: 'post',
  91. url: '/User/UpdateUserHeadUrl',
  92. data,
  93. })
  94. }