import { loginStore } from '@/stores' import http from '@/services/http' import tradeServer from '@/services/socket/trade' const { userId } = loginStore.$mapGetters() /** * 查询收货地址信息 */ export function queryUserReceiveInfo(params: Model.UserReceiveInfoReq) { params.userid = userId.value return http.commonRequest({ url: '/Qhj/QueryUserReceiveInfo', params, }) } /** * 查询发票信息 */ export function queryWrUserReceiptInfo(params: Model.WrUserReceiptInfoReq) { params.userid = userId.value return http.commonRequest({ url: '/WrTrade2/QueryWrUserReceiptInfo', params, }) } /** * 新增修改收货地址 */ export function userReceiveInfo(params: Proto.UserReceiveInfoReq) { return tradeServer.sendMessage({ params, reqName: 'UserReceiveInfoReq', rspName: 'UserReceiveInfoRsp' }) } /** * 删除收货地址 */ export function delUserReceiveInfo(params: Proto.DelUserReceiveInfoReq) { return tradeServer.sendMessage({ params, reqName: 'DelUserReceiveInfoReq', rspName: 'DelUserReceiveInfoRsp' }) } /** * 设置默认收货地址 */ export function userReceiveIsDefault(params: Proto.UserReceiveIsDefaultReq) { return tradeServer.sendMessage({ params, reqName: 'UserReceiveIsDefaultReq', rspName: 'UserReceiveIsDefaultRsp' }) } /** * 新增修改用户发票信息 */ export function userReceiptInfo(params: Proto.UserReceiptInfoReq) { return tradeServer.sendMessage({ params, reqName: 'UserReceiptInfoReq', rspName: 'UserReceiptInfoRsp' }) } /** * 删除用户发票信息 */ export function delUserReceiptInfo(params: Proto.DelUserReceiptInfoReq) { return tradeServer.sendMessage({ params, reqName: 'DelUserReceiptInfoReq', rspName: 'DelUserReceiptInfoRsp' }) } /** * 交易商头像 */ export function dealerHead(params: Proto.DealerHeadReq) { return tradeServer.sendMessage({ params, reqName: 'DealerHeadReq', rspName: 'DealerHeadRsp' }) } /** * 更新用户头像 */ export function updateUserHeadUrl(data: Model.UserHeadUrlReq) { return http.commonRequest({ method: 'post', url: '/User/UpdateUserHeadUrl', data, }) }