chenqp 7 months ago
parent
commit
89c6e6af8f
1 changed files with 3 additions and 0 deletions
  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'] = '';