浏览代码

Merge remote-tracking branch 'origin/master'

sandm 1 年之前
父节点
当前提交
749db66cbc
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      app/enterprise/controller/LivingAllowance.php

+ 3 - 0
app/enterprise/controller/LivingAllowance.php

@@ -267,6 +267,9 @@ class LivingAllowance extends EnterpriseController {
                 $headimg = $request->file("file");
                 $upload = new \app\common\api\UploadApi();
                 $result = $upload->uploadOne($headimg, "image", "talent/photo");
+                if ($result->code != 200) {
+                    throw new ValidateException($result->msg);
+                }
                 $file = imagecreatefromstring(file_get_contents("storage/" . $result->filepath));
                 $width = imagesx($file);
                 $height = imagesy($file);