| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -73,11 +73,11 @@ class ProductServiceProvider extends ServiceProvider | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											$agentProduct->content = $product->content; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											$agentProduct->know = $product->know; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											//计算价格
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											$profit = AgentSetting::val($v, 'profit') ?? 0; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											$price = bcmul($product->price, bcdiv($profit + 100, 100, 6), 6); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											// $profit = AgentSetting::val($v, 'profit') ?? 0;
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											// $price = bcmul($product->price, bcdiv($profit + 100, 100, 6), 6);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											$agentProduct->price = $price; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											$agentProduct->original_price = $price; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											$agentProduct->price = $product->price; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											$agentProduct->original_price = $product->original_price; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											//自动添加分类
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											$autoCategory = AgentSetting::val($v, 'auto_category') ?? 0; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -107,8 +107,8 @@ class ProductServiceProvider extends ServiceProvider | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														'agent_product_id' => $agentProduct->id, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														'product_spec_id' => $spec->id, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														'stock' => $spec->stock, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														'original_price' => bcmul($spec->price, bcdiv($profit + 100, 100, 6), 6), | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														'price' => bcmul($spec->price, bcdiv($profit + 100, 100, 6), 6), | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														'original_price' => $spec->original_price, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														'price' => $spec->price, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													]; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |