海南旅游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.

20 lines
502 B

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