|
|
|
@ -530,6 +530,35 @@ class CarController extends BaseController |
|
|
|
|
return MyLib::error3('车辆信息不存在'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function actionBihuCarinfo() |
|
|
|
|
{ |
|
|
|
|
Yii::$app->response->format = Response::FORMAT_JSON; |
|
|
|
|
$request = Yii::$app->request; |
|
|
|
|
$id = $request->get('id',0); |
|
|
|
|
$car_info = CarT::findOne(['id'=>$id]); |
|
|
|
|
if($car_info) { |
|
|
|
|
$url = Yii::$app->params['userPanel']['search_car_url']; |
|
|
|
|
$token = Yii::$app->params['userPanel']['token']; |
|
|
|
|
$params = [ |
|
|
|
|
'token' => $token, |
|
|
|
|
'LicenseNo' => $car_info->car_no, |
|
|
|
|
'EngineNo' => $car_info->engine_no, |
|
|
|
|
'CarVin' => $car_info->car_frame_no, |
|
|
|
|
]; |
|
|
|
|
$client = new Client(['timeout'=> 120]); |
|
|
|
|
$res = $client->request('POST', $url, [ |
|
|
|
|
'form_params' => $params, |
|
|
|
|
'http_errors' => false, |
|
|
|
|
]); |
|
|
|
|
if($res->getStatusCode() == 200) { |
|
|
|
|
$obj = json_decode($res->getBody()); |
|
|
|
|
return MyLib::ok3($obj->data); |
|
|
|
|
} |
|
|
|
|
return MyLib::error3($res->getBody()); |
|
|
|
|
} |
|
|
|
|
return MyLib::error3('车辆信息不存在'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function actionInfo() |
|
|
|
|
{ |
|
|
|
|
$request = Yii::$app->request; |
|
|
|
|