mirror of
https://github.com/PlayEdu/backend
synced 2025-12-23 18:29:34 +08:00
系统管理有相关api请求逻辑优化
This commit is contained in:
@@ -21,8 +21,10 @@ export const SystemAdministratorCreate: React.FC<PropInterface> = ({
|
||||
const [roles, setRoles] = useState<any>([]);
|
||||
|
||||
useEffect(() => {
|
||||
getParams();
|
||||
}, [refresh]);
|
||||
if (open) {
|
||||
getParams();
|
||||
}
|
||||
}, [refresh, open]);
|
||||
|
||||
useEffect(() => {
|
||||
let roleIds = [];
|
||||
|
||||
@@ -21,8 +21,10 @@ export const SystemAdministratorUpdate: React.FC<PropInterface> = ({
|
||||
const [roles, setRoles] = useState<any>([]);
|
||||
|
||||
useEffect(() => {
|
||||
getParams();
|
||||
}, [refresh]);
|
||||
if (open) {
|
||||
getParams();
|
||||
}
|
||||
}, [refresh, open]);
|
||||
|
||||
useEffect(() => {
|
||||
if (id === 0) {
|
||||
|
||||
Reference in New Issue
Block a user