fixbug
This commit is contained in:
parent
aa811a40dd
commit
5472f6ef77
|
@ -236,6 +236,14 @@ class ApiController extends Controller {
|
|||
public function actionAutoGenFeature() {
|
||||
Yii::$app->response->format = "json";
|
||||
$updating = \app\models\SyncUrl::findOne(['key_config' => 'updating']);
|
||||
if (!$updating) {
|
||||
$model = new \app\models\SyncUrl();
|
||||
$model->create([
|
||||
'key_config' => "updating",
|
||||
'data' => "false"
|
||||
]);
|
||||
$updating = \app\models\SyncUrl::findOne(['key_config' => 'updating']);
|
||||
}
|
||||
if ($updating->data === "true") {
|
||||
$txt = "\n" . date("H:i:s d/m/Y") . " " . "updating";
|
||||
file_put_contents(date('Ymd') . "_logs.txt", $txt, FILE_APPEND);
|
||||
|
|
|
@ -683,7 +683,11 @@ class ListManagementController extends Controller {
|
|||
$lsImgs = json_decode($StaffInfo->image, true);
|
||||
$images = [];
|
||||
foreach ($lsImgs as $key => $value) {
|
||||
$images[] = base64_encode(file_get_contents(Yii::$app->request->hostInfo . "/data/uploads/face/" . $value['url']));
|
||||
try {
|
||||
$images[] = base64_encode(file_get_contents("/var/www/html/BiFace_Server_Lite/web/data/uploads/face/" . $value['url']));
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
}
|
||||
$items = [
|
||||
"name" => $StaffInfo->name,
|
||||
|
@ -695,6 +699,7 @@ class ListManagementController extends Controller {
|
|||
"images" => $images
|
||||
];
|
||||
$start = $this->getCurrentTime();
|
||||
try {
|
||||
$res = json_decode(file_get_contents($ip . "/api/oem/data_sync_pro", false, stream_context_create([
|
||||
'http' => [
|
||||
'header' => "Content-Type: application/json",
|
||||
|
@ -705,6 +710,9 @@ class ListManagementController extends Controller {
|
|||
])
|
||||
]
|
||||
])), true);
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
$finish = $this->getCurrentTime();
|
||||
$processTime = round(($finish - $start), 4);
|
||||
return $processTime; //$res; //["status" => true];
|
||||
|
|
Loading…
Reference in New Issue
Block a user