fix tenant case sensitive

master
Aaron Yu 2022-11-12 16:17:37 +08:00
parent 711c50c609
commit a4f813c440
2 changed files with 5 additions and 2 deletions

View File

@ -199,7 +199,7 @@ class App extends React.Component {
value={loginForm.account} value={loginForm.account}
variant="standard" variant="standard"
onChange={(e) => this.setLoginForm({ account: e.target.value })} onChange={(e) => this.setLoginForm({ account: e.target.value })}
onKeyDown={(e) => e.keyCode == 13 && this.login()} onKeyDown={(e) => e.keyCode === 13 && this.login()}
/> />
<TextField <TextField
autoFocus autoFocus
@ -211,7 +211,7 @@ class App extends React.Component {
value={loginForm.password} value={loginForm.password}
variant="standard" variant="standard"
onChange={(e) => this.setLoginForm({ password: e.target.value })} onChange={(e) => this.setLoginForm({ password: e.target.value })}
onKeyDown={(e) => e.keyCode == 13 && this.login()} onKeyDown={(e) => e.keyCode === 13 && this.login()}
/> />
</DialogContent> </DialogContent>
<DialogActions> <DialogActions>

View File

@ -12,6 +12,9 @@ export async function UserLogin(loginForm) {
method: "POST", method: "POST",
}); });
var result = await response.json(); var result = await response.json();
result.permissionPages = result.permissionPages.map((permission) =>
permission.toLowerCase()
);
return result; return result;
} catch (error) { } catch (error) {
console.log(error); console.log(error);