feat: 前端用户信息迁移至localstorage

This commit is contained in:
meilin.huang
2023-09-16 17:07:48 +08:00
parent dd4ac390de
commit 72677e270d
20 changed files with 110 additions and 70 deletions

View File

@@ -179,7 +179,7 @@ import { dateFormat } from '@/common/utils/date';
import { storeToRefs } from 'pinia';
import { useUserInfo } from '@/store/userInfo';
import config from '@/common/config';
import { getSession } from '@/common/utils/storage';
import { getToken } from '@/common/utils/storage';
const { userInfo } = storeToRefs(useUserInfo());
const state = reactive({
@@ -248,7 +248,7 @@ const bindOAuth2 = () => {
var iLeft = (window.screen.width - 10 - width) / 2; //获得窗口的水平位置;
// 小窗口打开oauth2鉴权
let oauthWindow = window.open(
config.baseApiUrl + '/auth/oauth2/bind?token=' + getSession('token'),
config.baseApiUrl + '/auth/oauth2/bind?token=' + getToken(),
'oauth2',
`height=${height},width=${width},top=${iTop},left=${iLeft},location=no`
);