Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
7811f748
authored
Apr 07, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 账单第一页不展示
parent
9c8ca7dd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
13 deletions
+5
-13
src/hooks/usePaging.ts
+4
-3
src/pages/number/components/PayModal.tsx
+1
-10
No files found.
src/hooks/usePaging.ts
View file @
7811f748
import
{
useState
,
useCallback
}
from
'react'
;
import
{
useState
,
useCallback
,
useEffect
}
from
'react'
;
import
type
{
PagingData
}
from
'../types/index'
;
import
type
{
PagingData
}
from
'../types/index'
;
import
{
useQuery
}
from
'@tanstack/react-query'
;
import
{
useToast
}
from
'./useToast'
;
import
{
useToast
}
from
'./useToast'
;
export
const
usePaging
=
<
T
=
any
>
({
export
const
usePaging
=
<
T
=
any
>
({
...
@@ -64,7 +63,9 @@ export const usePaging = <T = any>({
...
@@ -64,7 +63,9 @@ export const usePaging = <T = any>({
getData
(
pageNum
+
1
);
getData
(
pageNum
+
1
);
},
[
getData
,
isLoadAll
,
pageNum
,
requesting
]);
},
[
getData
,
isLoadAll
,
pageNum
,
requesting
]);
useQuery
([
'init'
],
()
=>
getData
(
1
,
true
));
useEffect
(()
=>
{
getData
(
1
,
true
);
},
[]);
return
{
return
{
pageNum
,
pageNum
,
...
...
src/pages/number/components/PayModal.tsx
View file @
7811f748
...
@@ -10,21 +10,12 @@ import {
...
@@ -10,21 +10,12 @@ import {
Button
,
Button
,
Input
,
Input
,
Box
,
Box
,
Grid
,
Grid
Table
,
Thead
,
Tbody
,
Tr
,
Th
,
Td
,
TableContainer
}
from
'@chakra-ui/react'
;
}
from
'@chakra-ui/react'
;
import
{
getPayCode
,
checkPayResult
}
from
'@/api/user'
;
import
{
getPayCode
,
checkPayResult
}
from
'@/api/user'
;
import
{
useToast
}
from
'@/hooks/useToast'
;
import
{
useToast
}
from
'@/hooks/useToast'
;
import
{
useQuery
}
from
'@tanstack/react-query'
;
import
{
useQuery
}
from
'@tanstack/react-query'
;
import
{
useRouter
}
from
'next/router'
;
import
{
useRouter
}
from
'next/router'
;
import
{
modelList
}
from
'@/constants/model'
;
import
{
formatPrice
}
from
'../../../utils/user'
;
const
PayModal
=
({
onClose
}:
{
onClose
:
()
=>
void
})
=>
{
const
PayModal
=
({
onClose
}:
{
onClose
:
()
=>
void
})
=>
{
const
router
=
useRouter
();
const
router
=
useRouter
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment