Kirin před 4 roky
rodič
revize
d566fa2989
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      app/admin/controller/user/User.php

+ 2 - 2
app/admin/controller/user/User.php

@@ -824,9 +824,9 @@ class User extends AuthController
     }
 
 
-    public function add_member($id, $type)
+    public function add_member($type, $id = 0)
     {
-        if (!$type) $this->failed('请选择会员类型。');
+        if (!$type || !in_array($type, [1, 2])) $this->failed('请选择会员类型。');
         if ($id && !MemberCheck::where('id', $id)->find()) {
             $this->failed('记录状态错误。');
         }