diff --git a/beike/Admin/View/Components/Form/RichText.php b/beike/Admin/View/Components/Form/RichText.php index f161187f..c3a16e7f 100644 --- a/beike/Admin/View/Components/Form/RichText.php +++ b/beike/Admin/View/Components/Form/RichText.php @@ -10,16 +10,25 @@ class RichText extends Component public string $title; - public string $value; + public $value; public bool $required; - public function __construct(string $name, string $title, string $value = '', bool $required = false) + public bool $multiple; + + public function __construct(string $name, string $title, $value = '', bool $required = false, bool $multiple = false) { + $value = html_entity_decode($value, ENT_QUOTES); + + if ($multiple) { + $value = json_decode($value, true); + } + $this->name = $name; $this->title = $title; - $this->value = html_entity_decode($value, ENT_QUOTES); + $this->value = $value; $this->required = $required; + $this->multiple = $multiple; } public function render() diff --git a/plugins/Bestseller/Views/shop/design_module_bestseller.blade.php b/plugins/Bestseller/Views/shop/design_module_bestseller.blade.php index 4f14fc73..9bba7f74 100644 --- a/plugins/Bestseller/Views/shop/design_module_bestseller.blade.php +++ b/plugins/Bestseller/Views/shop/design_module_bestseller.blade.php @@ -14,8 +14,8 @@
- - + + @elseif (!$content['products'] and $design)