|
@@ -20,7 +20,7 @@ router.beforeEach((to, from, next) => {
|
|
|
next()
|
|
|
} else {
|
|
|
// query如果没有明确要求跳过sso则执行sso登录
|
|
|
- if (to.query[SKIP_SSO_URL_QUERY.key]!== SKIP_SSO_URL_QUERY.val) {
|
|
|
+ if (to.query[SKIP_SSO_URL_QUERY.key] !== SKIP_SSO_URL_QUERY.val) {
|
|
|
/**
|
|
|
* 单点登录,返回是否需要跳转到单点登录页
|
|
|
*/
|
|
@@ -53,9 +53,11 @@ router.beforeEach((to, from, next) => {
|
|
|
|
|
|
} catch (e) {
|
|
|
redirect = true;
|
|
|
- let isApp = typeof cordova !== 'undefined' ? 'true' : 'false'
|
|
|
- if (isApp == 'true') {
|
|
|
- plus.runtime.openWeb('https://id.shendong.com.cn/default' + '/login?service=' + encodeURIComponent(locationUrl))
|
|
|
+
|
|
|
+ if (process.env.VUE_APP_PLATFORM != 'h5') {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: 'https://id.shendong.com.cn/default' + '/login?service=' + encodeURIComponent(locationUrl)
|
|
|
+ });
|
|
|
} else {
|
|
|
window.location.href = 'https://id.shendong.com.cn/default' + '/login?service=' + encodeURIComponent(locationUrl);
|
|
|
}
|
|
@@ -65,9 +67,10 @@ router.beforeEach((to, from, next) => {
|
|
|
if (window.location.search == '?type=noCas') {
|
|
|
} else {
|
|
|
redirect = true;
|
|
|
- let isApp = typeof cordova !== 'undefined' ? 'true' : 'false'
|
|
|
- if (isApp == 'true') {
|
|
|
- plus.runtime.openWeb('https://id.shendong.com.cn/default' + '/login?service=' + encodeURIComponent(locationUrl))
|
|
|
+ if (process.env.VUE_APP_PLATFORM != 'h5') {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: 'https://id.shendong.com.cn/default' + '/login?service=' + encodeURIComponent(locationUrl)
|
|
|
+ });
|
|
|
} else {
|
|
|
window.location.href = 'https://id.shendong.com.cn/default' + '/login?service=' + encodeURIComponent(locationUrl);
|
|
|
}
|