fix
This commit is contained in:
54
types/index.d.ts
vendored
54
types/index.d.ts
vendored
@@ -228,16 +228,54 @@ interface ScanConfigOptions {
|
||||
* Native 支付二维码弹层面板 class
|
||||
*/
|
||||
paymentNativeQrPanelClass?: string,
|
||||
/**
|
||||
* PC 支付宝表单是否使用弹层 + iframe,默认 true;false 时整页跳转
|
||||
*/
|
||||
paymentAlipayFormEnabled?: boolean,
|
||||
/**
|
||||
* 支付宝表单弹层标题
|
||||
*/
|
||||
paymentAlipayFormTitle?: string,
|
||||
/**
|
||||
* 支付宝表单弹层说明文案
|
||||
*/
|
||||
paymentAlipayFormMessage?: string,
|
||||
/**
|
||||
* 支付宝表单 iframe 高度(像素),默认 520
|
||||
*/
|
||||
paymentAlipayFormIframeHeight?: number,
|
||||
/**
|
||||
* 支付宝表单弹层遮罩样式(未配置时回退 paymentNativeQrOverlayStyle)
|
||||
*/
|
||||
paymentAlipayFormOverlayStyle?: string,
|
||||
/**
|
||||
* 支付宝表单弹层面板样式(未配置时回退 paymentNativeQrPanelStyle)
|
||||
*/
|
||||
paymentAlipayFormPanelStyle?: string,
|
||||
/**
|
||||
* 支付宝表单弹层关闭按钮样式(未配置时回退 paymentNativeQrCloseButtonStyle)
|
||||
*/
|
||||
paymentAlipayFormCloseButtonStyle?: string,
|
||||
/**
|
||||
* 支付宝表单弹层遮罩 class(未配置时回退 paymentNativeQrOverlayClass)
|
||||
*/
|
||||
paymentAlipayFormOverlayClass?: string,
|
||||
/**
|
||||
* 支付宝表单弹层面板 class(未配置时回退 paymentNativeQrPanelClass)
|
||||
*/
|
||||
paymentAlipayFormPanelClass?: string,
|
||||
/**
|
||||
* 微信支付 OAuth 配置(paymentType 为 wechat 且微信内 JSAPI 时由 requestPayment 自动处理)
|
||||
*/
|
||||
initWechatPayment?: {
|
||||
/**
|
||||
* 用 code 换 openid,对应 api.biz.wechat.oauth
|
||||
* 用 code 换 openid,对应 api.biz.wechat.oauth;
|
||||
* 未配置时默认 /api?action=api.biz.wechat.oauth(若已配置 initWechatJssdk.apiUrl 则沿用其域名与路径)
|
||||
*/
|
||||
oauthApiUrl?: string,
|
||||
/**
|
||||
* 获取 OAuth 授权信息(含 appId、authorizeUrl),对应 api.biz.wechat.oauthAuthorizeUrl
|
||||
* 获取 OAuth 授权信息(含 appId、authorizeUrl),对应 api.biz.wechat.oauthAuthorizeUrl;
|
||||
* 未配置时默认 /api?action=api.biz.wechat.oauthAuthorizeUrl(若已配置 initWechatJssdk.apiUrl 则沿用其域名与路径)
|
||||
*/
|
||||
oauthAuthorizeUrlApiUrl?: string,
|
||||
/**
|
||||
@@ -404,6 +442,8 @@ interface PaymentPrepareParams {
|
||||
returnUrl: string;
|
||||
/** 支付渠道 */
|
||||
paymentType: PaymentType;
|
||||
/** 支付金额(元),由 requestPayment 传入 */
|
||||
amount?: number | string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -428,10 +468,12 @@ interface PaymentInvokeResult {
|
||||
oauthFailed?: boolean;
|
||||
/** OAuth 或调起失败时的错误信息 */
|
||||
error?: string;
|
||||
/** H5 / 支付宝是否已跳转 */
|
||||
/** H5 / 移动端支付宝是否已跳转整页 */
|
||||
redirected?: boolean;
|
||||
/** Native 场景是否展示了二维码弹层 */
|
||||
qrShown?: boolean;
|
||||
/** PC 支付宝是否展示了表单弹层 */
|
||||
dialogShown?: boolean;
|
||||
/** 微信 JSAPI 收银台交互结果(非支付到账结果) */
|
||||
cashierResult?: PaymentCashierResult;
|
||||
}
|
||||
@@ -440,6 +482,10 @@ interface PaymentInvokeResult {
|
||||
* 支付请求选项
|
||||
*/
|
||||
interface RequestPaymentOptions {
|
||||
/** 支付金额(元),展示在支付弹窗;也可由业务返回 amount / totalAmount / payAmount */
|
||||
amount?: number | string;
|
||||
/** 货币符号,默认 CNY(¥) */
|
||||
currency?: string;
|
||||
/** 支付完成回跳地址,未传时使用当前页 URL */
|
||||
returnUrl?: string;
|
||||
/** OAuth 授权回跳完整 URL(redirectUri),覆盖 initWechatPayment.redirectUri */
|
||||
@@ -524,7 +570,7 @@ interface IScan {
|
||||
options?: RequestPaymentOptions
|
||||
): Promise<PaymentInvokeResult>;
|
||||
/**
|
||||
* 关闭 SDK 管理的支付相关 UI(如 PC Native 二维码弹层)
|
||||
* 关闭 SDK 管理的支付相关 UI(如 PC Native 二维码弹层、支付宝表单弹层)
|
||||
*/
|
||||
closePaymentDialog(): void;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user