diff --git a/module/api/lang/zh-cn.php b/module/api/lang/zh-cn.php
index 007ec77e92..5242d61034 100644
--- a/module/api/lang/zh-cn.php
+++ b/module/api/lang/zh-cn.php
@@ -80,11 +80,16 @@ $lang->api->header = '请求头';
$lang->api->query = '请求参数';
$lang->api->params = '请求体';
$lang->api->response = '请求响应';
-$lang->api->responseExample = '响应实例';
+$lang->api->responseExample = '响应示例';
$lang->api->res = new stdClass();
$lang->api->res->name = '名称';
$lang->api->res->desc = '描述';
$lang->api->res->type = '类型';
+$lang->api->req = new stdClass();
+$lang->api->req->name = '名称';
+$lang->api->req->desc = '描述';
+$lang->api->req->type = '类型';
+$lang->api->req->required = '必填';
$lang->api->field = '字段';
$lang->api->scope = '位置';
$lang->api->paramsType = '类型';
diff --git a/module/api/view/content.html.php b/module/api/view/content.html.php
index 1849088c6f..13c28bf0c2 100644
--- a/module/api/view/content.html.php
+++ b/module/api/view/content.html.php
@@ -17,153 +17,150 @@
- ', '', "title='{$lang->fullscreen}' class='btn btn-link fullscreen-btn'");
- if(common::hasPriv('api', 'edit')) echo html::a(inlink('edit', "apiID=$api->id"), '', '', "title='{$lang->api->edit}' class='btn btn-link' data-app='{$this->app->tab}'");
- if(common::hasPriv('doc', 'delete'))
- {
- $deleteURL = $this->createLink('api', 'delete', "apiID=$api->id&confirm=yes");
- echo html::a("javascript:ajaxDeleteApi(\"$deleteURL\", confirmDelete)", '', '', "title='{$lang->api->delete}' class='btn btn-link'");
- }
- ?>
+ ', '', "title='{$lang->fullscreen}' class='btn btn-link fullscreen-btn'");
+ if(common::hasPriv('api', 'edit')) echo html::a(inlink('edit', "apiID=$api->id"), '', '', "title='{$lang->api->edit}' class='btn btn-link' data-app='{$this->app->tab}'");
+ if(common::hasPriv('doc', 'delete'))
+ {
+ $deleteURL = $this->createLink('api', 'delete', "apiID=$api->id&confirm=yes");
+ echo html::a("javascript:ajaxDeleteApi(\"$deleteURL\", confirmDelete)", '', '', "title='{$lang->api->delete}' class='btn btn-link'");
+ }
+ ?>
-
- | api->principal; ?> |
- owner; ?> |
-
-
- | api->apiDesc; ?> |
- desc; ?> |
-
- params as $param)
- {
- if($param['scope'] == apiModel::SCOPE_HEADER)
- array_push($header, $param);
- elseif($param['scope'] == apiModel::SCOPE_QUERY)
- array_push($query, $param);
- else
- array_push($params, $param);
- }
- $types = ['header', 'query', 'params']
- ?>
-
-
-
- api->$type; ?> |
-
-
-
-
-
-
- | 参数 |
- 类型 |
- 必填 |
- 说明 |
-
-
-
- |
-
- ' . $param['custom'] . '';
- }
- else
- {
- echo $param['paramsType'];
- }
- ?>
- |
- |
- |
-
-
-
-
- |
-
-
-
- | api->response; ?> |
-
- response['type'] == apiModel::PARAMS_TYPE_CUSTOM)
- {
- echo '' . $api->response['custom'] . ' ';
- }
- else
- {
- echo $api->response['type'];
- }
- ?>
- |
-
+
+ | api->principal; ?> |
+ owner; ?> |
+
+
+ | api->apiDesc; ?> |
+ desc; ?> |
+
+ params as $param)
+ {
+ if($param['scope'] == apiModel::SCOPE_HEADER)
+ array_push($header, $param);
+ elseif($param['scope'] == apiModel::SCOPE_QUERY)
+ array_push($query, $param);
+ else
+ array_push($params, $param);
+ }
+ $types = ['header', 'query', 'params']
+ ?>
+
+
+
api->$type ?>
+
+
+
+ | api->req->name ?> |
+ api->req->type ?> |
+ api->req->required ?> |
+ api->req->desc ?> |
+
+
+
+
+
+ |
+ |
+ |
+ |
+
+
+
+
+
+ paramsExample): ?>
+
api->paramsExample ?>
+
paramsExample ?>
+
+ response): ?>
+
api->responseExample; ?>
+
+
+
+ | api->res->name ?> |
+ api->res->type ?> |
+ api->res->desc ?> |
+
+
+
+ response as $res): ?>
+
+ |
+ |
+ |
+
+
+
+
+
- createLink('action', 'comment', "objectType=doc&objectID=$api->id");
- ?>
-
+ createLink('action', 'comment', "objectType=doc&objectID=$api->id");
+ ?>
+