order.service.js 724 B

12345678910111213141516171819202122
  1. /**
  2. * 这是与购物有关的业务逻辑的服务
  3. */
  4. export default class OrderService {
  5. constructor(AjaxService) {
  6. Object.assign(this, { AjaxService })
  7. this.name = 'OrderService'
  8. }
  9. /* 分享订单初始化查询 orderId 订单ID */
  10. OrderCommodityData (data = {}) {
  11. return this.AjaxService.get({ url:'/order/commodityData', data, isLoading: true })
  12. }
  13. /* 订单支付,效验付款规则 orderId 订单ID */
  14. OrderPaymentValidation (data = {}) {
  15. return this.AjaxService.get({ url:'/order/paymentValidation', data, isLoading: false })
  16. }
  17. /* 余额抵扣 orderId 订单ID */
  18. OrderBalanceDeduction (data = {}) {
  19. return this.AjaxService.post({ url:'/order/balanceDeduction', data, isLoading: false })
  20. }
  21. }