空数据提示

This commit is contained in:
caishi 2023-09-25 15:37:10 +08:00
parent 3b6a34920a
commit 98358de1bb
2 changed files with 13 additions and 3 deletions

View File

@ -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) {

View File

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