取消关闭支付弹窗调用关闭订单接口 & 添加未实名去支付时的拦截
This commit is contained in:
@@ -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()}>
|
||||
登录后支付
|
||||
|
||||
Reference in New Issue
Block a user