diff --git a/src/platforms/h5/payment.ts b/src/platforms/h5/payment.ts index 0f2ec87..2345cbe 100644 --- a/src/platforms/h5/payment.ts +++ b/src/platforms/h5/payment.ts @@ -1,7 +1,7 @@ import { useServerSdk } from "../../hooks"; import { Payment } from "../types/payment"; export class H5Payment extends Payment { - async pay(templateCode: string, imageUrl: string) { + async pay(templateCode: string, imageUrls: string[]) { const sdk = useServerSdk() const { hostname, protocol, port } = window.location; let baseUrl = `${protocol}//${hostname}` @@ -9,7 +9,7 @@ export class H5Payment extends Payment { baseUrl = `${protocol}//${hostname}:${port}` } const cbUrl = `${baseUrl}` - const response = await sdk.payTemplateCode(templateCode, imageUrl, cbUrl) + const response = await sdk.payTemplateCode(templateCode, imageUrls, cbUrl) if (response.url) { window.location.href = response.url; return; diff --git a/src/platforms/types/payment.ts b/src/platforms/types/payment.ts index 0acbd24..3b55f07 100644 --- a/src/platforms/types/payment.ts +++ b/src/platforms/types/payment.ts @@ -2,5 +2,5 @@ export abstract class Payment{ - abstract pay(templateCode: string, imageUrl: string): Promise; + abstract pay(templateCode: string, imageUrls: string[]): Promise; } \ No newline at end of file