From fd871f97afa780c5e5fef0acb703abb5e13177c0 Mon Sep 17 00:00:00 2001 From: anna Date: Wed, 17 Jan 2024 12:54:47 +0800 Subject: [PATCH] fix bug --- src/pages/iAmSmart/AuthCallback/index.js | 3 +++ src/pages/iAmSmart/RegistryCallback/index.js | 14 +++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/pages/iAmSmart/AuthCallback/index.js b/src/pages/iAmSmart/AuthCallback/index.js index a87236a..b83ba04 100644 --- a/src/pages/iAmSmart/AuthCallback/index.js +++ b/src/pages/iAmSmart/AuthCallback/index.js @@ -56,8 +56,11 @@ const Index = () => { }, onError:(error)=>{ console.log(error); + window.location.assign("/iamsmart/loginFail"); } }); + }else{ + window.location.assign("/iamsmart/loginFail"); } } diff --git a/src/pages/iAmSmart/RegistryCallback/index.js b/src/pages/iAmSmart/RegistryCallback/index.js index 0c03fbe..ab69b32 100644 --- a/src/pages/iAmSmart/RegistryCallback/index.js +++ b/src/pages/iAmSmart/RegistryCallback/index.js @@ -27,14 +27,22 @@ const Index = () => { }, onSuccess: (responseData) => { navigate('/iAmSmartRegisterFrom', { state: { responseData: responseData } }); + }, + onFail: (response)=>{ + console.log("Fail"); + console.log(response); + window.location.assign("/register"); + }, + onError:(error)=>{ + console.log(error); + window.location.assign("/register"); } }); + }else{ + window.location.assign("/register"); } } - - - return ( );