From a86136ba159a1c630f8c3e6145a35edee9a2fbed Mon Sep 17 00:00:00 2001 From: Edward Yang Date: Thu, 18 Aug 2022 17:08:31 +0800 Subject: [PATCH 1/2] use PRC as default timezone https://guangdagit.com/beike/beikeshop/issues/99 --- .env.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 3f90b95a..ed75c517 100644 --- a/.env.example +++ b/.env.example @@ -3,7 +3,7 @@ APP_ENV=local APP_KEY= APP_DEBUG=true APP_URL=http://localhost -APP_TIMEZONE=RPC +APP_TIMEZONE=PRC LOG_CHANNEL=stack LOG_DEPRECATIONS_CHANNEL=null From d6d82dc2ef079e3e5f40ac9a1954d7c5c70316f3 Mon Sep 17 00:00:00 2001 From: TL Date: Thu, 18 Aug 2022 17:08:16 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=90=8E=E5=A4=A9=E4=BC=9A=E5=91=98?= =?UTF-8?q?=E7=BB=84=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- beike/Admin/Http/Requests/CustomerGroupRequest.php | 2 +- beike/Admin/Services/CustomerGroupService.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/beike/Admin/Http/Requests/CustomerGroupRequest.php b/beike/Admin/Http/Requests/CustomerGroupRequest.php index 85daa628..b3204732 100644 --- a/beike/Admin/Http/Requests/CustomerGroupRequest.php +++ b/beike/Admin/Http/Requests/CustomerGroupRequest.php @@ -33,7 +33,7 @@ class CustomerGroupRequest extends FormRequest public function rules() { return [ - 'descriptions.*.name' => 'required|max:64', + 'name.*' => 'required|max:64', 'level' => 'required|max:16', ]; } diff --git a/beike/Admin/Services/CustomerGroupService.php b/beike/Admin/Services/CustomerGroupService.php index eaa2d294..e706f86e 100644 --- a/beike/Admin/Services/CustomerGroupService.php +++ b/beike/Admin/Services/CustomerGroupService.php @@ -60,10 +60,10 @@ class CustomerGroupService { $descriptions = []; foreach ($data['name'] as $locale => $value) { - $descriptions[$locale]['name'] = $value; - } - foreach ($data['description'] as $locale => $value) { - $descriptions[$locale]['description'] = $value; + $descriptions[$locale] = [ + 'name' => $value, + 'description' => $data['description'][$locale] ?? '' + ]; } $params = [