openapi服务地址解析

This commit is contained in:
暮光:城中城
2021-11-29 23:33:56 +08:00
parent 865c14d95b
commit 66a6378056
18 changed files with 26 additions and 21 deletions

View File

@@ -50,7 +50,7 @@
export default {
setup() {
const store = useStore()
const store = useStore();
const openApiDoc = computed(() => store.state.openApiDoc);
const openApiDocInfo = computed(() => store.state.openApiDoc.info);
const openApiMethodStatistic = computed(() => store.state.openApiMethodStatistic);

View File

@@ -100,7 +100,12 @@
let apiDoc = store.state.apiDoc || {};
let globalParam = store.state.globalParam || [];
let openApiDoc = store.state.openApiDoc || {};
let urlDomain = apiDoc.rewriteDomain || openApiDoc.host;
let urlDomain = apiDoc.rewriteDomain || '';
// os取服务地址不一样 todo 多服务地址的情况处理
let servers = openApiDoc.servers || [];
if (!urlDomain && servers.length > 0 && servers[0].url) {
urlDomain = servers[0].url;
}
let docUrl = ref(urlDomain + props.docInfoShow.url);
let activePage = ref('urlParam');
// URL参数处理