www
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -49,10 +49,16 @@ input[type="date"] {
|
||||
src: url('./glyphicons-halflings-regular.eot');
|
||||
src: url('./glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),
|
||||
url('./glyphicons-halflings-regular.woff') format('woff'),
|
||||
url('./glyphicons-halflings-regular.woff2') format('woff2'),
|
||||
url('./glyphicons-halflings-regular.ttf') format('truetype'),
|
||||
url('./glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');
|
||||
}
|
||||
|
||||
/* Hide vertical scrollbar on off canvas animation ("left" positioning) */
|
||||
html {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Source Sans Pro", sans-serif;
|
||||
}
|
||||
@@ -63,7 +69,6 @@ a:focus {
|
||||
|
||||
#content {
|
||||
margin-top: 10px;
|
||||
margin-left: 20%;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
@@ -193,16 +198,30 @@ td.code {
|
||||
/* ------------------------------------------------------------------------------------------
|
||||
* Sidenav
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
.sidenav {
|
||||
color: var(--white);
|
||||
width: 20%;
|
||||
#scrollingNav {
|
||||
position: fixed;
|
||||
top: 50px;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
z-index: 10;
|
||||
background-color: var(--dark-gray);
|
||||
box-shadow: 0 2px 5px 0 rgb(0 0 0 / 16%), 0 2px 10px 0 rgb(0 0 0 / 12%);
|
||||
}
|
||||
|
||||
.sidenav {
|
||||
color: var(--white);
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.sidenav:hover {
|
||||
overflow-x: auto;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.sidenav > li > a {
|
||||
@@ -250,14 +269,80 @@ td.code {
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Off Canvas
|
||||
* --------------------------------------------------
|
||||
*/
|
||||
@media screen and (max-width: 767px) {
|
||||
#content {
|
||||
margin-top: 58px;
|
||||
}
|
||||
|
||||
.row-offcanvas {
|
||||
position: relative;
|
||||
-webkit-transition: all .25s ease-out;
|
||||
-o-transition: all .25s ease-out;
|
||||
transition: all .25s ease-out;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.row-offcanvas,
|
||||
.row-offcanvas * {
|
||||
transition: all 0.5s ease-out;
|
||||
}
|
||||
|
||||
.row-offcanvas .sidebar-offcanvas {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: -200px !important; /* 6 columns */
|
||||
width: 100%; /* 6 columns */
|
||||
max-width: 200px;
|
||||
}
|
||||
|
||||
.nav-toggle {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
background: var(--dark-gray);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.nav-toggle .btn {
|
||||
margin: 10px 14px;
|
||||
}
|
||||
.nav-toggle .icon-bar {
|
||||
display: block;
|
||||
width: 22px;
|
||||
height: 2px;
|
||||
border-radius: 1px;
|
||||
background-color: var(--white);
|
||||
}
|
||||
.nav-toggle .icon-bar + .icon-bar {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.row-offcanvas.active .sidebar-offcanvas {
|
||||
left: 0 !important; /* 6 columns */
|
||||
}
|
||||
.row-offcanvas.active, .row-offcanvas.active .nav-toggle {
|
||||
left: 200px;
|
||||
}
|
||||
/* Styling the three lines to make it an X */
|
||||
.row-offcanvas.active .nav-toggle .btn > .icon-bar {
|
||||
transform: rotate(45deg) translate(-4px, -4px);
|
||||
}
|
||||
.row-offcanvas.active .nav-toggle .btn .icon-bar:nth-child(2) {
|
||||
display: none;
|
||||
}
|
||||
.row-offcanvas.active .nav-toggle .btn .icon-bar:nth-child(3) {
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------------------------
|
||||
* Side nav search
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
.sidenav-search {
|
||||
width: 20%;
|
||||
left: 0px;
|
||||
position: fixed;
|
||||
padding: 16px 20px 10px 20px;
|
||||
padding: 16px 10px 10px;
|
||||
background-color: var(--dark-gray);
|
||||
}
|
||||
|
||||
@@ -273,10 +358,28 @@ td.code {
|
||||
height: 20px;
|
||||
text-align: center;
|
||||
right: 28px;
|
||||
top: 17px;
|
||||
top: 18px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------------------------
|
||||
* Prism - Toolbar
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
div.code-toolbar.code-toolbar > .toolbar {
|
||||
top: .4rem;
|
||||
right: .4rem;
|
||||
}
|
||||
div.code-toolbar.code-toolbar > .toolbar > .toolbar-item > button:hover,
|
||||
div.code-toolbar.code-toolbar > .toolbar > .toolbar-item > button:focus {
|
||||
color: var(--white);
|
||||
}
|
||||
div.code-toolbar.code-toolbar > .toolbar > .toolbar-item > button {
|
||||
color: var(--light-gray);
|
||||
padding: .5em;
|
||||
background: var(--hover-gray);
|
||||
box-shadow: 0 2px 1px 1px rgba(0,0,0,.5);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------------------------
|
||||
* Compare
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
|
||||
@@ -5,20 +5,30 @@
|
||||
<meta name="description" content="Shop电商app后端接口">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link href="assets/bootstrap.min.css" rel="stylesheet" media="screen">
|
||||
<link href="assets/prism.css" rel="stylesheet" />
|
||||
<link href="assets/main.css" rel="stylesheet" media="screen, print">
|
||||
<link href="assets/favicon.ico" rel="icon" type="image/x-icon">
|
||||
<link href="assets/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180">
|
||||
<link href="assets/favicon-32x32.png" rel="icon" type="image/png" sizes="32x32">
|
||||
<link href="assets/favicon-16x16.png"rel="icon" type="image/png" sizes="16x16">
|
||||
<link href="assets/bootstrap.min.css?v=1744814761090" rel="stylesheet" media="screen">
|
||||
<link href="assets/prism.css?v=1744814761090" rel="stylesheet" />
|
||||
<link href="assets/prism-toolbar.css?v=1744814761090" rel="stylesheet" />
|
||||
<link href="assets/prism-diff-highlight.css?v=1744814761090" rel="stylesheet" />
|
||||
<link href="assets/main.css?v=1744814761090" rel="stylesheet" media="screen, print">
|
||||
<link href="assets/favicon.ico?v=1744814761090" rel="icon" type="image/x-icon">
|
||||
<link href="assets/apple-touch-icon.png?v=1744814761090" rel="apple-touch-icon" sizes="180x180">
|
||||
<link href="assets/favicon-32x32.png?v=1744814761090" rel="icon" type="image/png" sizes="32x32">
|
||||
<link href="assets/favicon-16x16.png?v=1744814761090" rel="icon" type="image/png" sizes="16x16">
|
||||
</head>
|
||||
|
||||
<body class="container-fluid">
|
||||
|
||||
<!-- SIDENAV -->
|
||||
<script id="template-sidenav" type="text/x-handlebars-template">
|
||||
<nav id="scrollingNav">
|
||||
<nav id="scrollingNav" class="col-sm-3 col-lg-2 sidebar-offcanvas">
|
||||
<div class="nav-toggle visible-xs">
|
||||
<button type="button" class="btn btn-link" data-toggle="offcanvas">
|
||||
<span class="sr-only">{{__ "Toggle navigation"}}</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="sidenav-search">
|
||||
<input class="form-control search" data-action='filter-search' type="text" placeholder="{{__ "Filter..."}}">
|
||||
<span class="search-reset">x</span>
|
||||
@@ -145,7 +155,12 @@
|
||||
<p>{{{nl2br article.description}}}</p>
|
||||
{{/if}}
|
||||
<span class="method meth-{{toLowerCase article.type}}">{{article.type}}</span>
|
||||
<pre data-type="{{toLowerCase article.type}}"><code class="language-http">{{article.url}}</code></pre>
|
||||
<pre
|
||||
data-type="{{toLowerCase article.type}}"
|
||||
data-prismjs-copy="{{__ "Copy"}}"
|
||||
data-prismjs-copy-error="{{__ "Press Ctrl+C to copy"}}"
|
||||
data-prismjs-copy-success="{{__ "copied!"}}"
|
||||
><code class="language-http">{{article.url}}</code></pre>
|
||||
|
||||
{{#if article.permission}}
|
||||
<p>
|
||||
@@ -174,7 +189,12 @@
|
||||
<div class="tab-content">
|
||||
{{#each article.examples}}
|
||||
<div class="tab-pane{{#ifCond @index '==' 0}} active{{/ifCond}}" id="examples-{{../id}}-{{@index}}">
|
||||
<pre data-type="{{type}}"><code class="language-{{type}}">{{content}}</code></pre>
|
||||
<pre
|
||||
data-type="{{type}}"
|
||||
data-prismjs-copy="{{__ "Copy"}}"
|
||||
data-prismjs-copy-error="{{__ "Press Ctrl+C to copy"}}"
|
||||
data-prismjs-copy-success="{{__ "copied!"}}"
|
||||
><code class="language-{{type}}">{{content}}</code></pre>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
@@ -207,8 +227,9 @@
|
||||
<tbody>
|
||||
{{#each params}}
|
||||
<tr>
|
||||
<td class="code">{{this.field}}
|
||||
{{#if optional}}
|
||||
<td class="code">
|
||||
{{{nestObject this}}}
|
||||
{{#if this.optional}}
|
||||
<span class="label optional">{{__ "optional"}}</span>
|
||||
{{else}}
|
||||
{{#if ../template.showRequiredLabels}}
|
||||
@@ -252,8 +273,9 @@
|
||||
<tbody>
|
||||
{{#each params}}
|
||||
<tr>
|
||||
<td class="code">{{this.field}}
|
||||
{{#if optional}}
|
||||
<td class="code">
|
||||
{{{nestObject this}}}
|
||||
{{#if this.optional}}
|
||||
<span class="label optional">{{__ "optional"}}</span>
|
||||
{{else}}
|
||||
{{#if ../template.showRequiredLabels}}
|
||||
@@ -302,11 +324,12 @@
|
||||
<tbody>
|
||||
{{#each this}}
|
||||
<tr>
|
||||
<td class="code">{{{splitFill field "." " "}}}
|
||||
<td class="code">
|
||||
{{{nestObject this}}}
|
||||
{{#if optional}}
|
||||
<span class="label optional">{{__ "optional"}}</span>
|
||||
{{else}}
|
||||
{{#if ../template.showRequiredLabels}}
|
||||
{{#if ../../template.showRequiredLabels}}
|
||||
<span class="label required">{{__ "required"}}</span>
|
||||
{{/if}}
|
||||
{{/if}}</td>
|
||||
@@ -343,7 +366,12 @@
|
||||
<div class="tab-content">
|
||||
{{#each params.examples}}
|
||||
<div class="tab-pane{{#ifCond @index '==' 0}} active{{/ifCond}}" id="{{../section}}-examples-{{../id}}-{{@index}}">
|
||||
<pre data-type="{{type}}"><code class="language-{{type}}">{{reformat content type}}</code></pre>
|
||||
<pre
|
||||
data-type="{{type}}"
|
||||
data-prismjs-copy="{{__ "Copy"}}"
|
||||
data-prismjs-copy-error="{{__ "Press Ctrl+C to copy"}}"
|
||||
data-prismjs-copy-success="{{__ "copied!"}}"
|
||||
><code class="language-{{type}}">{{reformat content type}}</code></pre>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
@@ -413,12 +441,13 @@
|
||||
<div class="{{../id}}-sample-request-param-fields {{../id}}-sample-header-content-type-fields">
|
||||
{{#each this}}
|
||||
<div class="form-group">
|
||||
{{#ifNotObject type}}
|
||||
<label class="col-md-3 control-label" for="sample-request-param-field-{{field}}">{{field}}</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">{{{type}}}</div>
|
||||
{{#if allowedValues}}
|
||||
<div class="input-group-addon sample-request-select">
|
||||
<select class="form-control" data-name="{{field}}" data-family="query" data-group="{{@../index}}" {{#if optional}}data-optional="true"{{/if}}>
|
||||
<select class="form-control" data-name="{{dot2bracket this}}" data-family="query" data-group="{{@../index}}" {{#if optional}}data-optional="true"{{/if}}>
|
||||
<option value="" class="empty"><{{__ "No value"}}></option>
|
||||
{{#each allowedValues}}
|
||||
<option {{#ifCond ../defaultValue '===' this}} selected {{/ifCond}}value="{{{removeDblQuotes this}}}">{{{removeDblQuotes this}}}</option>
|
||||
@@ -432,14 +461,15 @@
|
||||
class="{{#ifCond type '!==' 'Boolean'}}form-control{{/ifCond}} sample-request-param"
|
||||
type="{{setInputType type}}"
|
||||
value="{{#if defaultValue}}{{ defaultValue }}{{/if}}"
|
||||
placeholder="{{#if defaultValue}}{{ defaultValue }}{{else}}{{field}}{{/if}}"
|
||||
data-name="{{field}}"
|
||||
placeholder="{{#if defaultValue}}{{ defaultValue }}{{/if}}"
|
||||
data-name="{{dot2bracket this}}"
|
||||
data-family="query"
|
||||
data-group="{{@../index}}"
|
||||
{{#if optional}}data-optional="true"{{/if}}>
|
||||
</div></div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/ifNotObject}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
@@ -452,12 +482,13 @@
|
||||
<div class="{{../id}}-sample-request-param-fields {{../id}}-sample-header-content-type-fields">
|
||||
{{#each article.query}}
|
||||
<div class="form-group">
|
||||
{{#ifNotObject type}}
|
||||
<label class="col-md-3 control-label" for="sample-request-param-field-{{field}}">{{field}}{{#if optional}} ({{__ "optional"}}){{/if}}</label>
|
||||
<div class="input-group col-md-6">
|
||||
<div class="input-group-addon">{{{type}}}</div>
|
||||
{{#if allowedValues}}
|
||||
<div class="input-group-addon sample-request-select">
|
||||
<select class="form-control" data-name="{{field}}" data-family="query" data-group="{{@../index}}" {{#if optional}}data-optional="true"{{/if}}>
|
||||
<select class="form-control" data-name="{{dot2bracket this}}" data-family="query" data-group="{{@../index}}" {{#if optional}}data-optional="true"{{/if}}>
|
||||
<option value="" class="empty"><{{__ "No value"}}></option>
|
||||
{{#each allowedValues}}
|
||||
<option {{#ifCond ../defaultValue '===' this}} selected {{/ifCond}}value="{{{removeDblQuotes this}}}">{{{removeDblQuotes this}}}</option>
|
||||
@@ -471,14 +502,15 @@
|
||||
class="{{#ifCond type '!==' 'Boolean'}}form-control{{/ifCond}} sample-request-input"
|
||||
type="{{setInputType type}}"
|
||||
value="{{#if defaultValue}}{{ defaultValue }}{{/if}}"
|
||||
placeholder="{{#if defaultValue}}{{ defaultValue }}{{else}}{{field}}{{/if}}"
|
||||
data-name="{{field}}"
|
||||
placeholder="{{#if defaultValue}}{{ defaultValue }}{{/if}}"
|
||||
data-name="{{dot2bracket this}}"
|
||||
data-family="query"
|
||||
data-group="{{@../index}}"
|
||||
{{#if optional}}data-optional="true"{{/if}}>
|
||||
</div></div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/ifNotObject}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
@@ -511,12 +543,13 @@
|
||||
<div hidden class="col-md-9" id="sample-request-body-form-input-{{this.id}}">
|
||||
{{#each article.body}}
|
||||
<div class="form-group">
|
||||
{{#ifNotObject type}}
|
||||
<label class="col-md-3 control-label" for="sample-request-param-field-{{field}}">{{field}}</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">{{{type}}}</div>
|
||||
{{#if allowedValues}}
|
||||
<div class="input-group-addon sample-request-select">
|
||||
<select class="form-control" data-name="{{field}}" data-family="body" data-group="{{@../index}}" {{#if optional}}data-optional="true"{{/if}}>
|
||||
<select class="form-control" data-name="{{dot2bracket this}}" data-family="body" data-group="{{@../index}}" {{#if optional}}data-optional="true"{{/if}}>
|
||||
<option value="" class="empty"><{{__ "No value"}}></option>
|
||||
{{#each allowedValues}}
|
||||
<option {{#ifCond ../defaultValue '===' this}} selected {{/ifCond}}value="{{{removeDblQuotes this}}}">{{{removeDblQuotes this}}}</option>
|
||||
@@ -531,14 +564,15 @@
|
||||
type="{{setInputType type}}"
|
||||
value="{{#ifCond type '!==' 'Boolean'}}{{#if defaultValue}}{{ defaultValue }}{{/if}}{{/ifCond}}"
|
||||
{{#if checked}}checked{{/if}}
|
||||
placeholder="{{field}}"
|
||||
placeholder="{{#if defaultValue}}{{ defaultValue }}{{/if}}"
|
||||
data-family="body"
|
||||
data-name="{{field}}"
|
||||
data-name="{{dot2bracket this}}"
|
||||
data-content-type="form"
|
||||
{{#if optional}}data-optional="true"{{/if}}>
|
||||
</div></div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/ifNotObject}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
@@ -555,7 +589,12 @@
|
||||
{{__ "Response"}}
|
||||
<button class="btn btn-default btn-xs pull-right sample-request-clear">X</button>
|
||||
</h3>
|
||||
<pre data-type="json"><code class="language-json sample-request-response-json"></code></pre>
|
||||
<pre
|
||||
data-type="json"
|
||||
data-prismjs-copy="{{__ "Copy"}}"
|
||||
data-prismjs-copy-error="{{__ "Press Ctrl+C to copy"}}"
|
||||
data-prismjs-copy-success="{{__ "copied!"}}"
|
||||
><code class="language-json sample-request-response-json"></code></pre>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
@@ -597,7 +636,13 @@
|
||||
{{/if}}
|
||||
|
||||
<span class="method meth-{{toLowerCase compare.type}}">{{compare.type}}</span>
|
||||
<pre data-type="{{toLowerCase article.type}}" class="language-html">{{{showDiff article.url compare.url}}}</pre>
|
||||
<pre
|
||||
data-type="{{toLowerCase article.type}}"
|
||||
data-prismjs-copy="{{__ "Copy"}}"
|
||||
data-prismjs-copy-error="{{__ "Press Ctrl+C to copy"}}"
|
||||
data-prismjs-copy-success="{{__ "copied!"}}"
|
||||
class="language-html"
|
||||
>{{{showDiff article.url compare.url}}}</pre>
|
||||
|
||||
{{subTemplate "article-compare-permission" article=article compare=compare}}
|
||||
|
||||
@@ -605,19 +650,19 @@
|
||||
{{#each_compare_title article.examples compare.examples}}
|
||||
{{#if typeSame}}
|
||||
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
|
||||
<a href="#compare-examples-{{../../article.id}}-{{index}}" role="tab" data-toggle="tab">{{{showDiff source.title compare.title}}}</a>
|
||||
<a href="#compare-examples-{{../article.id}}-{{index}}" role="tab" data-toggle="tab">{{{showDiff source.title compare.title}}}</a>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeIns}}
|
||||
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
|
||||
<a href="#compare-examples-{{../../article.id}}-{{index}}"><ins>{{{source.title}}}</ins></a>
|
||||
<a href="#compare-examples-{{../article.id}}-{{index}}"><ins>{{{source.title}}}</ins></a>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDel}}
|
||||
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
|
||||
<a href="#compare-examples-{{../../article.id}}-{{index}}"><del>{{{compare.title}}}</del></a>
|
||||
<a href="#compare-examples-{{../article.id}}-{{index}}"><del>{{{compare.title}}}</del></a>
|
||||
</li>
|
||||
{{/if}}
|
||||
{{/each_compare_title}}
|
||||
@@ -627,27 +672,45 @@
|
||||
{{#each_compare_title article.examples compare.examples}}
|
||||
|
||||
{{#if typeSame}}
|
||||
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="compare-examples-{{../../article.id}}-{{index}}">
|
||||
<pre data-type="{{source.type}}" class="language-{{source.type}}">{{{showDiff source.content compare.content}}}</pre>
|
||||
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="compare-examples-{{../article.id}}-{{index}}">
|
||||
<pre
|
||||
data-type="{{source.type}}"
|
||||
data-prismjs-copy="{{__ "Copy"}}"
|
||||
data-prismjs-copy-error="{{__ "Press Ctrl+C to copy"}}"
|
||||
data-prismjs-copy-success="{{__ "copied!"}}"
|
||||
><code class="language-diff-{{source.type}} diff-highlight">{{{showDiff source.content compare.content "code"}}}</code></pre>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeIns}}
|
||||
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="compare-examples-{{../../article.id}}-{{index}}">
|
||||
<pre data-type="{{source.type}}" class="language-{{source.type}}">{{{source.content}}}</pre>
|
||||
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="compare-examples-{{../article.id}}-{{index}}">
|
||||
<pre
|
||||
data-type="{{source.type}}"
|
||||
data-prismjs-copy="{{__ "Copy"}}"
|
||||
data-prismjs-copy-error="{{__ "Press Ctrl+C to copy"}}"
|
||||
data-prismjs-copy-success="{{__ "copied!"}}"
|
||||
><code class="language-{{source.type}}">{{{source.content}}}</code></pre>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDel}}
|
||||
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="compare-examples-{{../../article.id}}-{{index}}">
|
||||
<pre data-type="{{compare.type}}" class="language-{{source.type}}">{{{compare.content}}}</pre>
|
||||
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="compare-examples-{{../article.id}}-{{index}}">
|
||||
<pre
|
||||
data-type="{{compare.type}}"
|
||||
data-prismjs-copy="{{__ "Copy"}}"
|
||||
data-prismjs-copy-error="{{__ "Press Ctrl+C to copy"}}"
|
||||
data-prismjs-copy-success="{{__ "copied!"}}"
|
||||
><code class="language-{{source.type}}">{{{compare.content}}}</code></pre>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{/each_compare_title}}
|
||||
</div>
|
||||
|
||||
{{subTemplate "article-compare-param-block" source=article.header compare=compare.header _hasType=_hasTypeInHeaderFields section="header"}}
|
||||
{{subTemplate "article-compare-param-block" source=article.parameter compare=compare.parameter _hasType=_hasTypeInParameterFields section="parameter"}}
|
||||
{{subTemplate "article-compare-query-block" source=article.query compare=compare.query _hasType=_hasTypeInParameterFields section="query"}}
|
||||
{{subTemplate "article-compare-body-block" source=article.body compare=compare.body _hasType=_hasTypeInParameterFields section="body"}}
|
||||
{{subTemplate "article-compare-param-block" source=article.success compare=compare.success _hasType=_hasTypeInSuccessFields section="success"}}
|
||||
{{subTemplate "article-compare-param-block" source=article.error compare=compare.error _col1="Name" _hasType=_hasTypeInErrorFields section="error"}}
|
||||
|
||||
@@ -776,19 +839,19 @@
|
||||
{{#each_compare_title source.examples compare.examples}}
|
||||
{{#if typeSame}}
|
||||
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
|
||||
<a href="#{{../../section}}-compare-examples-{{../../article.id}}-{{index}}" role="tab" data-toggle="tab">{{{showDiff source.title compare.title}}}</a>
|
||||
<a href="#{{../section}}-compare-examples-{{../article.id}}-{{index}}" role="tab" data-toggle="tab">{{{showDiff source.title compare.title}}}</a>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeIns}}
|
||||
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
|
||||
<a href="#{{../../section}}-compare-examples-{{../../article.id}}-{{index}}"><ins>{{{source.title}}}</ins></a>
|
||||
<a href="#{{../section}}-compare-examples-{{../article.id}}-{{index}}"><ins>{{{source.title}}}</ins></a>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDel}}
|
||||
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
|
||||
<a href="#{{../../section}}-compare-examples-{{../../article.id}}-{{index}}"><del>{{{compare.title}}}</del></a>
|
||||
<a href="#{{../section}}-compare-examples-{{../article.id}}-{{index}}"><del>{{{compare.title}}}</del></a>
|
||||
</li>
|
||||
{{/if}}
|
||||
{{/each_compare_title}}
|
||||
@@ -798,20 +861,35 @@
|
||||
{{#each_compare_title source.examples compare.examples}}
|
||||
|
||||
{{#if typeSame}}
|
||||
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="{{../../section}}-compare-examples-{{../../article.id}}-{{index}}">
|
||||
<pre data-type="{{source.type}}" class="language-{{source.type}}">{{{showDiff source.content compare.content}}}</pre>
|
||||
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="{{../section}}-compare-examples-{{../article.id}}-{{index}}">
|
||||
<pre
|
||||
data-type="{{source.type}}"
|
||||
data-prismjs-copy="{{__ "Copy"}}"
|
||||
data-prismjs-copy-error="{{__ "Press Ctrl+C to copy"}}"
|
||||
data-prismjs-copy-success="{{__ "copied!"}}"
|
||||
><code class="language-diff-{{source.type}} diff-highlight">{{{showDiff source.content compare.content "code"}}}</code></pre>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeIns}}
|
||||
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="{{../../section}}-compare-examples-{{../../article.id}}-{{index}}">
|
||||
<pre data-type="{{source.type}}"><code class="language-{{source.type}}">{{{source.content}}}</code></pre>
|
||||
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="{{../section}}-compare-examples-{{../article.id}}-{{index}}">
|
||||
<pre
|
||||
data-type="{{source.type}}"
|
||||
data-prismjs-copy="{{__ "Copy"}}"
|
||||
data-prismjs-copy-error="{{__ "Press Ctrl+C to copy"}}"
|
||||
data-prismjs-copy-success="{{__ "copied!"}}"
|
||||
><code class="language-{{source.type}}">{{{source.content}}}</code></pre>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDel}}
|
||||
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="{{../../section}}-compare-examples-{{../../article.id}}-{{index}}">
|
||||
<pre data-type="{{compare.type}}"><code class="language-{{source.type}}">{{{compare.content}}}</code></pre>
|
||||
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="{{../section}}-compare-examples-{{../article.id}}-{{index}}">
|
||||
<pre
|
||||
data-type="{{compare.type}}"
|
||||
data-prismjs-copy="{{__ "Copy"}}"
|
||||
data-prismjs-copy-error="{{__ "Press Ctrl+C to copy"}}"
|
||||
data-prismjs-copy-success="{{__ "copied!"}}"
|
||||
><code class="language-{{source.type}}">{{{compare.content}}}</code></pre>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each_compare_title}}
|
||||
@@ -820,13 +898,49 @@
|
||||
{{/if}}
|
||||
</script>
|
||||
|
||||
<script id="template-article-compare-query-block" type="text/x-handlebars-template">
|
||||
{{#if article.query}}
|
||||
<h2>{{__ "Query Parameter(s)"}}</h2>
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
|
||||
{{#unless this.Type compare=null}}
|
||||
<th style="width: 10%">{{__ "Type"}}</th>
|
||||
{{/unless}}
|
||||
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{{subTemplate "article-compare-param-block-body" source=source compare=compare _hasType=this.type}}
|
||||
</table>
|
||||
{{/if}}
|
||||
</script>
|
||||
|
||||
<script id="template-article-compare-body-block" type="text/x-handlebars-template">
|
||||
{{#if article.body}}
|
||||
<h2>{{__ "Request Body"}}</h2>
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
|
||||
{{#unless this.Type compare=null}}
|
||||
<th style="width: 10%">{{__ "Type"}}</th>
|
||||
{{/unless}}
|
||||
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{{subTemplate "article-compare-param-block-body" source=source compare=compare _hasType=this.type}}
|
||||
</table>
|
||||
{{/if}}
|
||||
</script>
|
||||
|
||||
<script id="template-article-compare-param-block-body" type="text/x-handlebars-template">
|
||||
<tbody>
|
||||
{{#each_compare_field source compare}}
|
||||
{{#if typeSame}}
|
||||
<tr>
|
||||
<td class="code">
|
||||
{{{splitFill source.field "." " "}}}
|
||||
{{{nestObject source}}}
|
||||
{{#if source.optional}}
|
||||
{{#if compare.optional}} <span class="label label-optional">{{__ "optional"}}</span>
|
||||
{{else}} <span class="label label-optional label-ins">{{__ "optional"}}</span>
|
||||
@@ -859,7 +973,7 @@
|
||||
{{#if typeIns}}
|
||||
<tr class="ins">
|
||||
<td class="code">
|
||||
{{{splitFill source.field "." " "}}}
|
||||
{{{nestObject source}}}
|
||||
{{#if source.optional}} <span class="label label-optional label-ins">{{__ "optional"}}</span>{{/if}}
|
||||
</td>
|
||||
|
||||
@@ -879,7 +993,7 @@
|
||||
{{#if typeDel}}
|
||||
<tr class="del">
|
||||
<td class="code">
|
||||
{{{splitFill compare.field "." " "}}}
|
||||
{{{nestObject compare}}}
|
||||
{{#if compare.optional}} <span class="label label-optional label-del">{{__ "optional"}}</span>{{/if}}
|
||||
</td>
|
||||
|
||||
@@ -901,9 +1015,9 @@
|
||||
</script>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div id="sidenav" class="span2"></div>
|
||||
<div id="content">
|
||||
<div class="row row-offcanvas row-offcanvas-left">
|
||||
<div id="sidenav" class="col-sm-3 col-lg-2"></div>
|
||||
<div id="content" class="col-sm-9 col-lg-10">
|
||||
<div id="project"></div>
|
||||
<div id="header"></div>
|
||||
<div id="sections"></div>
|
||||
@@ -928,6 +1042,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="assets/main.bundle.js"></script>
|
||||
<script src="assets/main.bundle.js?v=1744814761090"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,6 +1,39 @@
|
||||
const { log } = require("debug");
|
||||
const _ = require("../import");
|
||||
|
||||
/**
|
||||
* @api {post} /home/hotSales hotSales
|
||||
* @apiDescription 获取九宫格下手机重点推荐的数据
|
||||
* @apiName hotSales
|
||||
* @apiGroup Home
|
||||
* @apiSuccessExample {json} 请求成功的返回:
|
||||
* {
|
||||
* "status" : 200,
|
||||
* "message" : "请求成功"
|
||||
* "result" : "asjXzXxmnSp8TZGWiTSlJF8Gb...5LhYoHs86SEI2LBXrTZ9e/a4frZOWHZ"
|
||||
* }
|
||||
* @apiErrorExample {json} 请求失败的返回
|
||||
* {
|
||||
* "status": 404,
|
||||
* "message" : "请求失败"
|
||||
* "result": null
|
||||
* }
|
||||
* @apiSampleRequest http://127.0.0.1:9090/home/hotSales
|
||||
* @apiVersion 1.0.0
|
||||
*/
|
||||
_.router.post('/hotSales', async function (req, res, next) {
|
||||
|
||||
res.json({
|
||||
status: 200,
|
||||
message: '请求成功',
|
||||
result: [
|
||||
{ wares_id: 113, src: 'https://fms.res.meizu.com/dms/2024/12/06/f4d1f706-f5c1-41c7-ac36-f8d55a044ec8.jpg' },
|
||||
{ wares_id: 114, src: 'https://fms.res.meizu.com/dms/2025/01/22/7e9e15db-7b8e-44a0-8e9f-77c5e5a3b28d.png' },
|
||||
{ wares_id: 115, src: 'https://fms.res.meizu.com/dms/2025/03/24/6d7b1e2c-b129-4d48-9aad-3afb57c334b4.jpg' },
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* @api {post} /home/index index
|
||||
|
||||
@@ -16,10 +16,18 @@
|
||||
# "pwd": "Lb123456"
|
||||
# }
|
||||
|
||||
POST http://127.0.0.1:9090/home/info HTTP/1.1
|
||||
# POST http://127.0.0.1:9090/home/info HTTP/1.1
|
||||
# content-type: application/json
|
||||
# token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MjAsInVzZXJuYW1lIjoiYm15MTIzNDU2IiwiaWF0IjoxNzQ0NjQyNjkyLCJleHAiOjE3NDQ2NTM0OTJ9.s8cG_f8-TsytaC6VvMUFDLauCUkIG09ogkjjQoUqO-g
|
||||
|
||||
# {
|
||||
# "id": 140
|
||||
# }
|
||||
|
||||
|
||||
POST http://127.0.0.1:9090/home/hotSales HTTP/1.1
|
||||
content-type: application/json
|
||||
token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MjAsInVzZXJuYW1lIjoiYm15MTIzNDU2IiwiaWF0IjoxNzQ0NjQyNjkyLCJleHAiOjE3NDQ2NTM0OTJ9.s8cG_f8-TsytaC6VvMUFDLauCUkIG09ogkjjQoUqO-g
|
||||
token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MjEsInVzZXJuYW1lIjoiYm15MTIzNDU2IiwiaWF0IjoxNzQ0ODEyMzg0LCJleHAiOjE3NDQ4MjMxODR9.WcCQ9Viinnqg8jCp_qJgDh4FB3pss56xdT3EV0rgeLA
|
||||
|
||||
{
|
||||
"id": 140
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user