|
|
@ -497,16 +497,13 @@ class CarController extends BaseController |
|
|
|
return $result; |
|
|
|
return $result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function actionBihuSearch() |
|
|
|
public function actionInfo() |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
Yii::$app->response->format = Response::FORMAT_JSON; |
|
|
|
$request = Yii::$app->request; |
|
|
|
$request = Yii::$app->request; |
|
|
|
$id = $request->get('id',0); |
|
|
|
$id = $request->get('id',0); |
|
|
|
|
|
|
|
|
|
|
|
$car_info = CarT::findOne(['id'=>$id]); |
|
|
|
$car_info = CarT::findOne(['id'=>$id]); |
|
|
|
if($car_info) { |
|
|
|
if($car_info) { |
|
|
|
/* |
|
|
|
|
|
|
|
$star_time = time(); |
|
|
|
|
|
|
|
$url = Yii::$app->params['userPanel']['search_car_url']; |
|
|
|
$url = Yii::$app->params['userPanel']['search_car_url']; |
|
|
|
$token = Yii::$app->params['userPanel']['token']; |
|
|
|
$token = Yii::$app->params['userPanel']['token']; |
|
|
|
$params = [ |
|
|
|
$params = [ |
|
|
@ -525,12 +522,20 @@ class CarController extends BaseController |
|
|
|
]); |
|
|
|
]); |
|
|
|
if($res->getStatusCode() == 200) { |
|
|
|
if($res->getStatusCode() == 200) { |
|
|
|
$obj = json_decode($res->getBody()); |
|
|
|
$obj = json_decode($res->getBody()); |
|
|
|
|
|
|
|
return MyLib::ok3($obj); |
|
|
|
} |
|
|
|
} |
|
|
|
*/ |
|
|
|
return MyLib::error3($res->getBody()); |
|
|
|
$time = time() - $star_time; |
|
|
|
|
|
|
|
// var_dump($obj); |
|
|
|
|
|
|
|
// echo $time; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return MyLib::error3('车辆信息不存在'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function actionInfo() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$request = Yii::$app->request; |
|
|
|
|
|
|
|
$id = $request->get('id',0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$car_info = CarT::findOne(['id'=>$id]); |
|
|
|
|
|
|
|
|
|
|
|
$order_info = $car_info->getOrders()->orderBy('id DESC')->one(); |
|
|
|
$order_info = $car_info->getOrders()->orderBy('id DESC')->one(); |
|
|
|
if(!$order_info) { |
|
|
|
if(!$order_info) { |
|
|
|
$user_id = 0; |
|
|
|
$user_id = 0; |
|
|
|