操作页面跳转添加返回上一级功能
This commit is contained in:
@@ -88,15 +88,17 @@ export default function BalancePage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page>
|
||||||
<Button
|
<div>
|
||||||
onClick={() => {
|
<Button
|
||||||
router.back()
|
onClick={() => {
|
||||||
}}
|
router.back()
|
||||||
className="gap-2"
|
}}
|
||||||
>
|
className="gap-2"
|
||||||
返回上一级
|
>
|
||||||
</Button>
|
返回上一级
|
||||||
<span className="ml-2 text-gray-600">用户会员号: {userPhone}</span>
|
</Button>
|
||||||
|
<span className="ml-2 text-gray-600">用户会员号: {userPhone}</span>
|
||||||
|
</div>
|
||||||
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
||||||
<div className="flex flex-wrap items-end gap-4">
|
<div className="flex flex-wrap items-end gap-4">
|
||||||
<Controller
|
<Controller
|
||||||
|
|||||||
@@ -107,7 +107,17 @@ export default function BatchPage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page>
|
||||||
{/* 筛选表单 */}
|
<div>
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
router.back()
|
||||||
|
}}
|
||||||
|
className="gap-2"
|
||||||
|
>
|
||||||
|
返回上一级
|
||||||
|
</Button>
|
||||||
|
<span className="ml-2 text-gray-600">用户会员号: {userPhone}</span>
|
||||||
|
</div>
|
||||||
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
||||||
<div className="flex flex-wrap items-end gap-4">
|
<div className="flex flex-wrap items-end gap-4">
|
||||||
<Controller
|
<Controller
|
||||||
|
|||||||
@@ -157,6 +157,17 @@ export default function BillingPage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page>
|
||||||
|
<div>
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
router.back()
|
||||||
|
}}
|
||||||
|
className="gap-2"
|
||||||
|
>
|
||||||
|
返回上一级
|
||||||
|
</Button>
|
||||||
|
<span className="ml-2 text-gray-600">用户会员号: {userPhone}</span>
|
||||||
|
</div>
|
||||||
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
||||||
<div className="flex flex-wrap items-end gap-4">
|
<div className="flex flex-wrap items-end gap-4">
|
||||||
<Controller
|
<Controller
|
||||||
|
|||||||
@@ -107,6 +107,17 @@ export default function ChannelPage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page>
|
||||||
|
<div>
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
router.back()
|
||||||
|
}}
|
||||||
|
className="gap-2"
|
||||||
|
>
|
||||||
|
返回上一级
|
||||||
|
</Button>
|
||||||
|
<span className="ml-2 text-gray-600">用户会员号: {userPhone}</span>
|
||||||
|
</div>
|
||||||
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
||||||
<div className="flex flex-wrap items-end gap-4">
|
<div className="flex flex-wrap items-end gap-4">
|
||||||
<Controller
|
<Controller
|
||||||
|
|||||||
@@ -170,8 +170,23 @@ function getTodayUsage(lastAt: Date | null | undefined, daily: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function ResourcesPage() {
|
export default function ResourcesPage() {
|
||||||
|
const searchParams = useSearchParams()
|
||||||
|
const router = useRouter()
|
||||||
|
const userPhone = searchParams.get("phone")
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page>
|
||||||
|
<div>
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
router.back()
|
||||||
|
}}
|
||||||
|
className="gap-2"
|
||||||
|
>
|
||||||
|
返回上一级
|
||||||
|
</Button>
|
||||||
|
<span className="ml-2 text-gray-600">用户会员号: {userPhone}</span>
|
||||||
|
</div>
|
||||||
<Tabs defaultValue="short">
|
<Tabs defaultValue="short">
|
||||||
<TabsList className="bg-card p-1.5 rounded-lg">
|
<TabsList className="bg-card p-1.5 rounded-lg">
|
||||||
<TabsTrigger
|
<TabsTrigger
|
||||||
@@ -422,8 +437,7 @@ function ResourceList({ resourceType }: ResourceListProps) {
|
|||||||
],
|
],
|
||||||
[isLong, updatingId, handleStatusChange],
|
[isLong, updatingId, handleStatusChange],
|
||||||
)
|
)
|
||||||
const router = useRouter()
|
|
||||||
const userPhone = searchParams.get("phone")
|
|
||||||
return (
|
return (
|
||||||
<div className="space-y-3">
|
<div className="space-y-3">
|
||||||
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
||||||
|
|||||||
@@ -110,7 +110,17 @@ export default function TradePage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page>
|
||||||
{/* 筛选表单 */}
|
<div>
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
router.back()
|
||||||
|
}}
|
||||||
|
className="gap-2"
|
||||||
|
>
|
||||||
|
返回上一级
|
||||||
|
</Button>
|
||||||
|
<span className="ml-2 text-gray-600">用户会员号: {userPhone}</span>
|
||||||
|
</div>
|
||||||
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
||||||
<div className="flex flex-wrap items-end gap-4">
|
<div className="flex flex-wrap items-end gap-4">
|
||||||
<Controller
|
<Controller
|
||||||
|
|||||||
@@ -96,7 +96,10 @@ export function DataTable<T extends Record<string, unknown>>(
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={cn("flex-auto flex flex-col gap-3", props.classNames?.root)}
|
className={cn(
|
||||||
|
"flex-auto flex flex-col gap-3 overflow-hidden",
|
||||||
|
props.classNames?.root,
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
{/* 数据表 */}
|
{/* 数据表 */}
|
||||||
<div className="flex-auto overflow-hidden relative">
|
<div className="flex-auto overflow-hidden relative">
|
||||||
|
|||||||
Reference in New Issue
Block a user