WIN-2308041133\Administrator hace 1 día
padre
commit
6770257e2f
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      app/system/controller/Member.php

+ 2 - 2
app/system/controller/Member.php

@@ -774,14 +774,14 @@ class Member extends BaseController
     {
     {
         $post = UtilService::getMore([
         $post = UtilService::getMore([
             ['uid', '', 'empty', '参数错误'],
             ['uid', '', 'empty', '参数错误'],
-            ['permission', '0'],
+            ['permission', 0],
 //            ['othen', ''],
 //            ['othen', ''],
         ], $request);
         ], $request);
         $userData = (new UserModel)->where("uid",$post["uid"])->find();
         $userData = (new UserModel)->where("uid",$post["uid"])->find();
         if(empty($userData)){
         if(empty($userData)){
             return app('json')->fail('用户不存在,请输入正确的用户uid');
             return app('json')->fail('用户不存在,请输入正确的用户uid');
         }
         }
-        $bool = (new UserModel)->where('uid',$post)->update(['permission'=>$post['permission']]);
+        $bool = (new UserModel)->where('uid',$post['uid'])->update(['permission'=>$post['permission']]);
 
 
         if ($bool)
         if ($bool)
             return app('json')->success('操作成功');
             return app('json')->success('操作成功');