fix: 修复非企业版用户ESB选项泄露的Bug

修复非企业版用户ESB选项泄露的Bug
This commit is contained in:
song-tianyang 2021-06-02 11:12:38 +08:00 committed by 刘瑞斌
parent 302f23572b
commit d75a040c52
1 changed files with 6 additions and 2 deletions

View File

@ -45,6 +45,7 @@
import MsTcpBasicApi from "./TCPBasicApi"; import MsTcpBasicApi from "./TCPBasicApi";
import MsBasisParameters from "../request/tcp/TcpBasisParameters"; import MsBasisParameters from "../request/tcp/TcpBasisParameters";
import MsChangeHistory from "../../../../history/ChangeHistory"; import MsChangeHistory from "../../../../history/ChangeHistory";
import {hasLicense} from "@/common/js/utils";
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/); const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
const esbDefinition = (requireComponent!=null&&requireComponent.keys().length) > 0 ? requireComponent("./apidefinition/EsbDefinition.vue") : {}; const esbDefinition = (requireComponent!=null&&requireComponent.keys().length) > 0 ? requireComponent("./apidefinition/EsbDefinition.vue") : {};
@ -82,10 +83,13 @@ export default {
} }
if (requireComponent != null && JSON.stringify(esbDefinition) != '{}'&& JSON.stringify(esbDefinitionResponse) != '{}') { if (requireComponent != null && JSON.stringify(esbDefinition) != '{}'&& JSON.stringify(esbDefinitionResponse) != '{}') {
this.showXpackCompnent = true; this.showXpackCompnent = true;
if(hasLicense()){
if(this.methodTypes.length == 1){ if(this.methodTypes.length == 1){
this.methodTypes.push("ESB"); this.methodTypes.push("ESB");
} }
} }
}
}, },
watch: { watch: {
syncTabs() { syncTabs() {