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

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                構建器在插件中的應用和在模塊中的應用是一樣的。 要注意的是: 1.插件的后臺控制器要繼承```use app\home\admin\Plugin``` 2.定義插件的名稱。(名稱、插件目錄名、info.json中的name要保持一致) 如: ``` <?php // 構建器Builder列表示例-后臺 // +---------------------------------------------------------------------- // | Copyright (c) 2016-2018 https://www.eacoophp.com, All rights reserved. // +---------------------------------------------------------------------- // | [EacooPHP] 并不是自由軟件,可免費使用,未經許可不能去掉EacooPHP相關版權。 // | 禁止在EacooPHP整體或任何部分基礎上發展任何派生、修改或第三方版本用于重新分發 // +---------------------------------------------------------------------- // | Author: 心云間、凝聽 <981248356@qq.com> // +---------------------------------------------------------------------- namespace plugins\DemoExample\admin; use app\home\admin\Plugin;//一定要繼承該類 use plugins\DemoExample\model\DemoExample as DemoExampleModel; class BuilderList extends Plugin{ protected $plugin_name = 'DemoExample';//定義插件名稱 function _initialize() { parent::_initialize(); $this->demoExampleModel = new DemoExampleModel(); } /** * 用戶列表(構建器列表,該方法是以獲取用戶列表來舉例) * @return [type] [description] * @date 2018-02-23 * @author 心云間、凝聽 <981248356@qq.com> */ public function index(){ return Iframe() ->setMetaTitle('DemoExample列表示例') // 設置頁面標題 ->search([ ['name'=>'status','type'=>'select','title'=>'狀態','options'=>[1=>'正常',2=>'待審核']], ['name'=>'sex','type'=>'select','title'=>'性別','options'=>[0=>'保密',1=>'男',2=>'女']], ['name'=>'create_time_range','type'=>'daterange','extra_attr'=>'placeholder="創建時間范圍"'], ['name'=>'keyword','type'=>'text','extra_attr'=>'placeholder="請輸入查詢關鍵字"'], ]) ->content($this->grid()); } /** * 構建器列表 * @return [type] [description] * @date 2018-09-08 * @author 心云間、凝聽 <981248356@qq.com> */ public function grid() { $search_setting = $this->buildModelSearchSetting(); // 獲取構建器列表數據 $map = [ 'status'=>['egt',0],// 禁用和正常狀態 ]; list($data_list,$total) = $this->demoExampleModel->search($search_setting)->getListByPage($map,true,'create_time desc'); $tab_list = [ 'builderlist'=>['title'=>'列表示例','href'=>plugin_url('DemoExample/BuilderList/index')], 'builderform'=>['title'=>'表單示例','href'=>plugin_url('DemoExample/BuilderForm/index')], ]; return builder('List') ->setTabNav($tab_list, 'builderlist') // 設置頁面Tab導航 ->addTopButton('addnew') // 添加新增按鈕 ->addTopButton('resume') // 添加啟用按鈕 ->addTopButton('forbid') // 添加禁用按鈕 ->addTopButton('delete',['model'=>'DemoExample']) // 添加刪除按鈕 //->setSearch('custom','請輸入關鍵字') ->keyListItem('id', 'ID') ->keyListItem('picture', '圖像', 'picture') ->keyListItem('title', '標題') ->keyListItem('email', '郵箱') ->keyListItem('sex', '性別','array',[0=>'保密',1=>'男',2=>'女']) ->keyListItem('file', '文件') ->keyListItem('create_time', '創建時間') ->keyListItem('status', '狀態', 'status') ->keyListItem('right_button', '操作', 'btn') ->setListPrimaryKey('id')//設置數據主鍵,默認是id ->setListData($data_list) // 數據列表 ->setListPage($total) // 數據列表分頁 ->addRightButton('edit',['href'=>plugin_url('DemoExample/BuilderForm/index',['id'=>'__data_id__'])]) ->addRightButton('forbid') //->addRightButton('delete') // 添加編輯按鈕 ->fetch(); } /** * 編輯 * @return [type] [description] * @date 2018-03-08 * @author 心云間、凝聽 <981248356@qq.com> */ public function edit() { $form = new BuilderForm(); return $form->index(); } /** * 構建模型搜索查詢條件 * @return [type] [description] * @date 2018-09-30 * @author 心云間、凝聽 <981248356@qq.com> */ private function buildModelSearchSetting() { //時間范圍 $timegap = input('create_time_range'); $extend_conditions = []; if($timegap){ $gap = explode('—', $timegap); $reg_begin = $gap[0]; $reg_end = $gap[1]; $extend_conditions =[ 'create_time'=>['between',[$reg_begin.' 00:00:00',$reg_end.' 23:59:59']] ]; } //自定義查詢條件 $search_setting = [ 'keyword_condition'=>'title', //忽略數據庫不存在的字段 'ignore_keys' => ['create_time_range'], //擴展的查詢條件 'extend_conditions'=>$extend_conditions ]; return $search_setting; } } ```
                  <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>

                              哎呀哎呀视频在线观看