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

fix: 去除workNo调用

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