Explorar o código

错误返回也增加text节点

刘忠健 hai 6 meses
pai
achega
4f3cd4ab78
Modificáronse 1 ficheiros con 3 adicións e 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]);*/