request->get(['id','type']); if(empty($params['id']) || empty($params['type'])){ return $this->fail('缺少必要参数'); } $find = Contract::where('id', $params['id'])->find(); if (!empty($find) && $find['url']) { $url = json_decode($find['url'], true); if(isset($url[$params['type']])){ return redirect($url[$params['type']]); } } return '

:)

'; } }