public function thumb() { $file = new File(); $res = $file->upload(__DIR__ . "/../../images/"); // 原图上传 return 1 == $res['status'] ? $file->thumbPhoto($res) : $res; // 原图压缩 }