Browse Source

fix bug

master
Anna Ho 1 year ago
parent
commit
fd871f97af
2 changed files with 14 additions and 3 deletions
  1. +3
    -0
      src/pages/iAmSmart/AuthCallback/index.js
  2. +11
    -3
      src/pages/iAmSmart/RegistryCallback/index.js

+ 3
- 0
src/pages/iAmSmart/AuthCallback/index.js View File

@@ -56,8 +56,11 @@ const Index = () => {
}, },
onError:(error)=>{ onError:(error)=>{
console.log(error); console.log(error);
window.location.assign("/iamsmart/loginFail");
} }
}); });
}else{
window.location.assign("/iamsmart/loginFail");
} }
} }




+ 11
- 3
src/pages/iAmSmart/RegistryCallback/index.js View File

@@ -27,14 +27,22 @@ const Index = () => {
}, },
onSuccess: (responseData) => { onSuccess: (responseData) => {
navigate('/iAmSmartRegisterFrom', { state: { responseData: 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 ( return (
<LoadingComponent /> <LoadingComponent />
); );


Loading…
Cancel
Save