Jonlin 6 years ago
parent
commit
8dd202686f
1 changed files with 4 additions and 2 deletions
  1. 4 2
      application/index/controller/User.php

+ 4 - 2
application/index/controller/User.php

@@ -87,7 +87,7 @@ class User extends Controller
             $qq = input("param.qq/s");
             $wechat = input("param.wechat/s");
 
-            $images = input("param.file/s");
+            $image = input("param.file/s");
 
             if(empty($name)){
                 return json(['code' => -1, 'data' => '', 'msg' => '用户名称不能为空']);
@@ -113,9 +113,11 @@ class User extends Controller
                 return json(['code' => -6, 'data' => '', 'msg' => '电话不能为空']);
             }
 
-            if(empty($images)){
+            if(empty($image)){
                 return json(['code' => -7, 'data' => '', 'msg' => '附件不能为空']);
             }
+            //转换成数组格式
+            $images = explode(",", $image);
 
             $param = [
                 'name' => $name,