https.ts 784 B

123456789101112131415161718192021222324252627282930313233343536
  1. import { PaymentModule } from ".";
  2. export const https = PaymentModule.http({
  3. getPayPoinits() {
  4. return this.request("/pay/points", {
  5. method: "GET",
  6. params: {
  7. project: this.config.project,
  8. },
  9. });
  10. },
  11. getPayAmount(data: { productKey: string; quantity: number; number: number }) {
  12. return this.request("/pay/point/amount", {
  13. method: "POST",
  14. data,
  15. });
  16. },
  17. createOrder(data) {
  18. return this.request("/pay/order/create", {
  19. method: "POST",
  20. data,
  21. });
  22. },
  23. createOrderQr(data) {
  24. return this.request("/pay/create/qr", {
  25. method: "POST",
  26. data,
  27. });
  28. },
  29. getOrderDetail(params: { id: string }) {
  30. return this.request("/pay/order/detail", {
  31. method: "GET",
  32. params,
  33. });
  34. },
  35. });