供应链平台iframe嵌入的页面,需要支持后台配置ip地址

This commit is contained in:
谢思 2025-10-13 17:08:02 +08:00
parent d2fabf4695
commit b94068b585
2 changed files with 9 additions and 3 deletions

View File

@ -1,10 +1,14 @@
import React, { useEffect } from "react";
function Sbom(props) {
const {mygetHelmetapi} = props;
const {common} = mygetHelmetapi || {};
const {governance="http://172.16.6.252:10010"} = common || {};
const { projectsId, owner } = props.match.params;
const str = projectsId.replace(/\./g, "_")
// const url = `http://localhost:3007/gagaga/accepts_1.3.8/sbom`
const url = `http://172.16.6.252:10010/governancePortal/sbom/${str}`
const url = `${governance}/governancePortal/sbom/${str}`
// useEffect(() => {
// window.addEventListener("message", iframeHeight, false);

View File

@ -1,13 +1,15 @@
import React, { useEffect } from "react";
import { TPMIndexHOC } from "../modules/tpm/TPMIndexHOC";
function Sbom(props) {
const {current_user} = props;
const {current_user, mygetHelmetapi} = props;
const {admin, user_id} = current_user || {}
const {common} = mygetHelmetapi || {};
const {governance="http://172.16.6.252:10010"} = common || {};
useEffect(()=>{
document.title = '供应链监测预警平台';
}, [])
const url = `http://172.16.6.252:10010/governancePortal/governance/home?token=${admin?"admin123": user_id}`
const url = `${governance}/governancePortal/governance/home?token=${admin?"admin123": user_id}`
// const url = "http://localhost:3007/"
return <div className="" style={{border: "none"}}>