diff --git a/Library/Controller/Invite.php b/Library/Controller/Invite.php index d9abb1fa..e5094d20 100644 --- a/Library/Controller/Invite.php +++ b/Library/Controller/Invite.php @@ -41,12 +41,12 @@ public function create() $result = array( 'error' => 0, 'message' => '创建邀请码成功,刷新后可见', - 'invite_num' => $user->invite_num -1, + 'invite_num' => $user->invite_num - 1, 'invite' => $invite ); + $user->invite_num = $user->invite_num - 1; + $user->save(); } - $user->invite_num = $user->invite_num -1; - $user->save(); return $result; } diff --git a/Template/Default/panel/invite.htm b/Template/Default/panel/invite.htm index 5ace6a5d..40725470 100644 --- a/Template/Default/panel/invite.htm +++ b/Template/Default/panel/invite.htm @@ -77,6 +77,8 @@