From 98358de1bbb3815b4e5a3cc15488cabd0f0debe3 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Mon, 25 Sep 2023 15:37:10 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A9=BA=E6=95=B0=E6=8D=AE=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AppConfig.js | 2 +- src/forge/Information/Pages/selfList.jsx | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/AppConfig.js b/src/AppConfig.js index 9ca6363a..cf7fe8b6 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -25,7 +25,7 @@ if (isDev) { } debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' : window.location.search.indexOf('debug=s') !== -1 ? 'student' : - window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || '' + window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin' } window._debugType = debugType; export function initAxiosInterceptors(props) { diff --git a/src/forge/Information/Pages/selfList.jsx b/src/forge/Information/Pages/selfList.jsx index 9f87a96d..74d11df2 100644 --- a/src/forge/Information/Pages/selfList.jsx +++ b/src/forge/Information/Pages/selfList.jsx @@ -67,7 +67,12 @@ function SelfList(props){ pageSize:limit, pageNum:page }).then(result=>{ - setList(result.data.rows); + let rows = result.data && result.data.rows; + if(rows && rows.length>0){ + setList(rows); + }else{ + setList([]); + } setTotal(result.data.total); setIsSpin(false); }) @@ -79,7 +84,12 @@ function SelfList(props){ pageSize:limit, pageNum:page }).then(result=>{ - setList(result.data.rows); + let rows = result.data && result.data.rows; + if(rows && rows.length>0){ + setList(rows); + }else{ + setList([]); + } setTotal(result.data.total); setIsSpin(false); })