|
@@ -16,6 +16,7 @@ import { useGlobSetting } from '/@/hooks/setting';
|
|
|
|
|
|
import _ from 'lodash';
|
|
|
import { mountMicroApp } from '/@/qiankun';
|
|
|
+import { AUTO_LOGIN_URL_QUERY } from '../constant';
|
|
|
|
|
|
const LOGIN_PATH = PageEnum.BASE_LOGIN;
|
|
|
//auth2登录路由
|
|
@@ -106,6 +107,13 @@ export function createPermissionGuard(router: Router) {
|
|
|
document.title = to.meta.title;
|
|
|
return;
|
|
|
}
|
|
|
+ // query中要求自动登录的执行登录逻辑
|
|
|
+ if (to.query[AUTO_LOGIN_URL_QUERY.key] === AUTO_LOGIN_URL_QUERY.val) {
|
|
|
+ const userStore = useUserStoreWithOut();
|
|
|
+ await userStore.autoLogin();
|
|
|
+ next(to.path);
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
//update-begin---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3 Auth2未实现------------
|
|
|
let path = LOGIN_PATH;
|