feat: 延期微信支付在微信内直接拉起
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 19m17s

- 微信支付下单带 app_type;拿到 pay_config 后与套餐购买一样拉起微信支付,继续支付同样处理
- 微信内打开时支付方式默认微信;取消支付保留同一请求号,再次确认不重复建单
This commit is contained in:
邹进
2026-11-07 21:57:26 +09:00
parent b035105f80
commit d13be3580f
6 changed files with 26 additions and 12 deletions

View File

@@ -67,10 +67,11 @@ export const getSilenceErrorMessage = (error, fallback = '操作失败,请稍
export const isSilenceFeatureDisabled = (error) => Number(error?.code) === 1274;
/** 延期可用支付方式:资产允许的支付方式与 wechat、alipay 取交集,支付宝优先 */
export const getSilencePaymentOptions = (allowedMethods) => {
/** 延期可用支付方式:资产允许的支付方式与 wechat、alipay 取交集;微信内打开时微信优先,否则支付宝优先 */
export const getSilencePaymentOptions = (allowedMethods, preferWechat = false) => {
const allowed = Array.isArray(allowedMethods) ? allowedMethods : [];
return SILENCE_PAYMENT_METHODS
const order = preferWechat ? ['wechat', 'alipay'] : SILENCE_PAYMENT_METHODS;
return order
.filter((method) => allowed.includes(method))
.map((value) => ({ value, label: SILENCE_PAYMENT_LABELS[value] }));
};