Authored by 周奇琪

去掉重复接口调用的显示,添加页面路由字段

... ... @@ -152,9 +152,11 @@ exports.getInterfaceConfig = function (routers) {
var groupList = [];
var navs = [];
var group = {};
var urlMap = {};
_.forEach(routers.interfacesConfig,function(v,k){
if(v.url)
{
if(v.url&&!urlMap[v.url]) {
urlMap[v.url] = true;//用于去重复的url
var nav = v.url.split('/')[1];
if(group[nav]) {
group[nav].push(v);
... ...
... ... @@ -41,11 +41,17 @@
<h3 class="panel-title">接口地址:{{domain}}{{url}}</h3>
</div>
<div class="panel-body">
<div class="media">
<div class="media-body">
<h4 >页面路由:</h4>
<p class="media-desc">{{route}}</p>
</div>
</div>
<div class="media">
<div class="media-body">
<h4 >调用方式:</h4>
<p class="media-desc">{{method}}:{{#isJsonRaw}}json 文本提交{{/isJsonRaw}}</p>
</div>
</div>
</div>
<h4 class="mt5">输入参数:</h4>
<table class="table table-info mb30">
... ...