|  | @@ -138,32 +138,14 @@ class Auth extends BaseController {
 | 
	
		
			
				|  |  |          return json($result);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    public function policy_condition($condition_json = null){
 | 
	
		
			
				|  |  | -        if($condition_json){
 | 
	
		
			
				|  |  | -            $condition = json_decode($condition_json);
 | 
	
		
			
				|  |  | -        }else{
 | 
	
		
			
				|  |  | -            $condition = [];
 | 
	
		
			
				|  |  | -            $obj = new \StdClass();
 | 
	
		
			
				|  |  | -            $obj->label = "工业和信息化局";
 | 
	
		
			
				|  |  | -            $obj->value = "gxj";
 | 
	
		
			
				|  |  | -            $obj->children = [];
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      public function policy_update(){
 | 
	
		
			
				|  |  |          $res = $this->request->post();
 | 
	
		
			
				|  |  |          foreach ($res as $k => $v){
 | 
	
		
			
				|  |  | -            dd($v);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              $update = [];
 | 
	
		
			
				|  |  | -            if(count($v['checks']) > 0){
 | 
	
		
			
				|  |  | -                $update['checks'] = implode(',',$v['checks']);
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              if(count($v['condition']) > 0){
 | 
	
		
			
				|  |  | -                $update['condition'] = implode(',',$v['condition']);
 | 
	
		
			
				|  |  | +                $update['condition'] = json_encode($v['condition']);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              if(count($update) > 0){
 | 
	
		
			
				|  |  |                  Db::table('new_policy')->where('id',$v['id'])->save($update);
 |