作者 郭盛
1 个管道 的构建 通过 耗费 0 秒

图片

@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 <project version="4"> 2 <project version="4">
3 <component name="ChangeListManager"> 3 <component name="ChangeListManager">
4 <list default="true" id="e93f11c2-a7d9-4d35-8b1c-8dd18e7f5fef" name="Default" comment=""> 4 <list default="true" id="e93f11c2-a7d9-4d35-8b1c-8dd18e7f5fef" name="Default" comment="">
  5 + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
5 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/application/api/controller/User.php" afterPath="$PROJECT_DIR$/application/api/controller/User.php" /> 6 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/application/api/controller/User.php" afterPath="$PROJECT_DIR$/application/api/controller/User.php" />
6 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/api.html" afterPath="$PROJECT_DIR$/public/api.html" /> 7 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/api.html" afterPath="$PROJECT_DIR$/public/api.html" />
7 </list> 8 </list>
@@ -17,8 +18,8 @@ @@ -17,8 +18,8 @@
17 <file leaf-file-name="User.php" pinned="false" current-in-tab="true"> 18 <file leaf-file-name="User.php" pinned="false" current-in-tab="true">
18 <entry file="file://$PROJECT_DIR$/application/api/controller/User.php"> 19 <entry file="file://$PROJECT_DIR$/application/api/controller/User.php">
19 <provider selected="true" editor-type-id="text-editor"> 20 <provider selected="true" editor-type-id="text-editor">
20 - <state relative-caret-position="254">  
21 - <caret line="219" column="17" lean-forward="true" selection-start-line="219" selection-start-column="17" selection-end-line="219" selection-end-column="17" /> 21 + <state relative-caret-position="329">
  22 + <caret line="271" column="5" lean-forward="true" selection-start-line="271" selection-start-column="5" selection-end-line="271" selection-end-column="5" />
22 <folding> 23 <folding>
23 <element signature="e#38#68#0#PHP" expanded="true" /> 24 <element signature="e#38#68#0#PHP" expanded="true" />
24 <element signature="e#312#384#0#PHP" expanded="false" /> 25 <element signature="e#312#384#0#PHP" expanded="false" />
@@ -27,6 +28,7 @@ @@ -27,6 +28,7 @@
27 <element signature="e#2802#3330#0#PHP" expanded="false" /> 28 <element signature="e#2802#3330#0#PHP" expanded="false" />
28 <element signature="e#3335#4106#0#PHP" expanded="false" /> 29 <element signature="e#3335#4106#0#PHP" expanded="false" />
29 <element signature="e#4112#4519#0#PHP" expanded="false" /> 30 <element signature="e#4112#4519#0#PHP" expanded="false" />
  31 + <element signature="e#4873#5474#0#PHP" expanded="false" />
30 </folding> 32 </folding>
31 </state> 33 </state>
32 </provider> 34 </provider>
@@ -110,8 +112,8 @@ @@ -110,8 +112,8 @@
110 </component> 112 </component>
111 <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" /> 113 <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
112 <component name="ProjectFrameBounds"> 114 <component name="ProjectFrameBounds">
113 - <option name="x" value="362" />  
114 - <option name="y" value="79" /> 115 + <option name="x" value="667" />
  116 + <option name="y" value="102" />
