request->post("type", [], 'trim'); \app\common\model\fill\Handle::check('app_config',$this->getConfigName($type)); $data = \app\common\model\app\Config::getConfig($this->getConfigName($type)); if($type == 'pc'){ if(!isset($data['status'])){ $data['status'] = "1"; } } return $this->success("获取成功",$data); } /** * 获取配置 * @return mixed */ public function setConfig(){ $row = $this->request->post("row/a", [], 'trim'); $type = $this->request->post("type", [], 'trim'); \app\common\model\fill\Handle::check('app_config',$this->getConfigName($type)); $data = \app\common\model\app\Config::setConfig($this->getConfigName($type),$row); return $this->success("保存成功",$data); } public function getConfigName($type){ return 'pc_'.$type; } }