You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							22 lines
						
					
					
						
							569 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							22 lines
						
					
					
						
							569 B
						
					
					
				
								<?php
							 | 
						|
								
							 | 
						|
								namespace App\Http\Controllers\Api;
							 | 
						|
								
							 | 
						|
								use App\Http\Controllers\Controller;
							 | 
						|
								use App\Models\AgentInfo;
							 | 
						|
								use Illuminate\Http\Request;
							 | 
						|
								use Illuminate\Support\Facades\Cache;
							 | 
						|
								
							 | 
						|
								class AgentInfoController extends Controller
							 | 
						|
								{
							 | 
						|
								    public function info()
							 | 
						|
									{
							 | 
						|
										$type = request()->route('type');
							 | 
						|
										//关于我们、注册协议、购买协议
							 | 
						|
										if (!in_array($type, ['about', 'reg_protocol', 'buy_protocol'])) {
							 | 
						|
											return $this->error('参数无效');
							 | 
						|
										}
							 | 
						|
										$about = AgentInfo::where('agent_id', $this->agent_id)->value($type);
							 | 
						|
										return $this->success([$type => $about]);
							 | 
						|
									}
							 | 
						|
								}
							 |