소스 검색

feat: update import error

(cherry picked from commit 7cf2e99ecfa91e62b44db2d873411e5f583b590f)
igb 1 주 전
부모
커밋
58715f48b0
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/Distributor/Forms/ImportProduct.php

+ 1 - 1
app/Distributor/Forms/ImportProduct.php

@@ -45,7 +45,7 @@ class ImportProduct extends Form
                     'order' => 0, // 假设 $baseProduct 也有 order 字段
                     'enabled' => 1, // 假设 $baseProduct 也有 enabled 字段
                     'content' => $content, // 假设 $baseProduct 也有 content 字段
-                    'parameters' => $item['parameters'], // 假设 $baseProduct 也有 parameters 字段
+                    'parameters' => is_string($item['parameters']) ? json_decode($item['parameters'], true) : $item['parameters'],
                     'seo_title'=> $title,
                     'seo_keywords' => '',
                     'seo_description' => '',