Fix getAccount() bug

This commit is contained in:
Yang Luo 2023-08-14 02:33:11 +08:00
parent 737dd4df4e
commit 081b88a2be
3 changed files with 9 additions and 13 deletions

View File

@ -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");
}
});
}

View File

@ -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`;
}
}

View File

@ -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>