From 4288b0de10c90fc977de20abcd18596fd7bf302a Mon Sep 17 00:00:00 2001 From: Eamon-meng <17516219072@163.com> Date: Wed, 17 Dec 2025 18:46:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B4=AD=E4=B9=B0=E5=A5=97?= =?UTF-8?q?=E9=A4=90=E6=AF=8F=E6=97=A5=E9=99=90=E8=B4=AD=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=8F=82=E6=95=B0=20&=20=E5=BA=95=E9=83=A8=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E4=BF=9D=E9=9A=9C=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(home)/footer.tsx | 18 ++++++++++++++++-- .../composites/purchase/long/center.tsx | 8 ++++---- .../composites/purchase/long/right.tsx | 14 +++++++------- .../composites/purchase/short/center.tsx | 8 ++++---- .../composites/purchase/short/right.tsx | 14 +++++++------- 5 files changed, 38 insertions(+), 24 deletions(-) diff --git a/src/app/(home)/footer.tsx b/src/app/(home)/footer.tsx index c25dd4e..1331932 100644 --- a/src/app/(home)/footer.tsx +++ b/src/app/(home)/footer.tsx @@ -18,8 +18,22 @@ export default function Footer(props: FooterProps) {

微信/电话:177 9666 8888

QQ: 70177252

服务保障

-

售前服务

-

技术支持

+ + 售前服务 + + + 技术支持 + { if (type === '1') { - form.setValue('quota', 100) + form.setValue('daily_limit', 100) } else { form.setValue('quota', 500) @@ -144,7 +144,7 @@ export default function Center() { {/* 包时:每日提取上限 */} {({id, field}) => { const value = Number(field.value) || 100 @@ -159,7 +159,7 @@ export default function Center() { className={`h-10 w-10 border border-gray-200 rounded-sm flex items-center justify-center text-lg ${ value === minValue ? 'opacity-50 cursor-not-allowed' : '' }`} - onClick={() => form.setValue('quota', Math.max(minValue, value - step))} + onClick={() => form.setValue('daily_limit', Math.max(minValue, value - step))} disabled={value === minValue}> @@ -172,7 +172,7 @@ export default function Center() { theme="outline" type="button" className="h-10 w-10 border border-gray-200 rounded-sm flex items-center justify-center text-lg" - onClick={() => form.setValue('quota', value + step)}> + onClick={() => form.setValue('daily_limit', value + step)}> diff --git a/src/components/composites/purchase/long/right.tsx b/src/components/composites/purchase/long/right.tsx index 66e25e6..1a8b3ec 100644 --- a/src/components/composites/purchase/long/right.tsx +++ b/src/components/composites/purchase/long/right.tsx @@ -26,6 +26,7 @@ export default function Right() { const live = useWatch({control, name: 'live'}) const quota = useWatch({control, name: 'quota'}) const expire = useWatch({control, name: 'expire'}) + const dailyLimit = useWatch({control, name: 'daily_limit'}) const [price, setPrice] = useState('0.00') useEffect(() => { @@ -35,12 +36,10 @@ export default function Right() { long: { live: Number(live), mode: Number(mode), - quota: quota, + quota: Number(mode) === 1 ? dailyLimit : quota, expire: Number(mode) === 1 ? Number(expire) : undefined, }, } - console.log(params, 'params') - try { const priceValue = await getPrice(params) if (priceValue.success && priceValue.data?.price) { @@ -56,7 +55,7 @@ export default function Right() { } } price() - }, [expire, live, quota, mode]) + }, [dailyLimit, expire, live, quota, mode]) return ( 每日限额 - {quota} + {dailyLimit} 个 @@ -113,7 +112,7 @@ export default function Right() {

- +
) @@ -126,6 +125,7 @@ function BalanceOrLogin(props: { live: string quota: number expire: string + dailyLimit: number }) { const profile = use(useProfileStore(store => store.profile)) return profile ? ( @@ -186,7 +186,7 @@ function BalanceOrLogin(props: { mode: Number(props.mode), live: Number(props.live), expire: Number(props.expire), - quota: props.quota, + quota: props.mode === '1' ? props.dailyLimit : props.quota, }, }}/> diff --git a/src/components/composites/purchase/short/center.tsx b/src/components/composites/purchase/short/center.tsx index 36597d6..c2a40e2 100644 --- a/src/components/composites/purchase/short/center.tsx +++ b/src/components/composites/purchase/short/center.tsx @@ -17,7 +17,7 @@ export default function Center() { const type = useWatch({name: 'type'}) useEffect(() => { if (type === '1') { - form.setValue('quota', 2000) + form.setValue('daily_limit', 2000) } else { form.setValue('quota', 10000) @@ -138,7 +138,7 @@ export default function Center() { {/* 包时:每日提取上限 */} {({id, field}) => (
@@ -146,7 +146,7 @@ export default function Center() { theme="outline" type="button" className="h-10 w-10 border border-gray-200 rounded-sm flex items-center justify-center text-lg" - onClick={() => form.setValue('quota', Math.max(2_000, Number(field.value) - 1_000))} + onClick={() => form.setValue('daily_limit', Math.max(2_000, Number(field.value) - 1_000))} disabled={Number(field.value) === 2_000}> @@ -162,7 +162,7 @@ export default function Center() { theme="outline" type="button" className="h-10 w-10 border border-gray-200 rounded-sm flex items-center justify-center text-lg" - onClick={() => form.setValue('quota', Number(field.value) + 1_000)}> + onClick={() => form.setValue('daily_limit', Number(field.value) + 1_000)}>
diff --git a/src/components/composites/purchase/short/right.tsx b/src/components/composites/purchase/short/right.tsx index 5c26af8..547bd77 100644 --- a/src/components/composites/purchase/short/right.tsx +++ b/src/components/composites/purchase/short/right.tsx @@ -24,6 +24,7 @@ export default function Right() { const mode = useWatch({control, name: 'type'}) const expire = useWatch({control, name: 'expire'}) const quota = useWatch({control, name: 'quota'}) + const dailyLimit = useWatch({control, name: 'daily_limit'}) const [price, setPrice] = useState('0.00') useEffect(() => { const price = async () => { @@ -32,12 +33,10 @@ export default function Right() { short: { live: Number(live), mode: Number(mode), - quota: quota, + quota: Number(mode) === 1 ? dailyLimit : quota, expire: Number(mode) === 1 ? Number(expire) : undefined, }, } - console.log(params, 'params') - try { const priceResponse = await getPrice(params) if (priceResponse.success && priceResponse.data?.price) { @@ -53,7 +52,7 @@ export default function Right() { } } price() - }, [expire, live, quota, mode]) + }, [expire, live, quota, mode, dailyLimit]) return ( 每日限额 - {quota} + {dailyLimit} 个 @@ -111,7 +110,7 @@ export default function Right() {

- +
) @@ -124,6 +123,7 @@ function BalanceOrLogin(props: { live: string quota: number expire: string + dailyLimit: number }) { const profile = use(useProfileStore(store => store.profile)) return profile ? ( @@ -184,7 +184,7 @@ function BalanceOrLogin(props: { mode: Number(props.mode), live: Number(props.live), expire: Number(props.expire), - quota: props.quota, + quota: props.mode === '1' ? props.dailyLimit : props.quota, }, }}/>