diff --git a/template/app.9f299301.js.go b/template/app.9f299301.js.go index f704957..f9e592b 100644 --- a/template/app.9f299301.js.go +++ b/template/app.9f299301.js.go @@ -5,7 +5,7 @@ var App9f299301js string func GetApp9f299301(path string) string { if App9f299301js == "" { - App9f299301js = "(function(e){function t(t){for(var n,s,o=t[0],l=t[1],c=t[2],p=0,d=[];p0?s[\"a\"].strNotBlank(e.value)?o.push(e):o.push(t[0]):o.push(e)})),t.securityArr=o}else t.securityArr=a;s[\"a\"].arrNotEmpty(i)?(r=r.concat(i),i.forEach((function(e){t.securityArr.forEach((function(t){t.id==e.id&&(t.value=e.value)}))}))):r=r.concat(t.securityArr),e.globalSecuritys=r,t.storeToLocalIndexDB()}))}))},storeToLocalIndexDB:function(){var e=i[\"a\"].globalSecurityParamPrefix+this.data.instance.id;this.$localStore.setItem(e,this.securityArr),this.$localStore.setItem(i[\"a\"].globalSecurityParameters,this.globalSecuritys)},resetAuth:function(){var e=this.securityArr;if(s[\"a\"].arrNotEmpty(e)){e.forEach((function(e){e.value=\"\"})),this.securityArr=e;var t=e.map((function(e){return e.id}));this.globalSecuritys.forEach((function(e){t.includes(e.id)&&(e.value=\"\")})),this.storeToLocalIndexDB()}this.$message.info(\"注销成功\")},authParamChange:function(e){var t=e.target,a=t.getAttribute(\"data-id\"),n=t.value;this.securityArr.forEach((function(e){e.id==a&&(e.value=n)})),this.globalSecuritys.forEach((function(e){e.id==a&&(e.value=n)})),this.storeToLocalIndexDB()}},created:function(){this.initLocalSecuritys()}},c=l,u=(a(\"550a\"),a(\"2877\")),p=Object(u[\"a\"])(c,n,r,!1,null,\"b642d37c\",null);t[\"default\"]=p.exports},\"0d4a\":function(e,t,a){\"use strict\";var n=a(\"61a4\"),r=a.n(n);r.a},\"0dd8\":function(e,t,a){},\"0e36\":function(e,t,a){\"use strict\";var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a(\"div\",[a(\"editor\",{attrs:{value:e.value,lang:\"json\",theme:\"eclipse\",width:\"100%\",height:e.editorHeight},on:{init:e.editorInit}})],1)},r=[],i={name:\"EditorShow\",components:{editor:a(\"7c9e\")},props:{value:{type:String,required:!0,default:\"\"}},data:function(){return{editor:null,editorHeight:200}},methods:{resetEditorHeight:function(){var e=this;setTimeout((function(){var t=e.editor.session.getLength();1==t&&(t=10);var a=16*t;e.editorHeight=a}),300)},editorInit:function(e){this.editor=e,a(\"2099\"),a(\"818b\"),a(\"1d29\"),this.resetEditorHeight()}}},s=i,o=a(\"2877\"),l=Object(o[\"a\"])(s,n,r,!1,null,null,null);t[\"a\"]=l.exports},\"121c\":function(e,t,a){\"use strict\";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a(\"a-layout-content\",{staticClass:\"knife4j-body-content\"},[a(\"a-row\",[a(\"a-col\",{attrs:{span:24}},[a(\"div\",{staticClass:\"title\"},[a(\"h2\",[e._v(e._s(e.data.instance.title))])]),a(\"div\",{staticClass:\"description\"},[a(\"a-row\",{staticClass:\"content-line\"},[a(\"a-col\",{attrs:{span:5}},[a(\"h3\",{domProps:{innerHTML:e._s(e.$t(\"homePage.description\"))}})]),a(\"a-col\",{attrs:{span:19}},[a(\"span\",{domProps:{innerHTML:e._s(e.data.instance.description)}})])],1),a(\"a-divider\",{staticClass:\"divider\"}),a(\"a-row\",{staticClass:\"content-line\"},[a(\"a-col\",{attrs:{span:5}},[a(\"h3\",{domProps:{innerHTML:e._s(e.$t(\"homePage.author\"))}})]),a(\"a-col\",{attrs:{span:19}},[a(\"span\",{domProps:{innerHTML:e._s(e.data.instance.contact)}})])],1),a(\"a-divider\",{staticClass:\"divider\"}),a(\"a-row\",{staticClass:\"content-line\"},[a(\"a-col\",{attrs:{span:5}},[a(\"h3\",{domProps:{innerHTML:e._s(e.$t(\"homePage.version\"))}})]),a(\"a-col\",{attrs:{span:19}},[a(\"span\",{domProps:{innerHTML:e._s(e.data.instance.version)}})])],1),a(\"a-divider\",{staticClass:\"divider\"}),a(\"a-row\",{staticClass:\"content-line\"},[a(\"a-col\",{attrs:{span:5}},[a(\"h3\",{domProps:{innerHTML:e._s(e.$t(\"homePage.host\"))}})]),a(\"a-col\",{attrs:{span:19}},[a(\"span\",{domProps:{innerHTML:e._s(e.data.instance.host)}})])],1),a(\"a-divider\",{staticClass:\"divider\"}),a(\"a-row\",{staticClass:\"content-line\"},[a(\"a-col\",{attrs:{span:5}},[a(\"h3\",{domProps:{innerHTML:e._s(e.$t(\"homePage.basePath\"))}})]),a(\"a-col\",{attrs:{span:19}},[a(\"span\",{domProps:{innerHTML:e._s(e.data.instance.basePath)}})])],1),a(\"a-divider\",{staticClass:\"divider\"}),a(\"a-row\",{staticClass:\"content-line\"},[a(\"a-col\",{attrs:{span:5}},[a(\"h3\",{domProps:{innerHTML:e._s(e.$t(\"homePage.serviceUrl\"))}})]),a(\"a-col\",{attrs:{span:19}},[a(\"span\",{domProps:{innerHTML:e._s(e.data.instance.termsOfService)}})])],1),a(\"a-divider\",{staticClass:\"divider\"}),a(\"a-row\",{staticClass:\"content-line\"},[a(\"a-col\",{attrs:{span:5}},[a(\"h3\",{domProps:{innerHTML:e._s(e.$t(\"homePage.groupName\"))}})]),a(\"a-col\",{attrs:{span:19}},[a(\"span\",{domProps:{innerHTML:e._s(e.data.instance.name)}})])],1),a(\"a-divider\",{staticClass:\"divider\"}),a(\"a-row\",{staticClass:\"content-line\"},[a(\"a-col\",{attrs:{span:5}},[a(\"h3\",{domProps:{innerHTML:e._s(e.$t(\"homePage.groupUrl\"))}})]),a(\"a-col\",{attrs:{span:19}},[a(\"span\",{domProps:{innerHTML:e._s(e.data.instance.url)}})])],1),a(\"a-divider\",{staticClass:\"divider\"}),a(\"a-row\",{staticClass:\"content-line\"},[a(\"a-col\",{attrs:{span:5}},[a(\"h3\",{domProps:{innerHTML:e._s(e.$t(\"homePage.groupLocation\"))}})]),a(\"a-col\",{attrs:{span:19}},[a(\"span\",{domProps:{innerHTML:e._s(e.data.instance.location)}})])],1),a(\"a-divider\",{staticClass:\"divider\"}),a(\"a-row\",{staticClass:\"content-line\"},[a(\"a-col\",{attrs:{span:5}},[a(\"h3\",{domProps:{innerHTML:e._s(e.$t(\"homePage.apiCountNumber\"))}})]),a(\"a-col\",{attrs:{span:19}},e._l(e.data.instance.pathArrs,(function(t){return a(\"a-row\",{key:t.method,staticClass:\"content-line-count\"},[a(\"a-col\",{attrs:{span:3}},[e._v(\" \"+e._s(t.method)+\" \")]),a(\"a-col\",{attrs:{span:2}},[a(\"a-tag\",{attrs:{color:\"#108ee9\"}},[e._v(e._s(t.count))])],1),a(\"a-divider\",{staticClass:\"divider-count\"})],1)})),1)],1)],1)])],1)],1)},r=[],i={props:{data:{type:Object}},data:function(){return{title:\"knife4j\"}},created:function(){}},s=i,o=(a(\"6547a\"),a(\"2877\")),l=Object(o[\"a\"])(s,n,r,!1,null,\"4a540922\",null);t[\"default\"]=l.exports},\"190e\":function(e,t,a){\"use strict\";var n=a(\"b012\"),r=a.n(n);r.a},\"1be9\":function(e,t,a){\"use strict\";var n=a(\"9c80\"),r=a.n(n);r.a},\"1ec2\":function(e,t,a){\"use strict\";var n=a(\"996d\"),r=a.n(n);r.a},2395:function(e,t,a){},\"2bc6\":function(e,t,a){\"use strict\";var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a(\"div\",[e.record.validateStatus?a(\"span\",{staticClass:\"knife4j-request-validate-jsr\"},[a(\"a-tooltip\",{attrs:{placement:\"right\"}},[a(\"template\",{slot:\"title\"},e._l(e.validators,(function(t){return a(\"div\",{key:t.key},[e._v(e._s(t.val))])})),0),e._v(\" \"+e._s(e.text)+\" \")],2)],1):a(\"span\",[e._v(e._s(e.text))])])},r=[],i={name:\"DataType\",props:{text:{type:String,required:!0},record:{type:Object,required:!0}},data:function(){return{validators:[]}},created:function(){this.intiValidator()},methods:{intiValidator:function(){var e=this,t=this.record;if(null!=t.validateInstance){e.getJsonKeyLength(t.validateInstance);for(var a in t.validateInstance){var n=a+\":\"+t.validateInstance[a];e.validators.push({key:a,val:n})}}},getJsonKeyLength:function(e){var t=0;if(null!=e)for(var a in e)e.hasOwnProperty(a)&&t++;return t}}},s=i,o=a(\"2877\"),l=Object(o[\"a\"])(s,n,r,!1,null,null,null);t[\"a\"]=l.exports},\"2ee0\":function(e,t,a){},\"32ba\":function(e,t,a){},3896:function(e,t,a){},\"3cd9\":function(e,t,a){\"use strict\";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a(\"a-layout-content\",{staticClass:\"knife4j-body-content\"},[a(\"a-row\",{staticClass:\"markdown-row\"},[a(\"a-row\",{staticClass:\"globalparameters\"},[a(\"a-row\",{staticClass:\"gptips\"},[e._v(\" Knife4j提供导出4种格式的离线文档(Html\\\\Markdown\\\\Word\\\\Pdf) \")])],1),a(\"a-row\",{staticClass:\"knife4j-download-button\"},[a(\"a-button\",{on:{click:e.triggerDownloadMarkdown}},[a(\"a-icon\",{attrs:{type:\"file-markdown\"}}),e._v(\"下载Markdown\")],1),a(\"a-button\",{attrs:{type:\"default\"},on:{click:e.triggerDownload}},[a(\"a-icon\",{attrs:{type:\"file-text\"}}),e._v(\"下载Html\")],1),a(\"a-button\",{attrs:{type:\"default\"},on:{click:e.triggerDownloadWord}},[a(\"a-icon\",{attrs:{type:\"file-word\"}}),e._v(\"下载Word\")],1),a(\"a-button\",{attrs:{type:\"default\"},on:{click:e.triggerDownloadPDF}},[a(\"a-icon\",{attrs:{type:\"file-pdf\"}}),e._v(\"下载PDF\")],1)],1),a(\"div\",{staticClass:\"htmledit_views\",attrs:{id:\"content_views\"+e.data.instance.id}},[a(e.downloadType,{tag:\"component\",attrs:{instance:e.data.instance,tags:e.tags}})],1)],1)],1)},r=[],i=(a(\"a4d3\"),a(\"e01a\"),a(\"99af\"),a(\"4de4\"),a(\"4160\"),a(\"4e82\"),a(\"b0c0\"),a(\"e439\"),a(\"dbb4\"),a(\"b64b\"),a(\"d3b7\"),a(\"3ca3\"),a(\"159b\"),a(\"ddb0\"),a(\"2b3d\"),a(\"2fa7\")),s=a(\"9ce6\"),o=a.n(s),l=(a(\"c0e9\"),'\\n.content-line {\\n height: 25px;\\n line-height: 25px;\\n}\\n.content-line-count {\\n height: 35px;\\n line-height: 35px;\\n}\\n.title {\\n margin-top: 25px;\\n}\\n.knife4j-description {\\n /* width: 90%;\\n margin: 15px auto; */\\n margin-top: 5px;\\n}\\n.divider {\\n margin: 4px 0;\\n}\\n.divider-count {\\n margin: 8px 0;\\n}\\n.knife4j-document {\\n margin-top: 30px;\\n}\\n.api-tab {\\n margin-top: 15px;\\n\\n .ant-tag {\\n height: 32px;\\n line-height: 32px;\\n }\\n}\\n.knife4j-menu-api-deprecated {\\n text-decoration: line-through;\\n}\\n\\n.knife4j-api-title {\\n margin-top: 10px;\\n margin-bottom: 5px;\\n font-size: 16px;\\n font-weight: 600;\\n color: #616368;\\n height: 35px;\\n line-height: 35px;\\n}\\n.knife4j-api-row {\\n height: 45px;\\n line-height: 45px;\\n}\\n\\n.knife4j-api-summary {\\n border-color: #49cc90;\\n display: -webkit-box;\\n display: -ms-flexbox;\\n display: flex;\\n -webkit-box-align: center;\\n -ms-flex-align: center;\\n align-items: center;\\n padding: 2px;\\n cursor: pointer;\\n}\\n.knife4j-api-summary-method {\\n font-size: 14px;\\n font-weight: 700;\\n min-width: 80px;\\n padding: 6px 15px;\\n text-align: center;\\n border-radius: 3px;\\n text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);\\n font-family: Titillium Web, sans-serif;\\n color: #fff;\\n}\\n.knife4j-api-summary-path {\\n font-size: 14px;\\n display: flex;\\n -webkit-box-flex: 0;\\n -ms-flex: 0 3 auto;\\n flex: 0 3 auto;\\n -webkit-box-align: center;\\n -ms-flex-align: center;\\n align-items: center;\\n word-break: break-all;\\n padding: 0 32px;\\n}\\n\\n.knife4j-api-post {\\n border-color: #49cc90;\\n background: rgba(73, 204, 144, 0.1);\\n}\\n.knife4j-api-post .knife4j-api-summary-method {\\n background: #49cc90;\\n}\\n\\n.knife4j-api-get {\\n border-color: #61affe;\\n background: rgba(97, 175, 254, 0.1);\\n}\\n.knife4j-api-get .knife4j-api-summary-method {\\n background: #61affe;\\n}\\n.knife4j-api-head {\\n border-color: #9012fe;\\n background: rgba(144, 18, 254, 0.1);\\n}\\n.knife4j-api-head .knife4j-api-summary-method {\\n background: #9012fe;\\n}\\n.knife4j-api-put {\\n border-color: #fca130;\\n background: rgba(252, 161, 48, 0.1);\\n}\\n.knife4j-api-put .knife4j-api-summary-method {\\n background: #fca130;\\n}\\n.knife4j-api-delete {\\n border-color: #f93e3e;\\n background: rgba(249, 62, 62, 0.1);\\n}\\n.knife4j-api-delete .knife4j-api-summary-method {\\n background: #f93e3e;\\n}\\n.knife4j-api-options {\\n border-color: #0d5aa7;\\n background: rgba(13, 90, 167, 0.1);\\n}\\n.knife4j-api-options .knife4j-api-summary-method {\\n background: #0d5aa7;\\n}\\n.knife4j-api-patch {\\n border-color: #50e3c2;\\n background: rgba(80, 227, 194, 0.1);\\n}\\n.knife4j-api-patch .knife4j-api-summary-method {\\n background: #50e3c2;\\n}\\n#knife4jDoc ul{\\n padding-left: 10px;\\n list-style: none;\\n counter-reset: ordered;\\n}\\n\\n#knife4jDoc ul li:before {\\n counter-increment: ordered;\\n content: counters(ordered,\".\")\" \";\\n color:#1890ff;\\n}\\n.api-basic {\\n padding: 11px;\\n}\\n.api-basic-title {\\n font-size: 14px;\\n font-weight: 700;\\n}\\n.api-basic-body {\\n font-size: 14px;\\n font-family: -webkit-body;\\n}\\n.knife4j-api-editor-show {\\n margin: 15px 0;\\n font: 100 12px/18px monaco, andale mono, courier new;\\n padding: 10px 12px;\\n border: #ccc 1px solid;\\n border-left-width: 4px;\\n background-color: #fefefe;\\n box-shadow: 0 0 4px #eee;\\n word-break: break-all;\\n word-wrap: break-word;\\n color: #444;\\n}\\n.knife4j-api-editor-show .string { color: green; } /*字符串的样式*/\\n.knife4j-api-editor-show .number { color: darkorange; } /*数字的样式*/\\n.knife4j-api-editor-show .boolean { color: blue; } /*布尔型数据的样式*/\\n.knife4j-api-editor-show .null { color: magenta; } /*null值的样式*/\\n.knife4j-api-editor-show .key { color: red; } /*key值的样式*/\\n.api-description {\\n border-left: 4px solid #ddd;\\n line-height: 30px;\\n}\\n.api-body-desc {\\n padding: 10px;\\n min-height: 35px;\\n box-sizing: border-box;\\n border: 1px solid #e8e8e8;\\n}\\n.ant-card-body {\\n padding: 5px;\\n}\\n.api-title {\\n margin-top: 10px;\\n margin-bottom: 5px;\\n font-size: 16px;\\n font-weight: 600;\\n height: 30px;\\n line-height: 30px;\\n border-left: 4px solid #00ab6d;\\n text-indent: 8px;\\n}\\n.content-line {\\n height: 25px;\\n line-height: 25px;\\n}\\n.content-line-count {\\n height: 35px;\\n line-height: 35px;\\n}\\n.divider {\\n margin: 4px 0;\\n}\\n.knife4j-doc-m{\\n position: fixed;\\n height: 500px;\\n width: 400px;\\n border: 1px solid #b7b4b4;\\n overflow-y: auto;\\n right: 12px;\\n top: 40px;\\n z-index: 9999;\\n background: #fcfafa;\\n}\\n');function c(e,t,a){return'\\n \\n \\n \\n \\n '.concat(e,'\\n \\n \\n \\n \\n
\\n
\\n \\n \\x3c!--基础信息--\\x3e\\n \\n \\n
\\n

{{instance.title}}

\\n
\\n
\\n \\n \\n

简介

\\n
\\n \\n
\\n \\n
\\n
\\n \\n \\n

作者

\\n
\\n \\n
\\n \\n
\\n
\\n \\n \\n

版本

\\n
\\n \\n
\\n \\n
\\n
\\n \\n \\n

host

\\n
\\n \\n
\\n \\n
\\n
\\n \\n \\n

basePath

\\n
\\n \\n
\\n \\n
\\n
\\n \\n \\n

服务Url

\\n
\\n \\n
\\n \\n
\\n
\\n \\n \\n

分组名称

\\n
\\n \\n
\\n \\n
\\n
\\n \\n \\n

分组url

\\n
\\n \\n
\\n \\n
\\n
\\n \\n \\n

分组location

\\n
\\n \\n
\\n \\n
\\n
\\n \\n \\n

接口统计信息

\\n
\\n \\n \\n \\n {{param.method}}\\n \\n \\n {{param.count}}\\n \\n \\n \\n \\n
\\n
\\n
\\n
\\n \\n \\x3c!--目录--\\x3e\\n \\n \\n 隐藏\\n \\n \\n \\n \\n \\n \\x3c!--分组API信息--\\x3e\\n \\x3c!--遍历tags--\\x3e\\n \\n

{{tag.name}}

\\n
\\n \\x3c!--接口基本信息--\\x3e\\n \\n \\n \\n {{ api.summary }}\\n \\n \\n {{ api.summary }}\\n \\n \\n \\n
\\n {{ api.methodType }}\\n {{ api.showUrl }}\\n
\\n
\\n \\n \\n \\n 请求数据类型\\n {{ api.consumes }}\\n \\n \\n \\n \\n 响应数据类型\\n {{ api.produces }}\\n \\n \\n \\n
\\n \\x3c!--接口描述--\\x3e\\n
\\n
\\n 接口描述\\n
\\n
\\n
\\n \\x3c!--请求示例--\\x3e\\n
\\n
\\n 请求示例\\n
\\n \\n
\\n
\\n 请求参数\\n
\\n \\n \\n\\n \\n\\n \\n \\n \\x3c!--响应状态--\\x3e\\n
\\n 响应状态\\n
\\n \\n \\n \\n \\x3c!--响应参数--\\x3e\\n \\x3c!--响应参数需要判断是否存在多个code-schema的情况--\\x3e\\n
\\n \\x3c!--多个响应编码code的情况在离线文档中需要单独遍历分开--\\x3e\\n \\n \\n \\x3c!--判断响应头--\\x3e\\n
\\n
\\n 响应Header\\n
\\n \\n \\n
\\n \\x3c!--响应参数--\\x3e\\n
\\n 响应参数\\n
\\n \\n \\n
\\n 响应示例\\n
\\n
\\n {{ resp.responseText }}\\n
\\n \\n \\x3c!-- --\\x3e\\n \\x3c!-- --\\x3e\\n
\\n
\\n
\\n
\\n \\x3c!--判断响应头--\\x3e\\n
\\n
\\n 响应Header\\n
\\n \\n \\n
\\n \\x3c!--响应参数--\\x3e\\n
\\n 响应参数\\n
\\n \\n \\n
\\n 响应示例\\n
\\n
\\n {{ api.multipData.responseText }}\\n
\\n \\n
\\n \\n\\n \\x3c!--接口遍历结束--\\x3e\\n
\\n \\n \\n\\n
\\n \\n