Skip to content

Commit 731c5dc

Browse files
committed
fix(control): 识别结果问题
1 parent 00e2c5e commit 731c5dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

laravel/app/Http/Controllers/Bus/AutoController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function baiduOCR($img, $imgUrl)
116116
$result = json_decode($res['content'], true);
117117

118118
$words = '';
119-
if ($result) {
119+
if ($result && $result['words_result']) {
120120
foreach ($result['words_result'] as $value) {
121121
$words .= $value['words'].PHP_EOL;
122122
}

0 commit comments

Comments
 (0)