取消关闭支付弹窗调用关闭订单接口 & 添加未实名去支付时的拦截

This commit is contained in:
Eamon-meng
2026-04-20 16:22:49 +08:00
parent 74d53c619d
commit 27e694ee0d
3 changed files with 41 additions and 25 deletions

View File

@@ -14,6 +14,7 @@ import {ExtraResp} from '@/lib/api'
import {formatPurchaseLiveLabel} from './sku'
import {User} from '@/lib/models'
import {PurchaseFormValues} from './form-values'
import {IdCard} from 'lucide-react'
const emptyPrice: ExtraResp<typeof getPrice> = {
price: '0.00',
@@ -107,15 +108,30 @@ export function PurchaseSidePanel(props: PurchaseSidePanelProps) {
<span className="text-xl text-orange-500">{discountedPrice}</span>
</p>
{profile ? (
<>
<FieldPayment balance={profile.balance}/>
<Pay
method={method}
balance={profile.balance}
amount={discountedPrice}
resource={resource}
/>
</>
profile.id_type !== 0 ? (
<>
<FieldPayment balance={profile.balance}/>
<Pay
method={method}
balance={profile.balance}
amount={discountedPrice}
resource={resource}
/>
</>
) : (
<div className="flex flex-col gap-3">
<p className="text-sm text-gray-500">
</p>
<Link
href="/admin/identify"
className={buttonVariants()}
>
<IdCard size={16} className="mr-1"/>
</Link>
</div>
)
) : (
<Link href="/login" className={buttonVariants()}>