From f9e9df1e43014e67580ad03dc86854a55673403d Mon Sep 17 00:00:00 2001
From: liuwh <hugeinfo123>
Date: Thu, 30 Apr 2020 17:38:23 +0800
Subject: [PATCH] 爬虫词条管理

---
 src/components/common/TopListTableView/index.jsx |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/components/common/TopListTableView/index.jsx b/src/components/common/TopListTableView/index.jsx
index 595b4a9..edb1878 100644
--- a/src/components/common/TopListTableView/index.jsx
+++ b/src/components/common/TopListTableView/index.jsx
@@ -27,14 +27,15 @@
     fetch({
       url: `api/merits/queryMerits`
     }).then(res => {
-      console.log('res', res);
-      this.setState({
-        topList: [
-          { ...tag['latenessRanking'], dataSource: res['latenessRanking'] },
-          { ...tag['meritsRanking'], dataSource: res['meritsRanking'] },
-          { ...tag['defectRanking'], dataSource: res['defectRanking'] },
-        ]
-      })
+      if( res) {
+        this.setState({
+          topList: [
+            { ...tag['latenessRanking'], dataSource: res['latenessRanking'] },
+            { ...tag['meritsRanking'], dataSource: res['meritsRanking'] },
+            { ...tag['defectRanking'], dataSource: res['defectRanking'] },
+          ]
+        })
+      }
     })
   }
 
@@ -57,7 +58,6 @@
 
   render() {
     let { topList } = this.state;
-    console.log(topList)
     return (
       <div className="top-list-table-view-main">
         <Row type="flex" gutter={12}>

--
Gitblit v1.8.0