海南旅游SAAS
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
570 B

  1. <?php
  2. namespace App\Http\Controllers\Api;
  3. use App\Http\Controllers\Controller;
  4. use App\Models\AgentInfo;
  5. use Illuminate\Http\Request;
  6. use Illuminate\Support\Facades\Cache;
  7. class AgentInfoController extends Controller
  8. {
  9. public function info()
  10. {
  11. $type = request()->route('type');;
  12. //关于我们、注册协议、购买协议
  13. if (!in_array($type, ['about', 'reg_protocol', 'buy_protocol'])) {
  14. return $this->error('参数无效');
  15. }
  16. $about = AgentInfo::where('agent_id', $this->agent_id)->value($type);
  17. return $this->success([$type => $about]);
  18. }
  19. }