diff --git a/components/h5web/h5web.jsx b/components/h5web/h5web.jsx index 97098c0..f222a41 100755 --- a/components/h5web/h5web.jsx +++ b/components/h5web/h5web.jsx @@ -1,11 +1,19 @@ import "@h5web/app/dist/styles.css"; import { App, HsdsProvider } from "@h5web/app"; +import { useLocation, useSearchParams } from "react-router-dom"; // eslint-disable-next-line react/prop-types -export default function H5web({ domain, h5webParams }) { - console.log("h5web", domain); - console.log("h5webParams", h5webParams); +export default function H5web({ domain }) { + + let [searchParams, setSearchParams] = useSearchParams(); + const location = useLocation(); + + const queryParams = new URLSearchParams(location.search); + const h5webParams = queryParams.get("h5web"); + + const initialPathParams = searchParams.get("initialPath") + return (
@@ -16,7 +24,7 @@ export default function H5web({ domain, h5webParams }) { password="system-public-user" filepath={`${domain ? domain : h5webParams}`} > - +
diff --git a/src/App.css b/src/App.css index 7730ef5..7df9974 100755 --- a/src/App.css +++ b/src/App.css @@ -289,6 +289,7 @@ h1 { .shareBtn:hover { background-color: #00ace1; + border: 1px solid #00ace1; color: #fff; } diff --git a/src/App.jsx b/src/App.jsx index c26bcef..be09f41 100755 --- a/src/App.jsx +++ b/src/App.jsx @@ -22,7 +22,7 @@ function App() {
{h5webParams ? ( - + ) : (