fix bug confidence
This commit is contained in:
parent
9ceb3567c9
commit
b3bca79f55
|
@ -97,7 +97,7 @@ class CaptureLogsGrid {
|
|||
public static function rows() {
|
||||
return function($model, $index, $widget, $grid) {
|
||||
$confidence = json_decode($model->confidence, true);
|
||||
$person = \app\models\ListManagement::findOne($confidence['id1']);
|
||||
$person = isset($confidence['id1']) ? \app\models\ListManagement::findOne($confidence['id1']) : false;
|
||||
$images = false;
|
||||
if ($person) {
|
||||
$images = json_decode($person->image, true);
|
||||
|
@ -110,7 +110,7 @@ class CaptureLogsGrid {
|
|||
"img" => "/data/uploads/face/" . $model->image,
|
||||
"confidence" => json_encode([
|
||||
"name" => $person ? $person->name : "",
|
||||
"score" => $confidence['percent1'],
|
||||
"score" => isset($confidence['percent1']) ? $confidence['percent1'] : "",
|
||||
"img" => isset($images[0]) ? "/data/uploads/face/" . $images[0]['url'] : ""
|
||||
])
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue
Block a user