|  | @@ -104,12 +104,12 @@ Class Home extends Core
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		if ($uid) {
 | 
	
		
			
				|  |  | +			$user = Dever::db('active/user')->find($uid);
 | 
	
		
			
				|  |  |  			$where['where_id'] = $uid;
 | 
	
		
			
				|  |  |  			$where['name'] = $data['name'];
 | 
	
		
			
				|  |  | -			if ($data['idcard']) {
 | 
	
		
			
				|  |  | +			if (!$user['idcard'] && $data['idcard']) {
 | 
	
		
			
				|  |  |  				$where['idcard'] = $data['idcard'];
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  | -			
 | 
	
		
			
				|  |  |  			Dever::db('active/user')->update($where); 
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		$result = array();
 | 
	
	
		
			
				|  | @@ -125,8 +125,31 @@ Class Home extends Core
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		$remark = Dever::input('remark');
 | 
	
		
			
				|  |  |  		$path = Dever::input('path');
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -		$result += Dever::load('active/lib/active')->action($uid, $id, $num, $path, $remark);
 | 
	
		
			
				|  |  | +		if (!$data['idcard']) {
 | 
	
		
			
				|  |  | +			$data['idcard'] = '';
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		if ($path) {
 | 
	
		
			
				|  |  | +			$p = Dever::json_decode($path);
 | 
	
		
			
				|  |  | +			$pa = array();
 | 
	
		
			
				|  |  | +			if (isset($p) && $p){
 | 
	
		
			
				|  |  | +				foreach ($p as $k => $v){
 | 
	
		
			
				|  |  | +					$pa[$v['id']] = $v; 
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		$field = Dever::db('active/info_field')->getList(array('active_id'=>$id,'state'=>1));
 | 
	
		
			
				|  |  | +		if ($field) {
 | 
	
		
			
				|  |  | +			foreach ($field as $k => $v) {
 | 
	
		
			
				|  |  | +				if ($v['is_must'] == 1) {
 | 
	
		
			
				|  |  | +					if (!isset($pa[$v['id']])) {
 | 
	
		
			
				|  |  | +						Dever::alert($v['name'].'不能为空');
 | 
	
		
			
				|  |  | +					} elseif (isset($pa[$v['id']]) && !$pa[$v['id']]) {
 | 
	
		
			
				|  |  | +						Dever::alert($v['name'].'不能为空');
 | 
	
		
			
				|  |  | +					}
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		$result += Dever::load('active/lib/active')->action($uid, $id, $num, $path, $remark,$data['idcard']);
 | 
	
		
			
				|  |  |  		return $result;
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  
 |