request->param(); $data = DatabaseRoute::paginateDb('sys_oss', function ($query) { return $query->order('id', 'desc'); }, $params['page'], $params['limit']); $this->n_success(['page' => $data]); } public function config() { $data = Db::connect(get_slave_connect_name())->name('sys_config')->where(['param_key' => 'CLOUD_STORAGE_CONFIG_KEY'])->column('param_value')[0]; $data = json_decode($data, true); $this->n_success(['config' => $data]); } public function saveConfig() { $post = $this->request->post(); if(is_array($post)) { $post = json_encode($post); }else { $this->error('参数错误'); } Db::name('sys_config')->where(['param_key' => 'CLOUD_STORAGE_CONFIG_KEY'])->update(['param_value' => $post]); $this->success(); } }