From 2ddc2ae8774d7610798f8e370a53664d8e136f7b Mon Sep 17 00:00:00 2001 From: caiti Date: Fri, 1 Nov 2024 16:55:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E6=8B=93=E5=B1=95?= =?UTF-8?q?=E5=8F=82=E6=95=B0showUrl=E7=94=A8=E4=BA=8E=E9=80=82=E9=85=8D?= =?UTF-8?q?=E5=90=8C=E4=B8=80=E4=B8=AA=E6=8E=A5=E5=8F=A3=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E6=9C=89=E4=B8=8D=E5=90=8C=E5=8F=82=E6=95=B0=E7=9A=84=E9=9C=80?= =?UTF-8?q?=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- knife4j-vue/src/core/Knife4jAsync.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/knife4j-vue/src/core/Knife4jAsync.js b/knife4j-vue/src/core/Knife4jAsync.js index e885db80..239a311f 100644 --- a/knife4j-vue/src/core/Knife4jAsync.js +++ b/knife4j-vue/src/core/Knife4jAsync.js @@ -2181,7 +2181,7 @@ SwaggerBootstrapUi.prototype.analysisDefinitionRefTableModel = function (instanc if (p.hasOwnProperty('enum')) { description = KUtils.enumAvalibleLabel(that.i18nInstance, p.enum, description); // console.log("当前枚举description:", description); - } + } // 处理枚举列表类型的参数 else if (p.items && p.items.hasOwnProperty('enum')) { description = KUtils.enumAvalibleLabel(that.i18nInstance, p.items.enum, description); @@ -4978,14 +4978,14 @@ SwaggerBootstrapUi.prototype.initApiInfoAsyncOAS3 = function (swpinfo) { } /** * 创建对象实例,返回SwaggerBootstrapUiApiInfo实例 - * @param {*} path path对象 + * @param {*} pathKey path对象 * @param {*} mtype 接口类型 * @param {*} apiInfo 对象 * @param {*} appendBaePathFlag 是否追加basePath */ -SwaggerBootstrapUi.prototype.createApiInfoInstance = function (path, mtype, apiInfo, appendBaePathFlag) { +SwaggerBootstrapUi.prototype.createApiInfoInstance = function (pathKey, mtype, apiInfo, appendBaePathFlag) { var that = this; - + const path = apiInfo.showUrl ? apiInfo.showUrl : pathKey var swpinfo = new SwaggerBootstrapUiApiInfo(); // console.log(that.currentInstance) // 给接口增加一个版本属性 @@ -5068,7 +5068,9 @@ SwaggerBootstrapUi.prototype.createApiInfoInstance = function (path, mtype, apiI newurl = KUtils.insightUrl(newurl); } // var startApiTime = new Date().getTime(); + swpinfo.showUrl = newurl; + // swpinfo.id='ApiInfo'+Math.round(Math.random()*1000000); swpinfo.instanceId = that.currentInstance.id; swpinfo.host = that.currentInstance.host; -- Gitee