Explorar el Código

错误返回也增加text节点

刘忠健 hace 6 meses
padre
commit
4f3cd4ab78
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  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]);*/