/** * 这是与购物有关的业务逻辑的服务 */ export default class OrderService { constructor(AjaxService) { Object.assign(this, { AjaxService }) this.name = 'OrderService' } /* 查询订单列表 */ QueryOrderList (data = {}) { return this.AjaxService.get({ url:'/order/club/list', data, isLoading: false , }) } /* 查询订单详情 */ QueryOrderDetails (data = {}) { return this.AjaxService.get({ url:'/order/club/detail', data, isLoading: true , }) } /* 操作取消订单 */ CancelOrder (data = {}) { return this.AjaxService.post({ url:'/order/club/cancel', data, isLoading: true , }) } /* 操作删除订单 */ DeleteOrder (data = {}) { return this.AjaxService.post({ url:'/order/club/delete', data, isLoading: true , }) } /* 确认订单操作 */ AffirmOrder (data = {}) { return this.AjaxService.post({ url:'/order/club/confirm', data, isLoading: true , }) } /* 确认收货操作 */ ConfirmReceipt (data = {}) { return this.AjaxService.post({ url:'/order/club/receive', data, isLoading: true , }) } /* 订单物流信息 */ QueryLogistics (data = {}) { return this.AjaxService.get({ url:'/order/club/logistics', data, isLoading: true , }) } /** *获取订单分享码 * @param orderID */ QueryOrderShareCode (data = {}) { return this.AjaxService.get({ url:'/order/club/share/code', data, isLoading: false , }) } /** *校验订单分享码 * @param orderID */ OrderShareCode (data = {}) { return this.AjaxService.get({ url:'/order/club/share/code/check', data, isLoading: true, isStatus: true , }) } /** *订单分享权限初始化 * @param orderID */ OrderShareCodeIdentity (data = {}) { return this.AjaxService.get({ url:'/order/club/share/code/identity', data, isLoading: true, isStatus: true , }) } /** *机构搜索订单 *@param searchWord 关键词 *@param userId 用户ID *@param pageNum 页码 *@param pageSize 条数 */ SearchOrderInfo (data = {}) { return this.AjaxService.get({ url:'/order/club/search', data, isLoading: true , }) } /** *搜索订单历史记录 * @param orderID */ SearchOrderHistory (data = {}) { return this.AjaxService.get({ url:'/order/club/search/history', data, isLoading: false , }) } /** *清楚订单历史记录 * @param orderID */ ClearOrderHistory (data = {}) { return this.AjaxService.get({ url:'/order/club/search/history/delete', data, isLoading: true , }) } /** *@机构-商品立即购买确认订单初始化数据 *@param userId 用户ID *@param productCount 商品数量 *@param productId 商品ID *@param source 来源 */ ProductCreateOrderInfo (data = {}) { return this.AjaxService.get({ url:'/order/club/product/settlement', data, isLoading: true , }) } /** *@机构-购物车商品数量 *@param userId 用户ID */ ShoppingCartCount (data = {}) { return this.AjaxService.get({ url:'/order/club/cart/organizeCount', data, isLoading: false , }) } /** *@机构-购物车去结算确认订单初始化数据 *@param userId 用户ID *@param source 来源 *@param productIds 商品IDs */ CartCreateOrderInfo (data = {}) { return this.AjaxService.get({ url:'/order/club/cart/settlement', data, isLoading: true , }) } /** *@确认订单-获取邮费信息 *@param productIds 商品ID【”,”分割】 *@param totalPrice 商品总额 *@param userId 用户ID *@param townID 地址区ID */ GetOrderPostage (data = {}) { return this.AjaxService.get({ url:'/order/club/postage', data, isLoading: false , }) } /** *@确认订单-获取发票信息 *@param userId 用户ID */ GetFindInvoice (data = {}) { return this.AjaxService.get({ url:'/order/club/invoice', data, isLoading: false , }) } /** *@确认订单-保存发票信息 *@param userId 用户ID */ UpdateInvoice (data = {}) { return this.AjaxService.post({ url:'/order/club/invoice/update', data, isLoading: true , }) } /* 提交订单 购买资质的验证 */ createdOrderCerify (data = {}) { return this.AjaxService.post({ url:'/order/submit/verify', data, isLoading: false , }) } /* 提交订单 orderId 订单ID */ CreatedOrderSubmit (data = {}) { return this.AjaxService.post({ url:'/order/submit/generate', data, isLoading: true , }) } /* 订单支付,效验付款规则 orderId 订单ID */ OrderPaymentValidation (data = {}) { return this.AjaxService.get({ url:'/order/pay/check', data, isLoading: false , }) } /* 余额抵扣 orderId 订单ID */ OrderBalanceDeduction (data = {}) { return this.AjaxService.post({ url:'/order/pay/balance/deduction', data, isLoading: false , }) } /* 分享订单初始化查询 orderId 订单ID */ OrderCommodityData (data = {}) { return this.AjaxService.get({ url:'/order/club/share/product', data, isLoading: true , }) } /*二手订单 打款供应商 */ confirmpayment (data = {}) { return this.AjaxService.post({ url:'/order/club/second/payment/confirm', data, isLoading: true , }) } /** * @组合商品多商品立即购买 * @param:userId 用户ID(必填) * @param:productInfo 用户ID(必填) * @param:source 来源 1 WWW 2 小程序 */ OrderClubProductSupporting (data = {}) { return this.AjaxService.get({ url:'/order/club/product/buynow', data, isLoading: true , }) } /** * @机构个人中心订单状态数量 * @param:userId 用户ID(必填) */ UserClubOrderCount (data = {}) { return this.AjaxService.get({ url:'/order/club/count', data, isLoading: false , }) } }