Fix getAccount() bug
This commit is contained in:
parent
737dd4df4e
commit
081b88a2be
|
@ -126,18 +126,14 @@ class App extends Component {
|
|||
getAccount() {
|
||||
AccountBackend.getAccount()
|
||||
.then((res) => {
|
||||
if (res.status === "ok") {
|
||||
const account = res.data;
|
||||
if (account !== null) {
|
||||
this.setLanguage(account);
|
||||
}
|
||||
|
||||
this.setState({
|
||||
account: account,
|
||||
});
|
||||
} else {
|
||||
Setting.showMessage("error", `Failed to get account: ${res.msg}`);
|
||||
Setting.goToLink("/signin");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ export let CasdoorSdk;
|
|||
|
||||
export function initServerUrl() {
|
||||
const hostname = window.location.hostname;
|
||||
if (hostname === "localhost" || hostname === "127.0.0.1") {
|
||||
if (hostname === "localhost") {
|
||||
ServerUrl = `http://${hostname}:14000`;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -145,7 +145,7 @@ class StoreListPage extends React.Component {
|
|||
title: i18next.t("general:Action"),
|
||||
dataIndex: "action",
|
||||
key: "action",
|
||||
width: "300px",
|
||||
width: "400px",
|
||||
render: (text, record, index) => {
|
||||
return (
|
||||
<div>
|
||||
|
|
Loading…
Reference in New Issue