| 
					
					
						
							
						
					
					
				 | 
				@ -21,13 +21,13 @@ class Supplier extends BaseModel | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				    public function setPasswordAttribute($value) | 
				 | 
				 | 
				    public function setPasswordAttribute($value) | 
			
		
		
	
		
			
				 | 
				 | 
					{ | 
				 | 
				 | 
					{ | 
			
		
		
	
		
			
				 | 
				 | 
						//新增时
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
						if ($value && empty($this->attributes['password'])) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
							$this->attributes['password'] =  $this->passMd5($value); | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
						} | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
						//编辑时
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
						else if ($value && !empty($this->attributes['password']) && $this->attributes['password'] != $value) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
							$this->attributes['password'] =  $this->passMd5($value); | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
						if ($value) { | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
							if ( | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
								empty($this->attributes['password']) || //新增时
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
								$this->attributes['password'] != $value && !empty($this->attributes['password']) //编辑时
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
							) { | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
								$this->attributes['password'] = $this->passMd5($value); | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
							} | 
			
		
		
	
		
			
				 | 
				 | 
						} | 
				 | 
				 | 
						} | 
			
		
		
	
		
			
				 | 
				 | 
					} | 
				 | 
				 | 
					} | 
			
		
		
	
		
			
				 | 
				 | 
				} | 
				 | 
				 | 
				} |