From 139f6840c17ef9f4ce1ef68b3c555ebb5f3d56fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Thu, 7 Mar 2024 08:51:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9Enull?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/tpm/TPMIndexHOC.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/tpm/TPMIndexHOC.js b/src/modules/tpm/TPMIndexHOC.js index 22ec40fd..156240d5 100644 --- a/src/modules/tpm/TPMIndexHOC.js +++ b/src/modules/tpm/TPMIndexHOC.js @@ -129,9 +129,11 @@ export function TPMIndexHOC(WrappedComponent) { console.log(this.props.history.location); getOrzCompanyList().then(res=>{ console.log(res); - this.setState({ - companyList:res.data.rows - }) + if(res){ + this.setState({ + companyList:res.data.rows + }) + } }) }