曾超新 5 years ago
parent 111e8be031
commit 132e157e9e
  1. 14
      frontend/controllers/CarController.php

@ -553,13 +553,17 @@ class CarController extends BaseController
]);
if($res->getStatusCode() == 200) {
$obj = json_decode($res->getBody());
if($obj->data && $obj->data->UserInfo && $obj->data->UserInfo->CarUsedType != '') {
$car_user_info = CarUseT::find()->where(['name'=>$obj->data->UserInfo->CarUsedType])->one();
if($car_user_info) {
$obj->data->UserInfo->CarUsedType = $car_user_info->id;
if($obj->code == 200) {
if($obj->data && $obj->data->UserInfo && $obj->data->UserInfo->CarUsedType != '') {
$car_user_info = CarUseT::find()->where(['name'=>$obj->data->UserInfo->CarUsedType])->one();
if($car_user_info) {
$obj->data->UserInfo->CarUsedType = $car_user_info->id;
}
}
return MyLib::ok3($obj->data);
} else {
return MyLib::error3($obj->msg);
}
return MyLib::ok3($obj->data);
}
return MyLib::error3($res->getBody());
}

Loading…
Cancel
Save