Optimize code

This commit is contained in:
2023-12-07 14:26:26 +08:00
parent 7b3b11413b
commit e1e2a83618
4 changed files with 60 additions and 60 deletions

View File

@@ -237,15 +237,15 @@ const Log: React.FC = () => {
...tableParams.filters
})
.then((res) => {
const data = res.data
if (data.code === DATABASE_SELECT_SUCCESS) {
data.data && setLogData(data.data.records)
data.data &&
const response = res.data
if (response.code === DATABASE_SELECT_SUCCESS) {
response.data && setLogData(response.data.records)
response.data &&
setTableParams({
...tableParams,
pagination: {
...tableParams.pagination,
total: data.data.total
total: response.data.total
}
})
} else {