<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>

                在**應用根目錄/common/model**下面,新建**Common.php**,封裝layui需要返回的數據格式 ``` <?php // +---------------------------------------------------------------------- // | najing [ 通用后臺管理系統 ] // +---------------------------------------------------------------------- // | Copyright (c) 2020 http://www.najingquan.com All rights reserved. // +---------------------------------------------------------------------- // | Author: 救火隊隊長 // +---------------------------------------------------------------------- namespace app\common\model; use think\Model; class Common extends Model { /** * 格式化返回layui需要的格式化數據 * @author 救火隊隊長 */ public function tableData($post) { if (isset($post['limit'])) { $limit = $post['limit']; } else { $limit = config('paginate.list_rows'); } $tableWhere = $this->tableWhere($post); $list = $this->field($tableWhere['field'])->where($tableWhere['where'])->order($tableWhere['order'])->paginate($limit); $data = $this->tableFormat($list->getCollection()); //返回的數據格式化,并渲染成table所需要的最終的顯示數據類型 $re['code'] = 0; $re['msg'] = ''; $re['count'] = $list->total(); $re['data'] = $data; return $re; } /** * 根據輸入的查詢條件,返回所需要的where * @author 救火隊隊長 */ protected function tableWhere($post) { $result['where'] = []; $result['field'] = "*"; $result['order'] = []; return $result; } /** * 根據查詢結果,格式化數據 * @author 救火隊隊長 */ protected function tableFormat($list) { return $list; } } ```
                  <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>

                              哎呀哎呀视频在线观看