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