作者 lyh

gx

@@ -56,6 +56,12 @@ class ImageController @@ -56,6 +56,12 @@ class ImageController
56 exit; 56 exit;
57 } 57 }
58 $imageModel = new ImageModel(); 58 $imageModel = new ImageModel();
  59 + $dotIndex = strpos($hash, '.');
  60 + if ($dotIndex !== false) {
  61 + $hash = substr($dotIndex, 0, $dotIndex); // 删除小数点及其后面的字符
  62 + }
  63 + var_dump($hash);
  64 + die();
59 $info = $imageModel->read(['hash'=>$hash]); 65 $info = $imageModel->read(['hash'=>$hash]);
60 if ($info === false) { 66 if ($info === false) {
61 $this->response('指定图片不存在!', Code::USER_ERROR); 67 $this->response('指定图片不存在!', Code::USER_ERROR);