Commit 2a40bc30 authored by 杨思琦's avatar 杨思琦

fix: 去除workNo调用

parent 48e988fd
Pipeline #81312 passed with stages
......@@ -398,8 +398,8 @@ class Site {
if (hasGateWay) {
appService
.authorizationToken({
loginName: config.userInfo?.loginName || '',
type: 'WorkNo',
loginName: token || '',
type: 'token',
})
.then(tokenRes => {
const accessToken = tokenRes.data?.access_token ?? null;
......
......@@ -103,7 +103,8 @@ const NewProducts = props => {
config.widgets = [];
config.allWidgets = [];
config.userInfo = window?.globalConfig?.transformUserInfo?.(res.data) ?? res.data;
const { token: tk } = window?.globalConfig;
const token = tk || Cookies.get('token');
// 默认有个上次记住的登入企业,存在印象。这里把cookie和localStorage中的都重新设置一下
const date = new Date();
date.setTime(date.getTime() + 24 * 60 * 60 * 1000);
......@@ -122,8 +123,8 @@ const NewProducts = props => {
if (hasGateWay) {
appService
.authorizationToken({
loginName: config.userInfo?.loginName || '',
type: 'WorkNo',
loginName: token || '',
type: 'token',
})
.then(tokenRes => {
if (res.code === 0) {
......
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 to comment