Просмотр исходного кода

修改 绘图时 没有对应模型时的错误

ajun 4 лет назад
Родитель
Сommit
149e07c8f5
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      app/Traits/DrawImage.php

+ 1 - 1
app/Traits/DrawImage.php

@@ -15,8 +15,8 @@ trait DrawImage
 {
     public function draw($orderPackage, $template, $img = null)
     {
-        if (!$template) return null;
         if (!$img) $img = $this->getBgImg($template);
+        if (!$template) return $img;
 
         $items = array_filter($template->value, function ($item) {
             return $item['type'] != 'bg';