order.js 998 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import BaseStore from '@src/stores/base';
  2. // import * as querystring from 'querystring';
  3. export default class OrderStore extends BaseStore {
  4. allCheckout() {
  5. return this.apiGet('/order/checkout/all');
  6. }
  7. addCheckout(productType, productId, service, param) {
  8. return this.apiPost('/order/checkout/add', { productType, productId, service, param });
  9. }
  10. removeCheckout(checkoutId) {
  11. return this.apiDelete('/order/checkout/delete', { checkoutId });
  12. }
  13. confirmPay() {
  14. return this.apiPost('/order/pay/confirm');
  15. }
  16. speedPay(productType, productId, service, param) {
  17. return this.apiPost('/order/pay/speed', { productType, productId, service, param });
  18. }
  19. wechatQr(orderId) {
  20. return this.apiPost('/order/wechat/qr', { orderId });
  21. }
  22. wechatJs(orderId) {
  23. return this.apiPost('/order/wechat/js', { orderId });
  24. }
  25. alipayQr(orderId) {
  26. return this.apiPost('/order/alipay/qr', { orderId });
  27. }
  28. }
  29. export const Order = new OrderStore({ key: 'order' });