chenqp 7 달 전
부모
커밋
89c6e6af8f
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      app/Service/ImportService.php

+ 3 - 0
app/Service/ImportService.php

@@ -549,6 +549,9 @@ class ImportService extends Service
 
         $table_head = $this->product([],$user);
         $heads = $table_head[1];
+        $head_value = array_column($heads,'value');
+        if($head_value !== $upload) return [false, '产品模板错误,请重新下载模板导入'];
+
         $tmp = array_column($heads,'key');
         $tmp = array_fill_keys($tmp, '');
         $tmp['product_category'] = '';