<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 功能強大 支持多語言、二開方便! 廣告
                ~~~ <?php namespace app\index\model; use think\Model; class Menu extends Model { protected $connection = 'mysql://root:JB6MUn64xICo@rm-bp1h205f36fv8pecto.mysql.rds.aliyuncs.com:3306/dragon#utf8'; /** * 初始化 * * @return void */ protected function initialize() { parent::initialize(); $this->table = 'menu'; } /** * 是否是葉子節點 * @DateTime 2018-02-11 * @param [type] $value [description] * @return [type] */ public function getLeafAttr($value) { $isLeaf = [1 => true, 0 => false]; return $isLeaf[$value]; } /** * 是否展開菜單 * @DateTime 2018-02-11 * @param [type] $value [description] * @return [type] */ public function getExpandedAttr($value) { $isExpanded = [1 => true, 0 => false]; return $isExpanded[$value]; } /** * 列表(主鍵列表,條件數組,閉包查詢) * * @param array $param 查詢條件 * @return void */ public function doList($param = null) { try { //查詢數據(條件查詢及排序) // if (empty($param)) { $result = self::all(function ($query) { $query->order('pid asc, m_order asc'); }); } else { $result = self::all(function ($query) use ($param) { $query->where($param)->order('pid asc, m_order asc'); }); } $rows = []; foreach ($result as $data) { $item = $data->getData(); $item['leaf'] = $data->getAttr('leaf'); //訪問獲取器 $item['expanded'] = $data->getAttr('expanded'); array_push($rows, $item); } //返回結果 $res = array(); $total = count($rows); if ($total > 0) { $res['rows'] = $rows; $res['total'] = $total; } else { $res['total'] = 0; $res['rows'] = array(); } //請求類型返回 return ($res); } catch (\Exception $e) { throw new \think\Exception('異常消息:' . $e->getMessage()); } } } ~~~
                  <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>

                              哎呀哎呀视频在线观看