|
@@ -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()) {
|
|
if ($id && !MemberCheck::where('id', $id)->find()) {
|
|
|
$this->failed('记录状态错误。');
|
|
$this->failed('记录状态错误。');
|
|
|
}
|
|
}
|