From ef6397f03376b7cf07f22219bf10ba4477b2186d Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq.com> Date: Thu, 18 Jun 2026 11:42:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E8=A1=8C=E4=BA=8B=E5=8E=86?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E9=94=99=E8=AF=AF=E8=BF=94=E5=9B=9E8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Imports/EventCalendarImport.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Imports/EventCalendarImport.php b/app/Imports/EventCalendarImport.php index 402f557..85e20b7 100644 --- a/app/Imports/EventCalendarImport.php +++ b/app/Imports/EventCalendarImport.php @@ -12,7 +12,7 @@ class EventCalendarImport implements ToModel { protected string $user_id; protected OperationLogService $logService; - protected int $index = 1; + protected int $index = 0; protected array $error = []; public function __construct(string $user_id) @@ -28,10 +28,11 @@ class EventCalendarImport implements ToModel */ public function model(array $row) { - if ($this->index == 1) { + if (!$this->index) { $this->index += 1; return; } + $this->index += 1; $pattern_name = $row[1] ?? ''; $start_date = $row[2] ?? ''; $start_time = $row[3] ?? ''; @@ -117,7 +118,6 @@ class EventCalendarImport implements ToModel $model = EventCalendar::query()->create($create); $this->logService->logCreated($model, 'event_calendar.import'); - $this->index += 1; } protected function validateDate($datetime)