fix:修复BUG/升级1.1.6版本
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
|
||||
namespace app\common\model\system;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
|
||||
namespace app\common\model\system;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
|
||||
namespace app\common\model\system;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
|
||||
namespace app\common\model\system;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
|
||||
namespace app\common\model\system;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
|
||||
namespace app\common\model\system;
|
||||
use Psr\SimpleCache\InvalidArgumentException;
|
||||
@@ -80,20 +80,18 @@ class User extends Model
|
||||
*/
|
||||
public function getAvatarAttr(string $value, array $data): string
|
||||
{
|
||||
|
||||
if ($value && strpos($value,'://')) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
if (empty($value)) {
|
||||
$value = '/static/images/user_default.jpg';
|
||||
}
|
||||
|
||||
$prefix = cdn_Prefix();
|
||||
if (!empty($prefix) && $value) {
|
||||
if (!str_contains($value,'data:image')) {
|
||||
if (!str_contains($value,'data:image')
|
||||
&& !str_contains($value,'http')) {
|
||||
return $prefix.$value;
|
||||
}
|
||||
} else if (empty($value)) {
|
||||
$value = '/static/images/user_default.jpg';
|
||||
}
|
||||
|
||||
return $value;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
|
||||
namespace app\common\model\system;
|
||||
|
||||
|
||||
@@ -40,5 +40,4 @@ class UserNotice extends Model
|
||||
// 钩子消息推送
|
||||
Event::emit('sendUserNotice', $data);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
|
||||
namespace app\common\model\system;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
|
||||
namespace app\common\model\system;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user