浏览代码

默认的

Kirin 4 年之前
父节点
当前提交
d566fa2989
共有 1 个文件被更改,包括 2 次插入2 次删除
  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('记录状态错误。');
         }