From 592b43834cea2629c8e93cb208dc2df8fdbb796d Mon Sep 17 00:00:00 2001 From: wuzuowei Date: Sun, 12 May 2024 16:11:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/tech/login/Senselesslogin.tsx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/platform-code/src/pages/tech/login/Senselesslogin.tsx b/platform-code/src/pages/tech/login/Senselesslogin.tsx index 99cbaa6..3bac937 100644 --- a/platform-code/src/pages/tech/login/Senselesslogin.tsx +++ b/platform-code/src/pages/tech/login/Senselesslogin.tsx @@ -18,6 +18,7 @@ const TechLoginView = () => { const paramValue = searchParams.get('token'); const pathValue = searchParams.get('path'); // const history = useHistory(); + console.log("token111:" + paramValue, "pathValue111:" + pathValue, searchParams); useEffect(() => { console.log("token:" + paramValue, "pathValue:" + pathValue); @@ -27,7 +28,7 @@ const TechLoginView = () => { const current = (date: string) => { - // console.log("date", date) + console.log("date", date) requestaxios @@ -39,11 +40,11 @@ const TechLoginView = () => { } }) .then(({ data }) => { - // console.log("data", data.code); + console.log("data", data.code, data); if (data.loginName != undefined) { //拿到账号密码之后进行登录 - // console.log(data); + console.log(data); let month = new Date().getTime() + 1000 * 24 * 3600 * 30 * 3 utils.saveCookie('CZtoken', paramValue, month) @@ -52,12 +53,12 @@ const TechLoginView = () => { } else { message.error('获取财智系统用户信息报错!'); - window.location.href = "https://metal.dayesteel.com.cn"; + // window.location.href = "https://metal.dayesteel.com.cn"; } }) .catch((reason) => { message.error('调取财智系统用户信息报错' + reason); - window.location.href = "https://metal.dayesteel.com.cn"; + // window.location.href = "https://metal.dayesteel.com.cn"; }); }; const doLogin = async (UserId: string) => { @@ -77,6 +78,7 @@ const TechLoginView = () => { } let result = await MicroApps.GetRuntimeUser().doLogin(loginId, "000000") + console.log("resultresult111111111111", result) if (isString(result)) { message.error(result) @@ -85,10 +87,13 @@ const TechLoginView = () => { let redirect: any = history.location.query?.redirect let jumpTo: string | undefined = undefined - + console.log("111111111111", redirect) if (redirect) { let rd = decodeURIComponent(redirect) jumpTo = isUrl(rd) ? rd : undefined + + console.log("22222222222", rd, jumpTo) + } if (jumpTo) { @@ -125,6 +130,7 @@ const TechLoginView = () => { } return ( <> + 2222222222222222 );