浏览代码

错误返回也增加text节点

刘忠健 6 月之前
父节点
当前提交
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]);*/