'错误提示内容','rows'=> array()) 可返回空字符串,或者数组 rows 是可同时保存到数据库上数组 */ protected function savebefore($table, $arr, $id, $addbo){ } /** * 重写函数:保存后处理,主要保存其他表数据 * $table String 对应表名 * $arr Array 表单参数 * $id Int 对应表上记录Id * $addbo Boolean 是否添加时 */ protected function saveafter($table, $arr, $id, $addbo){ } public function getLMList(){ $arr = m('aqyk_lm')->getall("1=1"); $result = []; foreach ($arr as $key=> $item){ $result[] = array("name"=>$item['lm_name'],"value"=>$item['id']); } return $result; } }