openapi.ts 660 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import request from "@/utils/request";
  2. export interface OpenConfForm {
  3. notify_url?: string;
  4. return_url?: string;
  5. }
  6. export interface OpenConfResponse {
  7. id: number;
  8. app_id: string;
  9. gateway_url: string;
  10. notify_url?: string;
  11. return_url?: string;
  12. status: string;
  13. description?: string;
  14. created_time?: string;
  15. updated_time?: string;
  16. }
  17. const OpenAPI = {
  18. getOpenConf: () => {
  19. return request({
  20. url: "/payment/openapi/conf",
  21. method: "GET",
  22. });
  23. },
  24. saveOpenConf: (data?: OpenConfForm) => {
  25. return request({
  26. url: "/payment/openapi/conf",
  27. method: "POST",
  28. data,
  29. });
  30. },
  31. };
  32. export default OpenAPI;