From 5d809c4ec99d47587a9d28494e6cfd477eb31086 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Sat, 14 Oct 2023 16:55:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .example.env | 11 ++++++++++- .../repositories/store/product/ProductRepository.php | 6 +++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.example.env b/.example.env index c4b03d5b..3d226ac5 100644 --- a/.example.env +++ b/.example.env @@ -16,7 +16,16 @@ USERNAME = preview_shop_lihaink_cn PASSWORD = HwQ2RsjDTDJWcS7r CHARSET = utf8mb4 DEBUG = true - +[DATABASE] +TYPE = mysql +HOSTNAME = 47.109.36.146 +DATABASE = ceshi_shop_lihaink_cn +PREFIX = eb_ +HOSTPORT = 3306 +USERNAME = ceshi_shop_lihaink_cn +PASSWORD = 4EfPeWfkx2rtGQef +CHARSET = utf8mb4 +DEBUG = true [LANG] default_lang = zh-cn diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index de9f74cb..8d28842c 100644 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -1271,7 +1271,11 @@ class ProductRepository extends BaseRepository $res['content']['content']=['image'=>$image]; } else{ - $res['content']['content']=$content; + if(is_Array($content)){ + $res['content']['content']=['image'=>$content]; + }else{ + $res['content']['content']=$content; + } } }