From 5db1e8b15ac0d0b2f54426358200c77658ce7e0d Mon Sep 17 00:00:00 2001 From: speakeloudest Date: Mon, 15 Sep 2025 20:31:10 -0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BD=A3=E9=87=91=E6=8F=90=E7=8E=B0?= =?UTF-8?q?=E5=92=8C=E5=A4=87=E6=B3=A8=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- apps/admin/app/dashboard/user/page.tsx | 17 +++++++---- .../app/dashboard/withdraw-ticket/page.tsx | 28 ++++--------------- apps/admin/services/admin/typings.d.ts | 1 + .../components/Withdraw/WithdrawDialog.tsx | 2 +- 5 files changed, 20 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 9fa816b..261a51e 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ unset APP_NAME # 显式销毁变量 1. 执行 `./scripts/publish-dev.sh` 构建产物在 out-dev文件夹 2. 上传out/zip.gz到服务器 3. tar -xzvf ppanel-user-web-dev.tar.gz 解压 -4. tar -xzvf ppanel-user-web-dev.tar.gz +4. tar -xzvf ppanel-admin-web-dev.tar.gz ```shell # 第一次启动 diff --git a/apps/admin/app/dashboard/user/page.tsx b/apps/admin/app/dashboard/user/page.tsx index c12071f..3b78474 100644 --- a/apps/admin/app/dashboard/user/page.tsx +++ b/apps/admin/app/dashboard/user/page.tsx @@ -20,16 +20,23 @@ import { ConfirmButton } from '@workspace/ui/custom-components/confirm-button'; import { formatDate } from '@workspace/ui/utils'; import { useTranslations } from 'next-intl'; import Link from 'next/link'; -import { useRef, useState } from 'react'; +import React, { useRef, useState } from 'react'; import { toast } from 'sonner'; import { UserDetail } from './user-detail'; import UserForm from './user-form'; -// 新的子组件,现在管理它自己的备注状态 -const RemarkForm = ({ onSave, initialRemark, CloseComponent }) => { - const [remark, setRemark] = useState(initialRemark); +// 为 RemarkForm 组件定义 props 类型 +interface RemarkFormProps { + initialRemark?: string | null; + onSave: (remark: string) => void; + CloseComponent: React.ComponentType<{ asChild?: boolean; children: React.ReactNode }>; +} - const handleInputChange = (event) => { +// 新的子组件,在管理它自己的备注状态 +const RemarkForm: React.FC = ({ onSave, initialRemark, CloseComponent }) => { + const [remark, setRemark] = useState(initialRemark ?? ''); + + const handleInputChange = (event: React.ChangeEvent) => { setRemark(event.target.value); }; diff --git a/apps/admin/app/dashboard/withdraw-ticket/page.tsx b/apps/admin/app/dashboard/withdraw-ticket/page.tsx index 0c8ff67..51b6117 100644 --- a/apps/admin/app/dashboard/withdraw-ticket/page.tsx +++ b/apps/admin/app/dashboard/withdraw-ticket/page.tsx @@ -64,32 +64,13 @@ export default function Page() { header: t('user'), cell: ({ row }) => , }, - { - accessorKey: 'status', - header: t('status.0'), - cell: ({ row }) => ( - - {t(`status.${row.original.status}`)} - - ), - }, { accessorKey: 'updated_at', header: t('updatedAt'), cell: ({ row }) => formatDate(row.getValue('updated_at')), }, ]} - params={[ + /* params={[ { key: 'status', placeholder: t('status.0'), @@ -100,11 +81,12 @@ export default function Page() { }, ], }, - ]} + ]}*/ request={async (pagination, filters) => { const { data } = await getTicketList({ ...pagination, ...filters, + issue_type: 1, }); return { list: data.data?.list || [], @@ -166,11 +148,11 @@ export default function Page() {
提现金额:{ticket?.title?.split('-')[1]}
提现方式:{ticket?.description?.split('-')[0]}
- {ticket?.description?.split('-')[1].includes('data:image') ? ( + {ticket?.description?.split('-')[1]?.includes('data:image') ? (
收款码:
{ size: 1, issue_type: 1, }); - if (ticketData?.list?.length > 1) { + if (ticketData?.list?.length > 0) { toast.info('已经存在待处理提现,请耐心等待'); return; }