perf: 优化 applet host 请求引起的 eror

This commit is contained in:
ibuler 2023-02-26 10:33:54 +08:00 committed by Jiangjie.Bai
parent 621893fdcc
commit 658f0ff587
2 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@ function getPropOrg() {
if (defaultOrg) {
return defaultOrg
}
return orgs.filter(item => !item['is_root'])[0]
return orgs.filter(item => !item['is_root'] && item.id !== SYSTEM_ORG_ID)[0]
}
async function change2PropOrg() {

View File

@ -8,7 +8,7 @@ import { Message } from '@/utils/Message'
import store from '@/store'
import axiosRetry from 'axios-retry'
import router from '@/router'
import { DEFAULT_ORG_ID } from '@/utils/org'
import { DEFAULT_ORG_ID, SYSTEM_ORG_ID } from '@/utils/org'
// create an axios instance
const service = axios.create({
@ -25,7 +25,7 @@ function beforeRequestAddToken(config) {
const queryOrgId = router.currentRoute.query?.oid
const storeOrgId = store.getters.currentOrg?.id
let orgId = queryOrgId || storeOrgId
if (!store.getters.publicSettings?.XPACK_ENABLED) {
if (!store.getters.publicSettings?.XPACK_ENABLED && orgId !== SYSTEM_ORG_ID) {
orgId = DEFAULT_ORG_ID
}
if (orgId) {