|
|
@ -45,16 +45,20 @@ class OrderController extends AdminController |
|
|
->display('查看') |
|
|
->display('查看') |
|
|
->modal('订单信息', function ($modal) { |
|
|
->modal('订单信息', function ($modal) { |
|
|
$info = $this->info ?? []; |
|
|
$info = $this->info ?? []; |
|
|
/*$info = array_map(function($v) { |
|
|
|
|
|
|
|
|
$info = array_map(function($v) { |
|
|
if (isset($v['value'], $v['type'])) { |
|
|
if (isset($v['value'], $v['type'])) { |
|
|
if ($v['type'] == 'image') { |
|
|
if ($v['type'] == 'image') { |
|
|
return '<img data-action="preview-img" src="'.$v['value'].'" style="max-width:120px;max-height:200px;cursor:pointer" class="img img-thumbnail">'; |
|
|
|
|
|
|
|
|
if (is_array($v['value'])) { |
|
|
|
|
|
return array_reduce($v['value'], fn($v2, $v3) => $v2 . '<img data-action="preview-img" src="' . $v3 . '" style="max-width:120px;max-height:200px;cursor:pointer" class="img img-thumbnail"> '); |
|
|
|
|
|
} else { |
|
|
|
|
|
return '<img data-action="preview-img" src="' . $v['value'] . '" style="max-width:120px;max-height:200px;cursor:pointer" class="img img-thumbnail">'; |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
return $v['value']; |
|
|
|
|
|
|
|
|
return is_string($v['value']) ? $v['value'] : join(',', $v['value']); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
return $v; |
|
|
|
|
|
}, $info);*/ |
|
|
|
|
|
|
|
|
return is_string($v) ? $v : json_encode($v); |
|
|
|
|
|
}, $info); |
|
|
return Table::make([], $info); |
|
|
return Table::make([], $info); |
|
|
})->xl(); |
|
|
})->xl(); |
|
|
$grid->column('product', '产品信息') |
|
|
$grid->column('product', '产品信息') |
|
|
|