| 
					
					
						
							
						
					
					
				 | 
				@ -46,6 +46,21 @@ class ChannelController extends Controller | 
			
		
		
	
		
			
				 | 
				 | 
							->whereRaw("FIND_IN_SET($channel_id, `channel_id`)") | 
				 | 
				 | 
							->whereRaw("FIND_IN_SET($channel_id, `channel_id`)") | 
			
		
		
	
		
			
				 | 
				 | 
							->orderBy('id', 'DESC') | 
				 | 
				 | 
							->orderBy('id', 'DESC') | 
			
		
		
	
		
			
				 | 
				 | 
							->simplePaginate(); | 
				 | 
				 | 
							->simplePaginate(); | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
						$list = $this->paginatePicAddHost($list); | 
			
		
		
	
		
			
				 | 
				 | 
						return $this->success($list); | 
				 | 
				 | 
						return $this->success($list); | 
			
		
		
	
		
			
				 | 
				 | 
					} | 
				 | 
				 | 
					} | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
					//分页列表产品图片加域名
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
					private function paginatePicAddHost($list) | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
					{ | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
						if (!$list->isEmpty()) { | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
							$prefix = Storage::disk('public')->url(''); | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
							foreach ($list->items() as $k=>&$v) { | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
								$v->pictures = array_map(function($item) use ($prefix) { | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
									return strpos($item, $prefix) === false ? $prefix . $item : $item; | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
								}, $v->pictures); | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
							} | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
						} | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
						return $list; | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
					} | 
			
		
		
	
		
			
				 | 
				 | 
				} | 
				 | 
				 | 
				} |