diff --git a/README.md b/README.md index 4fc0636..48128ce 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,22 @@ ## TODO -验证码读秒用 store 保存到本地,(全局共享读秒时间)? +- 验证码读秒用 store 保存到本地,(全局共享读秒时间)? +- 网页标题根据实际页面变化 +- 检查时间范围选择,限定到一定范围内 +- 将翻页操作反映在路由历史中,可以通过后退返回到上一个翻页状态 +- 使用 pure js 的包代替 canvas,加快编译速度 +- 提取后刷新提取页套餐可用余量 +- 白名单复用表格组件 +- 首次登录弹窗:需要设置初始密码,展示 实名->购买->提取 的流程介绍 +- 提取页表单性能优化,树组件性能优化 +- 检查页面,为后端请求标记 wait 实现防抖机制 +- 页面切换动效 +- 后台页面: + - 总览 + - 提取记录 + - 使用记录 -网页标题根据实际页面变化 - -检查时间范围选择,限定到一定范围内 - -将翻页操作反映在路由历史中,可以通过后退返回到上一个翻页状态 - -使用 pure js 的包代替 canvas,加快编译速度 - -提取后刷新提取页套餐可用余量 - -白名单复用表格组件 - -首次登录弹窗:需要设置初始密码,展示 实名->购买->提取 的流程介绍 - -提取页表单性能优化,树组件性能优化 - -后台页面: -- [ ] 总览 -- [ ] 个人中心 -- [ ] IP 管理 -- [ ] 提取记录 -- [ ] 使用记录 +### 长期 检查扩大服务端组件边界 diff --git a/src/app/admin/identify/page.tsx b/src/app/admin/identify/page.tsx index 107961f..468bac8 100644 --- a/src/app/admin/identify/page.tsx +++ b/src/app/admin/identify/page.tsx @@ -19,7 +19,7 @@ import step1 from './_assets/step1.webp' import step2 from './_assets/step2.webp' import step3 from './_assets/step3.webp' import {Card, CardContent, CardDescription, CardHeader, CardTitle} from '@/components/ui/card' -import {WorkflowIcon} from 'lucide-react' +import {CheckCircle, CheckCircleIcon, WorkflowIcon} from 'lucide-react' export type IdentifyPageProps = {} @@ -120,12 +120,15 @@ export default function IdentifyPage(props: IdentifyPageProps) { {`个人认证`}/

个人认证

-

平台授权支付宝安全认证,不会泄露您的认证信息

+

+ 平台不会收集您的个人信息,您的信息仅用于账户安全认证 +

{profile?.id_token ? ( -
-

已完成实名认证

-
+

+ + 已完成实名认证 +

) : ( diff --git a/src/app/admin/profile/page.tsx b/src/app/admin/profile/page.tsx index 6a808b6..ea36f25 100644 --- a/src/app/admin/profile/page.tsx +++ b/src/app/admin/profile/page.tsx @@ -26,11 +26,13 @@ import { } from '@/components/ui/dialog' import {sendSMS} from '@/actions/verify' import RechargeModal from '@/components/composites/recharge' +import {useRouter} from 'next/navigation' export type ProfilePageProps = {} export default function ProfilePage(props: ProfilePageProps) { + const router = useRouter() const profile = useProfileStore(store => store.profile) // ====================== @@ -67,7 +69,9 @@ export default function ProfilePage(props: ProfilePageProps) {

{profile?.balance}

- +
@@ -79,7 +83,7 @@ export default function ProfilePage(props: ProfilePageProps) { {!profile?.id_token ? <>

为了保障您的账户安全和正常使用服务,请您尽快完成实名认证

- + : <>

@@ -423,7 +427,7 @@ function PasswordForm(props: { diff --git a/src/components/composites/extract/index.tsx b/src/components/composites/extract/index.tsx index f0735ab..e771272 100644 --- a/src/components/composites/extract/index.tsx +++ b/src/components/composites/extract/index.tsx @@ -94,20 +94,37 @@ export default function Extract(props: ExtractProps) { const type = useRef<'copy' | 'open'>('open') const onSubmit = async (values: z.infer) => { - console.log('222', type.current) switch (type.current) { case 'copy': - console.log('copy') const url = new URL(window.location.href).origin - await navigator.clipboard.writeText(`${url}${params}`) + const text = `${url}${params}` + + // 使用 clipboard API 复制链接 + let copied = false + try { + await navigator.clipboard.writeText(text) + copied = true + } + catch (e) { + console.log('剪贴板 API 调用失败,尝试备选方案') + } + + // 使用 document.execCommand 作为备选方案 + if (!copied) { + const textarea = document.createElement('textarea') + textarea.value = text + document.body.appendChild(textarea) + textarea.select() + document.execCommand('copy') + document.body.removeChild(textarea) + } + toast.success('链接已复制到剪贴板') break case 'open': - console.log('open') window.open(params, '_blank') break } - console.log('333') } const getResources = async () => { @@ -451,11 +468,11 @@ export default function Extract(props: ExtractProps) {

{/* 展示链接地址 */} -
+
{params}
diff --git a/src/components/composites/recharge/index.tsx b/src/components/composites/recharge/index.tsx index 9e0b374..b7e8baf 100644 --- a/src/components/composites/recharge/index.tsx +++ b/src/components/composites/recharge/index.tsx @@ -22,6 +22,7 @@ import {Loader} from 'lucide-react' import {RechargeByAlipay, RechargeByAlipayConfirm, RechargeByWechat, RechargeByWechatConfirm} from '@/actions/user' import * as qrcode from 'qrcode' import {useProfileStore} from '@/components/providers/StoreProvider' +import {merge} from '@/lib/utils' const schema = zod.object({ method: zod.enum(['alipay', 'wechat']), @@ -30,7 +31,11 @@ const schema = zod.object({ type Schema = zod.infer -export type RechargeModelProps = {} +export type RechargeModelProps = { + classNames?: { + trigger?: string + } +} export default function RechargeModal(props: RechargeModelProps) { @@ -144,7 +149,7 @@ export default function RechargeModal(props: RechargeModelProps) { return ( - +