|  | @@ -19,6 +19,21 @@ class Order
 | 
	
		
			
				|  |  |      		if (!$member) {
 | 
	
		
			
				|  |  |      			Dever::alert('代理商不存在');
 | 
	
		
			
				|  |  |      		}
 | 
	
		
			
				|  |  | +            if($member['idcard']){
 | 
	
		
			
				|  |  | +                 $birth = strlen($member['idcard'])==15 ? ('19' . substr($member['idcard'], 6, 6)) : substr($member['idcard'], 6, 8);
 | 
	
		
			
				|  |  | +                 $year=substr($birth,0,4);#出生年份
 | 
	
		
			
				|  |  | +                 $month=substr($birth,4,4);#出生日期
 | 
	
		
			
				|  |  | +                 $y=date('Y',time());#当前年份
 | 
	
		
			
				|  |  | +                 $m=date('md',time());#当前日期
 | 
	
		
			
				|  |  | +                 if(($m-$month)<0){
 | 
	
		
			
				|  |  | +                    $zhou=$y-$year-1;
 | 
	
		
			
				|  |  | +                 }else{
 | 
	
		
			
				|  |  | +                    $zhou=$y-$year;
 | 
	
		
			
				|  |  | +                 }
 | 
	
		
			
				|  |  | +                 if($zhou>=65){
 | 
	
		
			
				|  |  | +                    Dever::alert('您不满足申请条件,请联系客服');
 | 
	
		
			
				|  |  | +                 }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |      		$mobile = $member['mobile'];
 | 
	
		
			
				|  |  |      		$parent_mid = $member['parent_mid'];
 | 
	
		
			
				|  |  |              $data['mid'] = $member['id'];
 |