title = '商户分离系统配置'; $query = $this->_query($this->table); // $query->equal('mid,cid,pid,account,cash,product_key,isp')->like('order_id,channel_order_id,merchant_order_id,parent_order_id')->dateBetween('create_at,channel_callback_at'); // try{ // $query->order('create_at desc')->page(); // }catch(\Exception $e){ // var_dump($e);exit; // } if (input('output') === 'json') { $result = $query->page(true, false); $this->success('获取数据列表成功', $result); } else { // 新版本中 QueryHelper 对象支持 Layui 表格数据加载 // $query->order('create_at desc')->layTable(function(QueryHelper $query){ // 前置操作,处理 HTML 模型 // }); $res= $query->page(); } // $this->fetch(); } /** * 保存配置 * @auth true * @login true * @menu true * @throws \think\Exception * @throws \think\exception\PDOException */ public function save() { if ($this->request->isPost()) { foreach ($this->request->post() as $k => $v) sysconf($k, $v); $this->success('更新系统配置成功!'); } } }