代码修改
This commit is contained in:
1 parent
8f5af46ec2
commit
8f75e12871
168 files changed
+76575
No files matched your search
@@ -0,0 +1,44 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useTheme } from "../contexts/ThemeContext";
|
||||
import { requestCrudService } from "@/service/request-axios-service";
|
||||
import "./css/KnowledgeBaseResourceManagement.css";
|
||||
|
||||
import { PageType } from "../components/Sidebar";
|
||||
|
||||
interface NetworkActorResourceManagementProps {
|
||||
onNavigate: (page: PageType) => void;
|
||||
}
|
||||
|
||||
const NetworkActorResourceManagement: React.FC<
|
||||
NetworkActorResourceManagementProps
|
||||
> = ({ onNavigate }) => {
|
||||
const { theme } = useTheme();
|
||||
const isDark = theme === "dark";
|
||||
const [iframeUrl, setIframeUrl] = useState("");
|
||||
const b2SearchUrl = import.meta.env.VITE_AIPI_B2ACTOR_URL;
|
||||
|
||||
// const service = requestCrudService;
|
||||
useEffect(() => {
|
||||
initIframeUrl();
|
||||
}, []);
|
||||
const initIframeUrl = async () => {
|
||||
// const url = `${knowledgeURL}/#/knowledge/knowledge-search?isIframe=true`;
|
||||
|
||||
const jsonStr = localStorage.getItem("userInfo");
|
||||
console.log("jsonStr", jsonStr);
|
||||
// if (jsonStr) {
|
||||
// const userInfo = JSON.parse(jsonStr);
|
||||
// console.log("userInfo", userInfo);
|
||||
// }
|
||||
console.log({ iframeUrl: `${b2SearchUrl}/fromB/toXWT?isFrame=1` });
|
||||
setIframeUrl(`${b2SearchUrl}/fromB/toXWT?isFrame=1`);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="iframe-container">
|
||||
<iframe src={iframeUrl} className="full-size-iframe"></iframe>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default NetworkActorResourceManagement;
|
||||
Reference in new issue
Block a user