Optimize code

This commit is contained in:
2023-11-16 09:19:45 +08:00
parent 4a16367f45
commit fedd2f6e8c
6 changed files with 26 additions and 26 deletions

View File

@@ -1,5 +1,5 @@
import React from 'react'
import { r_getUserList } from '@/services/user'
import { r_sys_user } from '@/services/system'
import { COLOR_BACKGROUND, DATABASE_SELECT_SUCCESS } from '@/constants/common.constants'
import { ColumnsType } from 'antd/es/table/interface'
@@ -32,7 +32,7 @@ const User: React.FC = () => {
]
useEffect(() => {
r_getUserList().then((res) => {
r_sys_user().then((res) => {
const data = res.data
if (data.code === DATABASE_SELECT_SUCCESS) {
data.data && setUserList(data.data)