Commit b4bbd51c by cocomilk2012

update

parent 56623d69
Showing with 37 additions and 32 deletions
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>员工自助</title>
</head>
<body>
<noscript>
<strong>We're sorry but typescript doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>员工自助.</title>
</head>
<body>
<noscript>
<strong>We're sorry but typescript doesn't work properly without JavaScript enabled. Please enable it to
continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
\ No newline at end of file
import Vue from 'vue';
import Router from 'vue-router';
import Mgr from '@/common/SecurityService';
// import Mgr from '@/common/SecurityService';
import employee_router from './employee/employee-router';
import qs from 'qs';
import axios from 'axios';
......@@ -9,7 +9,7 @@ import { GetCommonPms } from '../assets/js/CommonPms.js';
Vue.use(Router);
let mgr = new Mgr();
// let mgr = new Mgr();
const oidc_config = JSON.parse(process.env.VUE_APP_OIDC_CONFIG);
const isOpenHttps = process.env.VUE_APP_OPEN_HTTPS;
......@@ -28,26 +28,26 @@ const router = new Router({
* 使用授权码登录
* @param authCode 授权码
*/
function loginByAuthcode(authCode: any) {
let loginArgs = { extraQueryParams: { authcode: authCode } };
mgr.signIn(loginArgs);
}
// function loginByAuthcode(authCode: any) {
// let loginArgs = { extraQueryParams: { authcode: authCode } };
// mgr.signIn(loginArgs);
// }
/**
* 自动登录
* @param authcode 授权码
*/
function autoLogin(authcode: any) {
mgr.getUser().then((user) => {
if (user == null) {
loginByAuthcode(authcode);
} else {
//如果已经登录,则先退出
localStorage.setItem('authcode', authcode);
mgr.signOut();
}
});
}
// function autoLogin(authcode: any) {
// mgr.getUser().then((user) => {
// if (user == null) {
// loginByAuthcode(authcode);
// } else {
// //如果已经登录,则先退出
// localStorage.setItem('authcode', authcode);
// mgr.signOut();
// }
// });
// }
//@ts-ignore
function getAccessToken(authcode) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment