fix: PC 端易支付优先显示二维码;订单页移除 user_id 依赖改用 token

- PaymentQRCode: PC 端有 qrCode 时不跳转,优先展示二维码
- /pay/orders: 移除 user_id 参数,统一通过 token 认证

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
erio
2026-03-07 01:59:43 +08:00
parent 7627066549
commit a5e07edda6
2 changed files with 9 additions and 19 deletions

View File

@@ -77,8 +77,8 @@ export default function PaymentQRCode({
const [popupBlocked, setPopupBlocked] = useState(false);
const paymentMethodListenerAdded = useRef(false);
// 有 payUrl 就直接跳转,不需要确认
const shouldAutoRedirect = !expired && !isStripeType(paymentType) && !!payUrl;
// PC 端有二维码时优先展示二维码;仅移动端或无二维码时才跳转
const shouldAutoRedirect = !expired && !isStripeType(paymentType) && !!payUrl && (isMobile || !qrCode);
useEffect(() => {
if (!shouldAutoRedirect || redirected) return;