linwu 2 years ago
parent
commit
e917264006
1 changed files with 3 additions and 3 deletions
  1. 3 3
      app/user/controller/AdminUserController.php

+ 3 - 3
app/user/controller/AdminUserController.php

@@ -164,7 +164,7 @@ class AdminUserController extends AdminBaseController
         $file = WEB_ROOT . trim($url, '/');
         if (file_exists($file)) {
             $excel  = new Excel();
-            $data   = $excel->import($file, ['no', 'name', 'company', 'idcard', 'marry', 'mobile', 'idtype'], 1);
+            $data   = $excel->import($file, ['no', 'name', 'company', 'idcard', 'marry', 'mobile', 'id_type','marry'], 1);
             $idtype = Constant::ID_TYPE;
             $marry  = Constant::MARRY;
             foreach ($data as $k => $v) {
@@ -191,8 +191,8 @@ class AdminUserController extends AdminBaseController
                 if (!empty($mobileCheck)) {
                     $this->error("第" . ($k + 2) . "行的手机号已存在");
                 }
-                if (in_array($v['idtype'], $idtype)) {
-                    unset($v['idtype']);
+                if (in_array($v['id_type'], $idtype)) {
+                    unset($v['id_type']);
                 }
                 if (in_array($v['marry'], $marry)) {
                     unset($v['marry']);