修复 第三方登录 图片加载
This commit is contained in:
parent
77b3167d36
commit
d8abb038b0
|
|
@ -29,10 +29,6 @@ class ImageService
|
|||
{
|
||||
$this->image = $image ?: self::PLACEHOLDER_IMAGE;
|
||||
$this->imagePath = public_path($this->image);
|
||||
if (!file_exists($this->imagePath)) {
|
||||
$this->image = self::PLACEHOLDER_IMAGE;
|
||||
$this->imagePath = public_path($this->image);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -68,6 +64,10 @@ class ImageService
|
|||
public function resize(int $width = 100, int $height = 100): string
|
||||
{
|
||||
try {
|
||||
if (!file_exists($this->imagePath)) {
|
||||
$this->image = self::PLACEHOLDER_IMAGE;
|
||||
$this->imagePath = public_path($this->image);
|
||||
}
|
||||
if (!file_exists($this->imagePath)) {
|
||||
return '';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue