From 122e33a1e37b9f50deb1f815cef5fda44367ec7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 19 Jul 2019 17:01:31 +0800 Subject: [PATCH] b --- public/react/src/modules/tpm/SiderBar.js | 25 ++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/tpm/SiderBar.js b/public/react/src/modules/tpm/SiderBar.js index aabc9640..b7f5b5ec 100644 --- a/public/react/src/modules/tpm/SiderBar.js +++ b/public/react/src/modules/tpm/SiderBar.js @@ -14,13 +14,26 @@ class SiderBar extends Component { componentDidMount() { window._initSider(); - + var trophy_uid = false; + if (window.localStorage) { + trophy_uid = localStorage.getItem('trophy_uid'); + } else { + trophy_uid = false + } + if(trophy_uid==="true"||trophy_uid===true){ + this.setState({ + trophyreturn:true + }) + } + } - trophyreturnfun=()=>{ - this.setState({ - trophyreturn:true - }) - } + + trophyreturnfun=()=>{ + this.setState({ + trophyreturn:true + }) + localStorage.setItem('trophy_uid', true); + } render() { return (