Browse Source

模式没改变不查询

visuddhinanda 2 years ago
parent
commit
4ed4526d73
1 changed files with 4 additions and 2 deletions
  1. 4 2
      dashboard/src/components/article/Article.tsx

+ 4 - 2
dashboard/src/components/article/Article.tsx

@@ -131,7 +131,9 @@ const ArticleWidget = ({
     if (!active) {
       return;
     }
-
+    if (mode === articleMode) {
+      return;
+    }
     //发布mode变更
     //store.dispatch(modeChange(mode));
     if (mode !== articleMode && mode !== "read" && articleMode !== "read") {
@@ -197,7 +199,7 @@ const ArticleWidget = ({
           }
           break;
       }
-      console.log("url", url);
+      console.log("article url", url);
       setShowSkeleton(true);
       get<IArticleResponse>(url)
         .then((json) => {