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

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                在控制器*工作內容*中為您簡單介紹了getList屬性 > 3. 根據子類的getList屬性自動獲取模型對象。 以及getList函數(或方法) > 5. 已設計好getList()函數(或方法),可提供layui框架的data-table獲取列表參數。并根據子類的getListWith屬性獲取關聯數據 如下面代碼所示,在其中用到model屬性,而model屬性的生成是獲取到了getList屬性的值,而在getList()方法中,使用了 ``` Model::all(function(){},$this->getListWith) ``` 以上代碼,既說明geListWith是支持字符串與字符串數組的。 ### 參考代碼: ``` /** * 初始化model */ private function setModel() { $this->model = $this->{'model'.$this->getList}; } /** * 獲取列表通用方法 * @return mixed * @throws \think\exception\DbException */ public function getList() { $where = []; $model = 'model'.$this->getList; foreach (input() as $k => $w ){ if (($k=='page' ||$k=='limit')){ continue; } if ($w) $where[$this->model->getTable().'.'.$k] = $w; } $qcms = ($this->model)::all(function (Query $query) use ($where){ $query->where($where)->page(input('page')?:1)->limit(input('limit')?:10); },$this->getListWith ? : null); $data = LayuiListApiService::getData(($this->$model)->count(),$qcms); return $data; } ```
                  <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>

                              哎呀哎呀视频在线观看