fix(payment): revert Stripe to same-window navigation, use Stripe brand color for pay button

This commit is contained in:
erio
2026-04-07 23:30:41 +08:00
parent cfdc594e4f
commit ad19fb62f5
2 changed files with 2 additions and 4 deletions
+1 -3
View File
@@ -231,9 +231,7 @@ async function createOrder(orderAmount: number, orderType: string, planId?: numb
plan_id: planId,
})
if (result.client_secret) {
const stripeUrl = router.resolve({ path: '/payment/stripe', query: { order_id: String(result.order_id), client_secret: result.client_secret } }).href
window.open(stripeUrl, '_blank')
router.push({ path: '/payment/qrcode', query: { order_id: String(result.order_id), expires_at: result.expires_at || '', payment_type: 'stripe' } })
router.push({ path: '/payment/stripe', query: { order_id: String(result.order_id), client_secret: result.client_secret } })
} else if (result.qr_code) {
router.push({ path: '/payment/qrcode', query: { order_id: String(result.order_id), qr: result.qr_code || '', pay_url: result.pay_url || '', expires_at: result.expires_at || '', payment_type: selectedMethod.value } })
} else if (result.pay_url) {
@@ -26,7 +26,7 @@
<Icon name="checkCircle" size="md" />
<span class="text-sm font-medium">{{ t('payment.stripeSuccessProcessing') }}</span>
</div>
<button v-if="!stripeSuccess" class="btn btn-primary mt-6 w-full py-3" :disabled="stripeSubmitting || !stripeReady" @click="handlePay">
<button v-if="!stripeSuccess" class="mt-6 w-full rounded-lg bg-[#635bff] py-3 text-base font-semibold text-white transition-colors hover:bg-[#5851ea] disabled:opacity-50 dark:bg-[#7a73ff] dark:hover:bg-[#635bff]" :disabled="stripeSubmitting || !stripeReady" @click="handlePay">
<span v-if="stripeSubmitting" class="flex items-center justify-center gap-2">
<span class="h-4 w-4 animate-spin rounded-full border-2 border-white border-t-transparent"></span>
{{ t('common.processing') }}