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