Browse Source

空数据提示

samhoo 6 years ago
parent
commit
f056896ced
1 changed files with 6 additions and 0 deletions
  1. 6 0
      uas-office-web/wxuasapproval/src/pages/useStatus/UseStatus.jsx

+ 6 - 0
uas-office-web/wxuasapproval/src/pages/useStatus/UseStatus.jsx

@@ -62,6 +62,12 @@ export default class Basic extends Component {
             // "Content-Type": "application/json; charset=UTF-8"
             // "Content-Type": "application/json; charset=UTF-8"
         }).then((response) => {
         }).then((response) => {
             if (response.success) {
             if (response.success) {
+                if(response.data.length==0){
+                    message.error('获取数据失败');
+                    this.setState({
+                        loading: false,
+                    })
+                }
                 let dataSource = response.data[0];
                 let dataSource = response.data[0];
                 DEPART = dataSource.DEPART;
                 DEPART = dataSource.DEPART;
                 USERCOUNT = dataSource.USERCOUNT;
                 USERCOUNT = dataSource.USERCOUNT;