mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-09 11:32:48 +08:00
替换默认图片
This commit is contained in:
@@ -76,7 +76,7 @@ function get_source_link($url)
|
|||||||
{
|
{
|
||||||
|
|
||||||
if (empty($url)) {
|
if (empty($url)) {
|
||||||
$url = '/static/images/avatar.jpeg';
|
$url = '/static/images/avatar.png';
|
||||||
}
|
}
|
||||||
if (strpos($url, '/') === 0) {
|
if (strpos($url, '/') === 0) {
|
||||||
return $url;
|
return $url;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class Admin extends Model
|
|||||||
{
|
{
|
||||||
|
|
||||||
if(empty($value)){
|
if(empty($value)){
|
||||||
return '/static/images/avatar.jpeg';
|
return '/static/images/avatar.png';
|
||||||
}
|
}
|
||||||
|
|
||||||
return \get_source_link($value);
|
return \get_source_link($value);
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ class Post extends Model
|
|||||||
public function getPosterAttr($value)
|
public function getPosterAttr($value)
|
||||||
{
|
{
|
||||||
if(empty($value)){
|
if(empty($value)){
|
||||||
$value = '/static/images/avatar.jpeg';
|
$value = '/static/images/avatar.png';
|
||||||
}
|
}
|
||||||
|
|
||||||
return get_source_link($value);
|
return get_source_link($value);
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class User extends Model
|
|||||||
public function getAvatarAttr($value)
|
public function getAvatarAttr($value)
|
||||||
{
|
{
|
||||||
if(empty($value)){
|
if(empty($value)){
|
||||||
return '/static/images/avatar.jpeg';
|
return '/static/images/avatar.png';
|
||||||
}
|
}
|
||||||
|
|
||||||
return \get_source_link($value);
|
return \get_source_link($value);
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class InitAdmin extends Seeder
|
|||||||
$account['account'] = 'admin';
|
$account['account'] = 'admin';
|
||||||
$account['salt'] = Str::random(6);
|
$account['salt'] = Str::random(6);
|
||||||
$account['password'] = md5('123456'.$account['salt']);
|
$account['password'] = md5('123456'.$account['salt']);
|
||||||
$account['avatar'] = '/static/images/avatar.jpeg';
|
$account['avatar'] = '/static/images/avatar.png';
|
||||||
|
|
||||||
$model_admin = Admin::where('account',$account['account'])->find();
|
$model_admin = Admin::where('account',$account['account'])->find();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user