| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <!DOCTYPE html>
- <html xmlns:th="http://www.thymeleaf.org">
- <head>
- <meta http-equiv="Content-Type" content="application/msword"/>
- <title>toWord2</title>
- <style type="text/css">
- .bg {
- background-color: rgb(84, 127, 177);
- }
- table {
- table-layout: fixed;
- }
- tr {
- height: 20px;
- font-size: 12px;
- }
- td {
- overflow: hidden;
- word-break: break-all;
- word-wrap: break-word;
- }
- .specialHeight {
- height: 40px;
- }
- </style>
- </head>
- <body>
- <h1 style="text-align: center;" th:text="${title}"></h1>
- <div th:each="app:${apps}">
- <h3 style="width:800px; margin: 0 auto" th:text="${appStat.index+1}+'.'+${app.apiInfo.title}"></h3>
- <h6 style="width:600px; margin: 0 auto" th:text="'描述:'+${app.apiInfo.description}"></h6>
- <h5 style="width:800px; margin: 0 auto" th:text="'作者:'+${app.apiInfo.author}"></h5>
- <h5 style="width:800px; margin: 0 auto" th:text="'路径:'+${app.apiInfo.basePath}"></h5>
- <h5 style="width:800px; margin: 0 auto" th:text="'版本:'+${app.apiInfo.version}"></h5>
- <div style="width:800px; margin: 0 auto">
- <div th:each="tag:${app.tags}">
- <!--这个是类的说明-->
- <h4 th:text="${appStat.index+1}+'.'+${tagStat.index+1}+'.'+${tag.key}"></h4>
- <div th:each="table:${tag.value.listTable}">
- <!--这个是每个请求的说明,方便生成文档后进行整理-->
- <h5 th:text="${appStat.index+1}+'.'+${tagStat.index+1}+'.'+${tableStat.index+1}+'.'+${table.tag}"></h5>
- <table border="1" cellspacing="0" cellpadding="0" width="100%">
- <tr class="bg">
- <td colspan="5" th:text="${table.tag}"></td>
- </tr>
- <tr>
- <td>接口描述</td>
- <td colspan="4" th:text="${table.description}"></td>
- </tr>
- <tr>
- <td>URL</td>
- <td colspan="4" th:text="${table.url}"></td>
- </tr>
- <tr>
- <td>请求方式</td>
- <td colspan="4" th:text="${table.requestType}"></td>
- </tr>
- <tr>
- <td>请求类型</td>
- <td colspan="4" th:text="${table.requestForm}"></td>
- </tr>
- <tr>
- <td>返回类型</td>
- <td colspan="4" th:text="${table.responseForm}"></td>
- </tr>
- <tr class="bg" align="center">
- <td>参数名</td>
- <td>数据类型</td>
- <td>参数类型</td>
- <td>是否必填</td>
- <td>说明</td>
- </tr>
- <tr align="center" th:each="request:${table.requestList}">
- <td th:text="${request.name}"></td>
- <td th:text="${request.type}"></td>
- <td th:text="${request.paramType}"></td>
- <td th:if="${request.require}" th:text="Y"></td>
- <td th:if="${!request.require}" th:text="N"></td>
- <td th:text="${request.remark}"></td>
- </tr>
- <tr class="bg" align="center">
- <td>状态码</td>
- <td>描述</td>
- <td colspan="3">说明</td>
- </tr>
- <tr align="center" th:each="response:${table.responseList}">
- <td th:text="${response.name}"></td>
- <td th:text="${response.description}"></td>
- <td colspan="3" th:text="${response.remark}"></td>
- </tr>
- <tr class="bg">
- <td colspan="5">示例</td>
- </tr>
- <tr class="specialHeight">
- <td class="bg">请求参数</td>
- <td colspan="4" th:text="${table.requestParam}"></td>
- </tr>
- <tr class="specialHeight">
- <td class="bg">返回值</td>
- <td colspan="4" th:text="${table.responseParam}"></td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- </div>
- </body>
- </html>
|