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