变更首页底部信息&更新登录card里的tab
This commit is contained in:
@@ -2,12 +2,12 @@
|
|||||||
import {Input} from '@/components/ui/input'
|
import {Input} from '@/components/ui/input'
|
||||||
import {Button} from '@/components/ui/button'
|
import {Button} from '@/components/ui/button'
|
||||||
import {Checkbox} from '@/components/ui/checkbox'
|
import {Checkbox} from '@/components/ui/checkbox'
|
||||||
import {Card, CardHeader, CardContent, CardTitle} from '@/components/ui/card'
|
import {Card, CardContent} from '@/components/ui/card'
|
||||||
import {Form, FormField} from '@/components/ui/form'
|
import {Form, FormField} from '@/components/ui/form'
|
||||||
import {Label} from '@/components/ui/label'
|
import {Label} from '@/components/ui/label'
|
||||||
import {Tabs, TabsList, TabsTrigger} from '@/components/ui/tabs'
|
import {Tabs, TabsList, TabsTrigger} from '@/components/ui/tabs'
|
||||||
import {EyeClosedIcon, EyeIcon} from 'lucide-react'
|
import {EyeClosedIcon, EyeIcon} from 'lucide-react'
|
||||||
import {useEffect, useState} from 'react'
|
import {useState, ReactNode} from 'react'
|
||||||
import zod from 'zod'
|
import zod from 'zod'
|
||||||
import {useForm} from 'react-hook-form'
|
import {useForm} from 'react-hook-form'
|
||||||
import {zodResolver} from '@hookform/resolvers/zod'
|
import {zodResolver} from '@hookform/resolvers/zod'
|
||||||
@@ -16,6 +16,7 @@ import {useRouter} from 'next/navigation'
|
|||||||
import {login} from '@/actions/auth'
|
import {login} from '@/actions/auth'
|
||||||
import {useProfileStore} from '@/components/stores-provider'
|
import {useProfileStore} from '@/components/stores-provider'
|
||||||
import Captcha from './captcha'
|
import Captcha from './captcha'
|
||||||
|
import {merge} from '@/lib/utils'
|
||||||
|
|
||||||
const smsSchema = zod.object({
|
const smsSchema = zod.object({
|
||||||
username: zod.string().length(11, '请输入正确的手机号码'),
|
username: zod.string().length(11, '请输入正确的手机号码'),
|
||||||
@@ -77,9 +78,6 @@ export default function LoginCard(props: {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Card className="w-96 mx-4 shadow-lg relative z-20">
|
<Card className="w-96 mx-4 shadow-lg relative z-20">
|
||||||
<CardHeader className="text-center">
|
|
||||||
<CardTitle className="text-2xl">登录/注册</CardTitle>
|
|
||||||
</CardHeader>
|
|
||||||
<CardContent className="px-8">
|
<CardContent className="px-8">
|
||||||
{/* 登录方式切换 */}
|
{/* 登录方式切换 */}
|
||||||
<Tabs
|
<Tabs
|
||||||
@@ -89,13 +87,9 @@ export default function LoginCard(props: {
|
|||||||
form.reset({username: form.getValues('username'), password: '', remember: false})
|
form.reset({username: form.getValues('username'), password: '', remember: false})
|
||||||
}}
|
}}
|
||||||
className="mb-6">
|
className="mb-6">
|
||||||
<TabsList className="w-full h-10 flex justify-center gap-2">
|
<TabsList className="w-full p-2 bg-white rounded-lg justify-start md:justify-center overflow-auto">
|
||||||
<TabsTrigger value="password" className="flex-1">
|
<Tab value="password">密码登录</Tab>
|
||||||
密码登录
|
<Tab value="phone_code">验证码登录</Tab>
|
||||||
</TabsTrigger>
|
|
||||||
<TabsTrigger value="phone_code" className="flex-1">
|
|
||||||
验证码登录
|
|
||||||
</TabsTrigger>
|
|
||||||
</TabsList>
|
</TabsList>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
<Form<LoginSchema> className="space-y-6" form={form} handler={handler}>
|
<Form<LoginSchema> className="space-y-6" form={form} handler={handler}>
|
||||||
@@ -185,3 +179,21 @@ export default function LoginCard(props: {
|
|||||||
</Card>
|
</Card>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function Tab(props: {
|
||||||
|
value: string
|
||||||
|
children: ReactNode
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<TabsTrigger
|
||||||
|
className={merge(
|
||||||
|
`w-36 h-12 text-base font-normal flex-none`,
|
||||||
|
`data-[state=active]:text-primary data-[state=active]:bg-primary-muted`,
|
||||||
|
)}
|
||||||
|
value={props.value}
|
||||||
|
>
|
||||||
|
{props.children}
|
||||||
|
</TabsTrigger>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -15,8 +15,8 @@ export default function Footer(props: FooterProps) {
|
|||||||
<div className="flex flex-col gap-2 lg:gap-4 max-lg:w-1/2">
|
<div className="flex flex-col gap-2 lg:gap-4 max-lg:w-1/2">
|
||||||
<h3>商务合作</h3>
|
<h3>商务合作</h3>
|
||||||
<p className={`text-sm text-gray-500 `}>大客户经理:张经理</p>
|
<p className={`text-sm text-gray-500 `}>大客户经理:张经理</p>
|
||||||
<p className={`text-sm text-gray-500 `}>电话/微信:18751847847</p>
|
<p className={`text-sm text-gray-500 `}>电话/微信:177 9666 8888</p>
|
||||||
<p className={`text-sm text-gray-500 `}>QQ号:800180559</p>
|
<p className={`text-sm text-gray-500 `}>QQ号:70177252</p>
|
||||||
<h3 className="hidden sm:block">服务保障</h3>
|
<h3 className="hidden sm:block">服务保障</h3>
|
||||||
<p className="text-sm text-gray-500 hidden sm:block">售前服务</p>
|
<p className="text-sm text-gray-500 hidden sm:block">售前服务</p>
|
||||||
<p className="text-sm text-gray-500 hidden sm:block">技术支持</p>
|
<p className="text-sm text-gray-500 hidden sm:block">技术支持</p>
|
||||||
@@ -79,19 +79,11 @@ export default function Footer(props: FooterProps) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex-none mt-6 pt-6 border-t border-gray-300 flex flex-col items-center">
|
<div className="flex-none mt-6 pt-6 border-t border-gray-300 flex flex-col items-center">
|
||||||
<p className={`text-sm `}>
|
<p className="text-sm text-center">
|
||||||
声明:啊啊HTTP仅提供代理IP服务;严禁用户使用啊啊HTTP从事任何违法犯罪行为,产生的相关责任用户自负,对此啊啊HTTP不承担任何法律责任。
|
蓝狐代理仅提供IP服务,用户使用蓝狐代理IP从事的任何行为均不代表蓝狐代理IP的意志和观点,与蓝狐代理的立场无关。严禁用户使用蓝狐代理从事任何违法犯罪行为, 产生的相关责任用
|
||||||
<a href="#">自律公约</a>
|
户自负,对此蓝狐代理不承担任何法律责任。
|
||||||
</p>
|
|
||||||
<p className={`text-sm mt-3 `}>
|
|
||||||
南京啊啊啊啊科技有限公司 版权所有网站地图
|
|
||||||
地址:啊啊啊啊啊啊啊啊啊大街57号楚翘城7幢404-405室
|
|
||||||
</p>
|
|
||||||
<p className={`text-sm mt-3 `}>
|
|
||||||
电信业务经营许可证:B1-11111111
|
|
||||||
苏ICP备111111111号-1
|
|
||||||
苏公网安备11111111111111号
|
|
||||||
</p>
|
</p>
|
||||||
|
<p className={`text-sm mt-3 `}>版权所有 河南华连网络科技有限公司 | 豫ICP备17004061号-17 | 增值电信业务经营许可证:B1-20190663</p>
|
||||||
</div>
|
</div>
|
||||||
</Wrap>
|
</Wrap>
|
||||||
</footer>
|
</footer>
|
||||||
|
|||||||
Reference in New Issue
Block a user