mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
优化链接拼接
This commit is contained in:
@@ -72,11 +72,15 @@ function get_system_config($name = '', $default = '')
|
||||
return $default;
|
||||
}
|
||||
|
||||
function get_source_link($url)
|
||||
function get_source_link($url,$default = '')
|
||||
{
|
||||
|
||||
if (empty($url)) {
|
||||
$url = '/static/images/avatar.png';
|
||||
|
||||
if(!empty($default)){
|
||||
$url = $default;
|
||||
}else{
|
||||
$url = '/static/images/avatar.png';
|
||||
}
|
||||
}
|
||||
if (strpos($url, '/') === 0) {
|
||||
return request()->domain() . $url;
|
||||
|
||||
@@ -19,7 +19,7 @@ class Nav extends Model
|
||||
//
|
||||
public function getImgAttr($value)
|
||||
{
|
||||
return get_source_link($value);
|
||||
return get_source_link($value,'/static/images/noimg.png');
|
||||
}
|
||||
|
||||
public function getStatusNameAttr()
|
||||
|
||||
Reference in New Issue
Block a user