115 <option name="width" value="1589" /> 117 <option name="width" value="1589" />
116 <option name="height" value="930" /> 118 <option name="height" value="930" />
117 </component> 119 </component>
@@ -207,7 +209,7 @@ @@ -207,7 +209,7 @@
207 <workItem from="1574122453532" duration="15780000" /> 209 <workItem from="1574122453532" duration="15780000" />
208 <workItem from="1574141466352" duration="745000" /> 210 <workItem from="1574141466352" duration="745000" />
209 <workItem from="1574143209694" duration="3660000" /> 211 <workItem from="1574143209694" duration="3660000" />
210 - <workItem from="1574146994475" duration="4250000" /> 212 + <workItem from="1574146994475" duration="4813000" />
211 </task> 213 </task>
212 <task id="LOCAL-00001" summary="调试"> 214 <task id="LOCAL-00001" summary="调试">
213 <created>1574145133364</created> 215 <created>1574145133364</created>
@@ -220,7 +222,7 @@ @@ -220,7 +222,7 @@
220 <servers /> 222 <servers />
221 </component> 223 </component>
222 <component name="TimeTrackingManager"> 224 <component name="TimeTrackingManager">
223 - <option name="totallyTimeSpent" value="52603000" /> 225 + <option name="totallyTimeSpent" value="53166000" />
224 </component> 226 </component>
225 <component name="TodoView"> 227 <component name="TodoView">
226 <todo-panel id="selected-file"> 228 <todo-panel id="selected-file">
@@ -232,7 +234,7 @@ @@ -232,7 +234,7 @@
232 </todo-panel> 234 </todo-panel>
233 </component> 235 </component>
234 <component name="ToolWindowManager"> 236 <component name="ToolWindowManager">
235 - <frame x="362" y="79" width="1589" height="930" extended-state="0" /> 237 + <frame x="667" y="102" width="1589" height="930" extended-state="0" />
236 <layout> 238 <layout>
237 <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18574232" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" /> 239 <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18574232" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" />
238 <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32912987" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" /> 240 <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32912987" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
@@ -639,8 +641,8 @@ @@ -639,8 +641,8 @@
639 </entry> 641 </entry>
640 <entry file="file://$PROJECT_DIR$/application/api/controller/User.php"> 642 <entry file="file://$PROJECT_DIR$/application/api/controller/User.php">
641 <provider selected="true" editor-type-id="text-editor"> 643 <provider selected="true" editor-type-id="text-editor">
642 - <state relative-caret-position="254">  
643 - <caret line="219" column="17" lean-forward="true" selection-start-line="219" selection-start-column="17" selection-end-line="219" selection-end-column="17" /> 644 + <state relative-caret-position="329">
  645 + <caret line="271" column="5" lean-forward="true" selection-start-line="271" selection-start-column="5" selection-end-line="271" selection-end-column="5" />
644 <folding> 646 <folding>
645 <element signature="e#38#68#0#PHP" expanded="true" /> 647 <element signature="e#38#68#0#PHP" expanded="true" />
646 <element signature="e#312#384#0#PHP" expanded="false" /> 648 <element signature="e#312#384#0#PHP" expanded="false" />
@@ -649,6 +651,7 @@ @@ -649,6 +651,7 @@
649 <element signature="e#2802#3330#0#PHP" expanded="false" /> 651 <element signature="e#2802#3330#0#PHP" expanded="false" />
650 <element signature="e#3335#4106#0#PHP" expanded="false" /> 652 <element signature="e#3335#4106#0#PHP" expanded="false" />
651 <element signature="e#4112#4519#0#PHP" expanded="false" /> 653 <element signature="e#4112#4519#0#PHP" expanded="false" />
  654 + <element signature="e#4873#5474#0#PHP" expanded="false" />
652 </folding> 655 </folding>
653 </state> 656 </state>
654 </provider> 657 </provider>
@@ -175,7 +175,7 @@ class User extends Api @@ -175,7 +175,7 @@ class User extends Api
175 "data": { 175 "data": {
176 "id": 4,//视频id/图片id, 176 "id": 4,//视频id/图片id,
177 "thumbnail": //视频封面图地址/图片地址, 177 "thumbnail": //视频封面图地址/图片地址,
178 - "video": //视频路径, 178 + "video": //视频路径/精美大片视频路径,
179 } 179 }
180 }) 180 })
181 */ 181 */
@@ -226,6 +226,49 @@ class User extends Api @@ -226,6 +226,49 @@ class User extends Api
226 226
227 } 227 }
228 228
229 - 229 + /**
  230 + * @ApiTitle (图片列表)
  231 + * @ApiSummary (图片列表)
  232 + * @ApiMethod (POST)
  233 + * @ApiRoute (/api/user/pic)
  234 + * @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
  235 + * @ApiParams (name="type_id", type="inter", required=false, description="地区ID")
  236 + * @ApiReturn({
  237 + "code": 1,
  238 + "msg": "成功",
  239 + "time": "1571492001",
  240 + "data": {
  241 + "id": 4,//图片id,
  242 + "thumbnail": //缩略图,
  243 + }
  244 + })
  245 + */
  246 + public function pic()
  247 + {
  248 + $rule = config('verify.path');
  249 + $type_id = $this->request->post('type_id');
  250 + if(empty($type_id)){
  251 + $data = Db::name('pic')
  252 + ->field('id,thumbnail')
  253 + ->order('id desc')
  254 + ->select();
  255 + foreach ($data as &$v){
  256 + $v['thumbnail'] = $rule.$v['thumbnail'];
  257 + }
  258 + $this->success('SUCCESS',$data);
  259 + }else{
  260 + $type = ','.$type_id.',';
  261 + $where['type_ids'] = ['like',"%$type%"];
  262 + $data = Db::name('pic')
  263 + ->where($where)
  264 + ->field('id,thumbnail')
  265 + ->order('id desc')
  266 + ->select();
  267 + foreach ($data as &$v){
  268 + $v['thumbnail'] = $rule.$v['thumbnail'];
  269 + }
  270 + $this->success('SUCCESS',$data);
  271 + }
  272 + }
