|
@@ -7,17 +7,15 @@ router.beforeEach(async(to, from, next) => {
|
|
|
try {
|
|
|
const response = await ajax.get('http://10.16.30.130/sso/api');
|
|
|
console.log(response);
|
|
|
- let data = response.data
|
|
|
+ let data = response.data.replaceAll("\'", "\"")
|
|
|
if (data && JSON.parse(data).uid) {
|
|
|
setToken(response.uid);
|
|
|
next()
|
|
|
} else {
|
|
|
- next()
|
|
|
- // window.location.href = "http://10.16.30.130/sso/caslogin.jsp";
|
|
|
+ window.location.href = "http://10.16.30.130/sso/caslogin.jsp";
|
|
|
}
|
|
|
} catch {
|
|
|
- next()
|
|
|
- // window.location.href = "http://10.16.30.130/sso/caslogin.jsp";
|
|
|
+ window.location.href = "http://10.16.30.130/sso/caslogin.jsp";
|
|
|
}
|
|
|
// determine whether the user has logged in
|
|
|
|