数据库字段
array(18) {
  [0] => string(5) "op_id"
  [1] => string(8) "nav_text"
  [2] => string(7) "nav_ico"
  [3] => string(10) "nav_active"
  [4] => string(10) "nav_parent"
  [5] => string(10) "nav_target"
  [6] => string(8) "nav_type"
  [7] => string(7) "nav_url"
  [8] => string(10) "nav_module"
  [9] => string(12) "nav_controll"
  [10] => string(10) "nav_action"
  [11] => string(10) "nav_params"
  [12] => string(10) "nav_suffix"
  [13] => string(9) "op_status"
  [14] => string(8) "op_order"
  [15] => string(9) "op_module"
  [16] => string(11) "op_controll"
  [17] => string(9) "op_action"
}
添加
    $result = DcNavSave([
        'nav_text'        => '首页',
        'nav_type'        => 'addon',
        'nav_url'         => '',
        'nav_module'      => 'navs',
        'nav_controll'    => 'index',
        'nav_action'      => 'index',
        'nav_params'      => 'a=1',
        'nav_target'      => '_self',
        'nav_ico'         => 'fa fa-fw fa-home',
        'nav_active'      => 'navsindexindex',
        'op_module'       => 'common',
        'op_controll'     => 'navbar',
        'op_action'       => 'header',
        'op_order'        => '99',
    ]);
    dump($result);
删除
    $result = DcNavDelete([
        'cache'    => true,
        'id'       => 88,
    ]);
    dump($result);
    $result = DcNavDelete([
        'cache'    => true,
        'where'    => ['op_id'=>['in','88,89,90']],
    ]);
    dump($result);
修改
    $result = DcNavUpdate(88,[
        'nav_text'        => 'update',
        'nav_type'        => 'addon',
        'nav_url'         => '',
        'nav_module'      => 'navs',
        'nav_controll'    => 'index',
        'nav_action'      => 'index',
        'nav_params'      => 'a=1',
        'nav_target'      => '_self',
        'nav_ico'         => 'fa fa-fw fa-home',
        'nav_active'      => 'navsindexindex',
        'op_module'       => 'common',
        'op_controll'     => 'navbar',
        'op_action'       => 'header',
        'op_order'        => '88',
    ]);
查询多个
    $result = DcNavSelect([
        'cache'    => true,
        'tree'     => true,
        'level'    => false,
        'sort'     => 'op_order',
        'order'    => 'asc',
        'status'   => 'normal',
        'controll' => 'navbar',
    ]);
    dump($result);
查询单个
    $result = DcNavFind([
        'cache'    => true,
        'id'       => 88,
    ]);
    dump($result);

Powered by 呆错开发框架 V 1.6.1

Copyright © 2019-2021 demo.daicuo.org All rights reserved