fix: 修复派单详情无图片时,接口报错问题
This commit is contained in:
parent
97a8e526da
commit
4dbd2a3bef
|
|
@ -21,6 +21,10 @@ class OrderDispatch extends Model
|
|||
|
||||
public function getArriveImagesAttr($val)
|
||||
{
|
||||
if (empty($val)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$images = explode(',', $val);
|
||||
foreach ($images as $k => $v) {
|
||||
$images[$k] = cdnurl($v, true);
|
||||
|
|
@ -31,6 +35,10 @@ class OrderDispatch extends Model
|
|||
|
||||
public function getImagesAttr($val)
|
||||
{
|
||||
if (empty($val)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$images = explode(',', $val);
|
||||
foreach ($images as $k => $v) {
|
||||
$images[$k] = cdnurl($v, true);
|
||||
|
|
@ -41,6 +49,10 @@ class OrderDispatch extends Model
|
|||
|
||||
public function getImageAttr($val)
|
||||
{
|
||||
if (empty($val)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return cdnurl($val, true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user