소스 검색

模式没改变不查询

visuddhinanda 3 년 전
부모
커밋
4ed4526d73
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  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) {
     if (!active) {
       return;
       return;
     }
     }
-
+    if (mode === articleMode) {
+      return;
+    }
     //发布mode变更
     //发布mode变更
     //store.dispatch(modeChange(mode));
     //store.dispatch(modeChange(mode));
     if (mode !== articleMode && mode !== "read" && articleMode !== "read") {
     if (mode !== articleMode && mode !== "read" && articleMode !== "read") {
@@ -197,7 +199,7 @@ const ArticleWidget = ({
           }
           }
           break;
           break;
       }
       }
-      console.log("url", url);
+      console.log("article url", url);
       setShowSkeleton(true);
       setShowSkeleton(true);
       get<IArticleResponse>(url)
       get<IArticleResponse>(url)
         .then((json) => {
         .then((json) => {