Răsfoiți Sursa

书列表添加标签

visuddhinanda 1 an în urmă
părinte
comite
7133df7292

+ 8 - 3
dashboard-v4/dashboard/src/components/fts/FtsBookList.tsx

@@ -4,6 +4,9 @@ import { useEffect, useState } from "react";
 import { get } from "../../request";
 import { Key } from "antd/es/table/interface";
 import { DataNode } from "antd/es/tree";
+import { ISearchView } from "./FullTextSearchResult";
+import { ITag } from "../api/Tag";
+
 const { Text } = Typography;
 interface IFtsData {
   book: number;
@@ -12,8 +15,9 @@ interface IFtsData {
   paliTitle: string;
   pcdBookId: number;
   count: number;
+  tags?: ITag[];
 }
-interface IFtsResponse {
+export interface IFtsResponse {
   ok: boolean;
   string: string;
   data: {
@@ -32,7 +36,7 @@ interface IWidget {
   para?: number;
   match?: string | null;
   keyWord2?: string;
-  view?: string;
+  view?: ISearchView;
   onSelect?: Function;
 }
 
@@ -92,8 +96,9 @@ const FtsBookListWidget = ({
     if (match) {
       url += `&match=${match}`;
     }
-    console.log("url", url);
+    console.info("api request", url);
     get<IFtsResponse>(url).then((json) => {
+      console.info("api response", json);
       if (json.ok) {
         console.log("data", json.data.rows);
         let totalResult = 0;