12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <link rel="stylesheet" href="/static/editor.md/css/editormd.min.css" />
- <div class="layui-row" style="margin-top: 20px;padding-left: 20px">
- <div class="layui-col-xs10 search_text">
- <!-- <form class="layui-form" action="" onsubmit="javascript:return false;">
- <div class="demoTable">
- <div class="layui-inline" style="width: 40%">
- <input class="layui-input" name="sourceName" id="sourceName" autocomplete="off" placeholder="资源名称" >
- </div>
- <button class="layui-btn" data-type="reload">查询</button>
- </div>
- </form> -->
-
- </div>
- <div class="layui-col-xs2" style="float: right;text-align: right;">
- <a href="/api/edit?id={{.Detail.id}}" id="add_source" class="layui-btn layui-btn-sm"> 编辑 </a>
- </div>
- </div>
- <div class="api-infos">
- <ul>
- <li><strong>接口名称:</strong> {{.Detail.api_name}}</li>
- <li><strong>接口地址:</strong> {{.Detail.api_url}}</li>
- <li><strong>请求方式:</strong> {{.Detail.method}}</li>
- <li><strong>接口状态:</strong> {{str2html .Detail.audit_status}}</li>
- <li><strong>开发人员:</strong> {{.Detail.create_name}}</li>
- <li><strong>维护人员:</strong> {{.Detail.update_name}}</li>
- <li><strong>审核人员:</strong> {{.Detail.audit_name}}</li>
- <li><strong>上线时间:</strong> {{if eq .Detail.status 3}}{{.Detail.audit_time}}{{end}}</li>
- <li><strong>最后修改:</strong> {{.Detail.update_time}}</li>
- </ul>
- <div class="title"> 接口详细 </div>
- <hr>
- <div id="markdown-view" style="width: 95%">
- <textarea style="display:none;" name="markdown">
- {{.Detail.detail}}
- </textarea>
- </div>
- </div>
- <script>
- var $;
- layui.use(['form','element','layer','jquery',"code"],function(){
- var form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功
- var $ = layui.jquery;
- var element = layui.element;
- $(".edit_api").on("click",function(){
- var obj = $(this)
- var id = obj.attr("data-id");
- layer.open({
- type: 2,
- shade: 0.3,
- id:1,
- title:"修改接口-"+obj.attr("data-name"),
- content: '/api/editapi?id='+id,
- area:['800px','450px'],
- });
- })
- layui.code();
- });
- </script>
- {{template "public/editormd_show.html" .}}
|