From eca533beea2f9088c72fb91b48648d777c4e3eb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Fri, 16 Aug 2024 09:19:25 +0800 Subject: [PATCH 1/3] iframe test --- src/App.js | 11 +++++++++++ src/forge/iframe.jsx | 36 ++++++++++++++++++++++++++++++++++++ src/index.css | 6 +++++- 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 src/forge/iframe.jsx diff --git a/src/App.js b/src/App.js index 66bc88fa9..7e05ec87f 100644 --- a/src/App.js +++ b/src/App.js @@ -159,6 +159,11 @@ const Topic = Loadable({ loading: Loading, }) +const Iframe = Loadable({ + loader: () => import("./forge/iframe"), + loading: Loading, +}); + // 此处仅维护前端可能的一级路由,不用进行项目或者组织判断的字段。 const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder", "glcc","bindlogin", "softbot","zone"]; @@ -338,6 +343,12 @@ class App extends Component { {!pathName || (pathName && pathName.toLowerCase() !== 'glcc') ? : } {/* */} + {/* iframe页面 */} + ( +} + +export default withRouter(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(Iframe)))); \ No newline at end of file diff --git a/src/index.css b/src/index.css index a5d90bc3d..93f8b4557 100644 --- a/src/index.css +++ b/src/index.css @@ -246,6 +246,10 @@ i.color-orange05:hover { border-radius: 6px; background-color: #ffebe9; padding: 10px 8px; - font-size: 12px; + font-size: 12px; margin-bottom: 5px; +} + +.test-iframe { + margin-top: -30px; } \ No newline at end of file From dbdfb4428e1be25d64e9dac3e643e38286870397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Thu, 29 Aug 2024 13:41:02 +0800 Subject: [PATCH 2/3] iframetest --- src/forge/iframe.jsx | 6 +++--- src/index.css | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/forge/iframe.jsx b/src/forge/iframe.jsx index f95108cf1..f7b6ef56e 100644 --- a/src/forge/iframe.jsx +++ b/src/forge/iframe.jsx @@ -15,9 +15,9 @@ const Iframe = (props) => { // } function iframeLoad() { - // let myIframe = document.getElementById("iframe"); - // myIframe.height = `${document.documentElement.clientHeight - 300}px` - // if (myIframe.contentWindow.location && myIframe.contentWindow.location.href) { + let myIframe = document.getElementById("iframe"); + myIframe.height = `${document.documentElement.clientHeight - 473 + 86}px` + // if (myIframe.contentWindow.location && myIfram e.contentWindow.location.href) { // window.location.href = 'http://118.145.132.196:3000/product/llm/llm-chat' // //myIframe.contentWindow.location.href // } diff --git a/src/index.css b/src/index.css index 93f8b4557..452f0f91b 100644 --- a/src/index.css +++ b/src/index.css @@ -251,5 +251,6 @@ i.color-orange05:hover { } .test-iframe { - margin-top: -30px; + margin-top: -48px; + vertical-align:bottom; } \ No newline at end of file From b84113d868ec577c695f54475342e3a7b56a0fbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Thu, 29 Aug 2024 14:07:48 +0800 Subject: [PATCH 3/3] cont. --- Routes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Routes.js b/Routes.js index 869b1f9d3..328c3145a 100644 --- a/Routes.js +++ b/Routes.js @@ -56,4 +56,4 @@ export const deepRoutes = [ ] // 不进行组织或个人判断 -export const specialRoute = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder", "glcc","bindlogin", "softbot","zone", "undefined", "admins", "oauth", "competitions"] \ No newline at end of file +export const specialRoute = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder", "glcc","bindlogin", "softbot","zone", "undefined", "admins", "oauth", "competitions", "hiagent"] \ No newline at end of file