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, }, }}/>