<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                # url參數 >[info] 提示: 模型繼承 api\common\model\CommonModel.php 可簡化以下參數處理。 ## 主參數列表 | 參數名 |用途 | 示例 | 注意事項 | | --- | --- | --- | --- | | field | 過濾查詢結果字段 | field=id,user_id,name | 默認為所有字段 | | ids | 指定查詢id | ids=1,2,3 | | | limit | 限制查詢條數 | limit=8或limit=1,5 | 當參數中存在page時,此參數無效 | | page | 分頁查詢 | page=1或page=1,8 | `page=1`表示加載第一頁數據,每頁數量為默認;`page=1,8`表示加載第一頁數據,每頁數量為8 | | order | 結果排序 | order=+id 或 order=-id | + 升序 (不可省略) - 降序 | | relation | 關聯內容 | relation=articles | 需要設置模型 | ## 請求示例 >[success]field:過濾查詢結果字段 ~~~php url: http://thinkcmfapi.com/api/portal/categories?field=id,name ~~~ 返回結果: ~~~json { "code":1, "msg":"請求成功!", "data":[ { "id":8, "name":"視頻" }, { "id":9, "name":"熱點" }, { "id":10, "name":"本地" } ] } ~~~ >[success]ids: 指定查詢id ~~~php url: http://thinkcmfapi.com/api/portal/categories?field=id,name&ids=8,9 ~~~ 返回結果: ~~~json { "code":1, "msg":"請求成功!", "data":[ { "id":8, "name":"視頻" }, { "id":9, "name":"熱點" } ] } ~~~ >[success]limit: 限制結果數量 ~~~php url: http://thinkcmfapi.com/api/portal/categories?field=id,name&limit=1 ~~~ 返回結果: ~~~json { "code":1, "msg":"請求成功!", "data":[ { "id":8, "name":"視頻" } ] } ~~~ >[success]page: 結果分頁 ~~~php url: http://thinkcmfapi.com/api/portal/categories?field=name,id&page=2,10 ~~~ ?page=2,10 返回:第2頁,每頁10條記錄 ~~~json { "code":1, "msg":"請求成功!", "data":[ { "id":8, "name":"視頻" } ] } ~~~ >[success]order: 結果排序 ~~~php url: http://thinkcmfapi.com/api/portal/categories?field=name,id&order=-id ~~~ &order=-id 返回:按字段id降序排列的結果 +升序 ,-降序 ~~~json { "code":1, "msg":"請求成功!", "data":[ { "name":"本地", "id":10 }, { "name":"熱點", "id":9 }, { "name":"視頻", "id":8 } ] } ~~~ >[success]relation: 關聯內容 ~~~php url: http://thinkcmfapi.com/api/portal/articles?field=name,id&order=-id&relation=categories ~~~ &relation=categories 返回:文章關聯分類 ~~~json { "code":1, "msg":"請求成功!", "data":[ { "id":32, "post_type":1, "user_id":1, "comment_status":1, "is_top":0, "recommended":1, "post_hits":14, "post_like":0, "comment_count":0, "create_time":1496752820, "update_time":1500413076, "published_time":"2017-06-06 20:40:00", "post_title":"fasdf", "post_keywords":"test3,古典", "post_excerpt":"", "post_source":"", "post_content":" <p><img src="https://www.thinkcmf.com/upload/portal/20170517/72572943055cc7548cb637a82cfe3882.png" title="hdImg_5c4d7cf6f6cc9b7b7dff3b0b4d7eccc214646007082.jpg" alt="hdImg_5c4d7cf6f6cc9b7b7dff3b0b4d7eccc214646007082.jpg"></p> <p><br></p> <p><a href="http://www.baidu.com" target="_self">test</a><br></p> ", "more":{ "thumbnail":"", "template":"" }, "categories":[ { "id":2, "post_count":0, "name":"瀑布流", "description":"瀑布流", "seo_title":"", "seo_keywords":"", "seo_description":"", "more":{ "thumbnail":"" } }, { "id":6, "post_count":0, "name":"發現", "description":"發現", "seo_title":"發現", "seo_keywords":"地", "seo_description":"地", "more":{ "thumbnail":"" } } ] } ] } ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看