소스 검색

错误返回也增加text节点

刘忠健 7 달 전
부모
커밋
4f3cd4ab78
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      api/app/api/controller/Qrcode.php

+ 3 - 1
api/app/api/controller/Qrcode.php

@@ -81,7 +81,9 @@ class Qrcode extends Base
              $data->getFormat();
              $data->getType();*/
         }
-        $this->error("未识别到二维码");
+        $this->error("未识别到二维码",999,[
+            "text" => "",
+        ]);
         /* $qrcodeReader = new QrReader($url);
          $qrcodeText = $qrcodeReader->text();
          $this->success(["text" => $qrcodeText]);*/