|
|
|
@ -741,13 +741,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()); |
|
|
|
|
} |
|
|
|
@ -774,13 +778,17 @@ class CarController extends BaseController |
|
|
|
|
// exit; |
|
|
|
|
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()); |
|
|
|
|
} |
|
|
|
|