Skip to content

Commit e21dd85

Browse files
committed
bug fix
1 parent f189353 commit e21dd85

File tree

1 file changed

+14
-23
lines changed

1 file changed

+14
-23
lines changed

web/packages/exts/open-source/index.js

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,21 @@ export default function () {
2626
// 登录后提示运维用户切换
2727
this.bindHook('after_login', async function ({homePageRes, context}) {
2828
await api.fetch(`${API_PATH.WORKSPACE_PATH}workspaces/${homePageRes.workspaceId}`, 'get')
29-
const scriptisLimits = await api.fetch(`/dss/scriptis/globalLimits`, {}, {
30-
method: 'get',
31-
cacheOptions: { time: 60000 }
32-
})
33-
const dssLimits = await api.fetch('/dss/framework/admin/globalLimits', {}, 'get')
34-
let baseInfo = storage.get('baseInfo', 'local')
35-
baseInfo = {
36-
...baseInfo,
37-
...scriptisLimits.globalLimits,
38-
dss: {
39-
...dssLimits.globalLimits
29+
return api.fetch('/dss/framework/admin/globalLimits', {}, 'get').then((res) => {
30+
let baseInfo = storage.get('baseInfo', 'local')
31+
baseInfo = {
32+
...baseInfo,
33+
dss: {
34+
...res.globalLimits
35+
}
4036
}
41-
}
42-
const uselsp = localStorage.getItem('scriptis-edditor-type')
43-
if (baseInfo.dss.languageServerDefaultEnable && uselsp === null ) {
44-
localStorage.setItem('scriptis-edditor-type', 'lsp');
45-
// location.reload();
46-
}
47-
storage.set('baseInfo', baseInfo, 'local')
48-
if (baseInfo.dss.proxyEnable) {
49-
createProxyModal(homePageRes.homePageUrl, context)
50-
} else {
51-
context.$router.replace({path: homePageRes.homePageUrl});
52-
}
37+
storage.set('baseInfo', baseInfo, 'local')
38+
if (baseInfo.dss.proxyEnable) {
39+
createProxyModal(homePageRes.homePageUrl, context)
40+
} else {
41+
context.$router.replace({path: homePageRes.homePageUrl});
42+
}
43+
})
5344
})
5445

5546
// workflows: 工作流开发底部TAB面板复制历史

0 commit comments

Comments
 (0)