企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
完整示例 ~~~ public function index() { cookie('__forward__', $_SERVER['REQUEST_URI']); // 查询 $map = $this->getMap(); // 排序 $order = $this->getOrder(); // 数据列表 $data_list = AddressModel::alias('ad')->join('user u','ad.uid=u.id','left')->field('ad.id,ad.user_name,ad.user_phone,ad.user_address,ad.is_default,u.nickname')->where($map)->order($order)->paginate(); $fields = [ ['id', 'ID'], ['user_name', '姓名'], ['user_phone', '收货电话'], ['user_address', '收货人地址'], ['is_default', '是否默认','status','',['否','是']], ['nickname', '会员昵称'], ['right_button', '操作', 'btn', '', '', 'text-center'] ]; return Format::ins()//实例化 ->addColumns($fields)//设置字段 ->setTopButtons($this->top_button) ->setRightButtons($this->right_button) ->setData($data_list)//设置数据 ->fetch();//显示 } ~~~