完善页尾链接功能与样式 & 修复表单提交触发问题

This commit is contained in:
2025-12-18 12:25:52 +08:00
parent dc331b63a5
commit 040ddd674b
6 changed files with 22 additions and 45 deletions

View File

@@ -1,27 +1,16 @@
## TODO
表单提交失效?
长效动态统计
页头
- 产品订购 - 网站公告
页头产品订购 - 网站公告
页尾
- 服务保障跳转企业微信
- 站点导航 - 企业服务(删除推广返利)
- 可以缩短页尾,正好一列四个链接
- 底边距太大,需要适当缩窄
页尾服务保障跳转企业微信
首页
- 推荐文章
首页推荐文章
购买页
- 固定套餐
购买页固定套餐
后台导航改进
价格:原价和折扣价
价格展示原价和折扣价
### 禁止直接依赖 form

View File

@@ -6,7 +6,7 @@ export type FooterProps = {}
export default function Footer(props: FooterProps) {
return (
<footer className="bg-gray-900 text-white overflow-hidden">
<Wrap className="flex flex-col px-4 py-8 lg:p-12">
<Wrap className="flex flex-col p-4 pt-12">
<div className="flex-auto overflow-hidden flex flex-wrap justify-between">
<div className="flex flex-col lg:items-center gap-2 max-lg:w-1/2">
<Image src="/img/qrcode.jpg" alt="logo" width={80} height={80} unoptimized className="flex-none size-20 sm:size-44 bg-gray-100"/>
@@ -28,8 +28,7 @@ export default function Footer(props: FooterProps) {
{name: `产品订购`, href: `/product`},
{name: `获取代理`, href: `/collect`},
{name: `帮助中心`, href: `/docs`},
{name: `企业服务`, href: `#`},
{name: `推广返利`, href: `#`},
{name: `企业服务`, href: `/custom`},
]}
/>
<SiteNavList
@@ -65,7 +64,9 @@ export default function Footer(props: FooterProps) {
<div className="flex-none mt-6 pt-6 border-t border-gray-700 flex flex-col text-gray-300">
<p className="text-xs">
IP服务使IP从事的任何行为均不代表蓝狐代理IP的意志和观点使
IP服务使IP从事的任何行为均不代表蓝狐代理IP的意志和观点
<br/>
使
</p>
<p className={`text-xs mt-3 `}> | ICP备17004061号-17 | B1-20190663</p>
</div>
@@ -87,7 +88,7 @@ function SiteNavList(props: {
<ul
className={[
`mt-1 flex flex-wrap gap-2 `,
`lg:mt-4 lg:h-[184px] lg:flex-col lg:gap-4 lg:gap-x-6`,
`lg:mt-4 lg:h-[168px] lg:flex-col lg:gap-4 lg:gap-x-6`,
].join(' ')}>
{props.items.map((item, index) => (
<li key={index}>

View File

@@ -90,7 +90,7 @@ export default function BillsPage(props: BillsPageProps) {
<div>
</div>
<Form form={form} onSubmit={onSubmit} className="flex items-end gap-4 flex-wrap">
<Form form={form} handler={form.handleSubmit(onSubmit)} className="flex items-end gap-4 flex-wrap">
<FormField name="type" label={<span className="text-sm"></span>}>
{({id, field}) => (
<Select value={field.value} onValueChange={field.onChange}>

View File

@@ -13,7 +13,6 @@ import logoAvatar from '@/assets/logo-avatar.svg'
import logoText from '@/assets/logo-text.svg'
import {useLayoutStore} from '@/components/stores/layout'
import {useProfileStore} from '@/components/stores/profile'
import {User} from '@/lib/models'
export function Shell(props: {
children: ReactNode
@@ -170,19 +169,20 @@ export function Navbar() {
)}>
<TooltipProvider>
<NavItem href="/admin" icon={<UserRound size={20}/>} label="账户总览" expand={navbar}/>
<NavTitle label="个人信息"/>
<NavItem href="/admin/profile" icon={<UserRoundPen size={20}/>} label="个人中心" expand={navbar}/>
<NavTitle label="快速开始"/>
<NavItem href="/admin/identify" icon={<IdCard size={20}/>} label="实名认证" expand={navbar}/>
<NavItem href="/admin/whitelist" icon={<LockKeyhole size={20}/>} label="白名单" expand={navbar}/>
<NavItem href="/admin/bills" icon={<Wallet size={20}/>} label="我的账单" expand={navbar}/>
<NavTitle label="套餐管理"/>
<NavItem href="/admin/purchase" icon={<ShoppingCart size={20}/>} label="购买套餐" expand={navbar}/>
<NavItem href="/admin/resources" icon={<Package size={20}/>} label="套餐管理" expand={navbar}/>
<NavTitle label="IP 管理"/>
<NavItem href="/admin/extract" icon={<HardDriveUpload size={20}/>} label="提取 IP" expand={navbar}/>
<NavTitle label="个人中心"/>
<NavItem href="/admin/profile" icon={<UserRoundPen size={20}/>} label="基本信息" expand={navbar}/>
<NavItem href="/admin/bills" icon={<Wallet size={20}/>} label="我的账单" expand={navbar}/>
<NavTitle label="资源管理"/>
<NavItem href="/admin/resources" icon={<Package size={20}/>} label="我的套餐" expand={navbar}/>
<NavItem href="/admin/channels" icon={<Eye size={20}/>} label="IP 管理" expand={navbar}/>
<NavItem href="/admin" icon={<Archive size={20}/>} label="提取记录" expand={navbar}/>
<NavItem href="/admin" icon={<ArchiveRestore size={20}/>} label="使用记录" expand={navbar}/>
{/* <NavTitle label="数据统计"/>
<NavItem href="/admin" icon={<ArchiveRestore size={20}/>} label="使用记录" expand={navbar}/> */}
</TooltipProvider>
</section>
</nav>

View File

@@ -148,19 +148,6 @@ export default function WhitelistPage(props: WhitelistPageProps) {
setSelection(new Set(selection))
}
const toggleSelectAll = () => {
if (selection.size === data.list.length) {
setSelection(new Set())
}
else {
const newSelection = new Set<number>()
data.list.forEach((item) => {
newSelection.add(item.id)
})
setSelection(newSelection)
}
}
// ======================
// 表单
// ======================
@@ -316,7 +303,7 @@ export default function WhitelistPage(props: WhitelistPageProps) {
<Form<SchemaType>
className="flex flex-col gap-4 py-4"
form={form}
onSubmit={onSubmit}>
handler={form.handleSubmit(onSubmit)}>
<FormField name="host" label="IP地址">
{({id, field}) => (
<div className="flex gap-2">

View File

@@ -144,7 +144,7 @@ export default function RechargeModal(props: RechargeModelProps) {
{!trade ? (
<>
<DialogTitle className="flex flex-col gap-2"></DialogTitle>
<Form form={form} onSubmit={createRecharge} className="flex flex-col gap-8">
<Form form={form} handler={form.handleSubmit(createRecharge)} className="flex flex-col gap-8">
{/* 充值额度 */}
<FormField<Schema> name="amount" label="充值额度" className="flex flex-col gap-4">
{({id, field}) => (