230 273
231 } 274 }
@@ -168,6 +168,7 @@ @@ -168,6 +168,7 @@
168 <a href="javascript:;" data-id="9" class="list-group-item">首页视频、图片、精美大片入口</a> 168 <a href="javascript:;" data-id="9" class="list-group-item">首页视频、图片、精美大片入口</a>
169 <a href="javascript:;" data-id="10" class="list-group-item">地区分类</a> 169 <a href="javascript:;" data-id="10" class="list-group-item">地区分类</a>
170 <a href="javascript:;" data-id="11" class="list-group-item">搜索页</a> 170 <a href="javascript:;" data-id="11" class="list-group-item">搜索页</a>
  171 + <a href="javascript:;" data-id="12" class="list-group-item">图片列表</a>
171 </div> 172 </div>
172 </div> 173 </div>
173 </div> 174 </div>
@@ -1681,7 +1682,153 @@ @@ -1681,7 +1682,153 @@
1681 "data": { 1682 "data": {
1682 "id": 4,//视频id/图片id, 1683 "id": 4,//视频id/图片id,
1683 "thumbnail": //视频封面图地址/图片地址, 1684 "thumbnail": //视频封面图地址/图片地址,
1684 - "video": //视频路径, 1685 + "video": //视频路径/精美大片视频路径,
  1686 + }
  1687 + }</pre>
  1688 + </div>
  1689 + </div>
  1690 + </div><!-- #sample -->
  1691 +
  1692 + </div><!-- .tab-content -->
  1693 + </div>
  1694 + </div>
  1695 + </div>
  1696 + <div class="panel panel-default">
  1697 + <div class="panel-heading" id="heading-12">
  1698 + <h4 class="panel-title">
  1699 + <span class="label label-primary">POST</span>
  1700 + <a data-toggle="collapse" data-parent="#accordion12" href="#collapseOne12"> 图片列表 <span class="text-muted">/api/user/pic</span></a>
  1701 + </h4>
  1702 + </div>
  1703 + <div id="collapseOne12" class="panel-collapse collapse">
  1704 + <div class="panel-body">
  1705 +
  1706 + <!-- Nav tabs -->
  1707 + <ul class="nav nav-tabs" id="doctab12">
  1708 + <li class="active"><a href="#info12" data-toggle="tab">基础信息</a></li>
  1709 + <li><a href="#sandbox12" data-toggle="tab">在线测试</a></li>
  1710 + <li><a href="#sample12" data-toggle="tab">返回示例</a></li>
  1711 + </ul>
  1712 +
  1713 + <!-- Tab panes -->
  1714 + <div class="tab-content">
  1715 +
  1716 + <div class="tab-pane active" id="info12">
  1717 + <div class="well">
  1718 + 图片列表 </div>
  1719 + <div class="panel panel-default">
  1720 + <div class="panel-heading"><strong>Headers</strong></div>
  1721 + <div class="panel-body">
  1722 + <table class="table table-hover">
  1723 + <thead>
  1724 + <tr>
  1725 + <th>名称</th>
  1726 + <th>类型</th>
  1727 + <th>必选</th>
  1728 + <th>描述</th>
  1729 + </tr>
  1730 + </thead>
  1731 + <tbody>
  1732 + <tr>
  1733 + <td>token</td>
  1734 + <td>string</td>
  1735 + <td></td>
  1736 + <td>请求的Token</td>
  1737 + </tr>
  1738 + </tbody>
  1739 + </table>
  1740 + </div>
  1741 + </div>
  1742 + <div class="panel panel-default">
  1743 + <div class="panel-heading"><strong>参数</strong></div>
  1744 + <div class="panel-body">
  1745 + <table class="table table-hover">
  1746 + <thead>
  1747 + <tr>
  1748 + <th>名称</th>
  1749 + <th>类型</th>
  1750 + <th>必选</th>
  1751 + <th>描述</th>
  1752 + </tr>
  1753 + </thead>
  1754 + <tbody>
  1755 + <tr>
  1756 + <td>type_id</td>
  1757 + <td>inter</td>
  1758 + <td></td>
  1759 + <td>地区ID</td>
  1760 + </tr>
  1761 + </tbody>
  1762 + </table>
  1763 + </div>
  1764 + </div>
  1765 + <div class="panel panel-default">
  1766 + <div class="panel-heading"><strong>正文</strong></div>
  1767 + <div class="panel-body">
  1768 +</div>
  1769 + </div>
  1770 + </div><!-- #info -->
  1771 +
  1772 + <div class="tab-pane" id="sandbox12">
  1773 + <div class="row">
  1774 + <div class="col-md-12">
  1775 + <div class="panel panel-default">
  1776 + <div class="panel-heading"><strong>Headers</strong></div>
  1777 + <div class="panel-body">
  1778 + <div class="headers">
  1779 + <div class="form-group">
  1780 + <label class="control-label" for="token">token</label>
  1781 + <input type="string" class="form-control input-sm" id="token" required placeholder="请求的Token - Ex: " name="token">
  1782 + </div>
  1783 + </div>
  1784 + </div>
  1785 + </div>
  1786 + <div class="panel panel-default">
  1787 + <div class="panel-heading"><strong>参数</strong></div>
  1788 + <div class="panel-body">
  1789 + <form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/pic" method="POST" name="form12" id="form12">
  1790 + <div class="form-group">
  1791 + <label class="control-label" for="type_id">type_id</label>
  1792 + <input type="inter" class="form-control input-sm" id="type_id" placeholder="地区ID" name="type_id">
  1793 + </div>
  1794 + <div class="form-group">
  1795 + <button type="submit" class="btn btn-success send" rel="12">提交</button>
  1796 + <button type="reset" class="btn btn-info" rel="12">重置</button>
  1797 + </div>
  1798 + </form>
  1799 + </div>
  1800 + </div>
  1801 + <div class="panel panel-default">
  1802 + <div class="panel-heading"><strong>响应输出</strong></div>
  1803 + <div class="panel-body">
  1804 + <div class="row">
  1805 + <div class="col-md-12" style="overflow-x:auto">
  1806 + <pre id="response_headers12"></pre>
  1807 + <pre id="response12"></pre>
  1808 + </div>
  1809 + </div>
  1810 + </div>
  1811 + </div>
  1812 + <div class="panel panel-default">
  1813 + <div class="panel-heading"><strong>返回参数</strong></div>
  1814 + <div class="panel-body">
  1815 +
  1816 + </div>
  1817 + </div>
  1818 + </div>
  1819 + </div>
  1820 + </div><!-- #sandbox -->
  1821 +
  1822 + <div class="tab-pane" id="sample12">
  1823 + <div class="row">
  1824 + <div class="col-md-12">
  1825 + <pre id="sample_response12">{
  1826 + "code": 1,
  1827 + "msg": "成功",
  1828 + "time": "1571492001",
  1829 + "data": {
  1830 + "id": 4,//图片id,
  1831 + "thumbnail": //缩略图,
1685 } 1832 }
1686 }</pre> 1833 }</pre>
1687 </div> 1834 </div>
@@ -1698,7 +1845,7 @@ @@ -1698,7 +1845,7 @@
1698 1845
1699 <div class="row mt0 footer"> 1846 <div class="row mt0 footer">
1700 <div class="col-md-6" align="left"> 1847 <div class="col-md-6" align="left">
1701 - Generated on 2019-11-19 16:14:05 </div> 1848 + Generated on 2019-11-19 16:23:27 </div>
1702 <div class="col-md-6" align="right"> 1849 <div class="col-md-6" align="right">
1703 <a href="https://www.fastadmin.net" target="_blank">FastAdmin</a> 1850 <a href="https://www.fastadmin.net" target="_blank">FastAdmin</a>
1704 </div> 1851 </div>