Skip to content

Commit

Permalink
修复配置参数显示不出
Browse files Browse the repository at this point in the history
  • Loading branch information
langmansh committed Nov 10, 2021
1 parent cf725c9 commit a622336
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Binary file modified .vs/slnx.sqlite
Binary file not shown.
13 changes: 5 additions & 8 deletions src/view/home/ServerConfigParams.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,22 @@ export default class ServerConfigParams extends React.Component {

loadServerConfigParams = () => {
findServerConfigParams().then(res => {
if (res.code == 0) {
if (res.data.code == 0) {
this.setState({
serverConfigParams: res.data[0]
serverConfigParams: res.data.data[0]
})
}
})
}

render() {
const {serverConfigParams} = this.state;
//if(!serverConfigParams){
// return <Loader spinning={true}/>
//}
if (serverConfigParams == null) {
return <Loader spinning={true} />
if(!serverConfigParams){
return <Loader spinning={true}/>
}

const paramList= Object.entries(serverConfigParams);
console.log("Object.entries(serverConfigParams):", paramList)
/* console.log("Object.entries(serverConfigParams):", paramList)*/

return (
<div>
Expand Down

0 comments on commit a622336

Please sign in to comment.