diff --git a/Library/Controller/Form.php b/Library/Controller/Form.php index b541f008..aa183112 100644 --- a/Library/Controller/Form.php +++ b/Library/Controller/Form.php @@ -150,7 +150,7 @@ public function addInvite() { $user->invite_num = $user->invite_num-1; $user->updateUser(); Invite::addInvite($user->uid, 'A'); - $result = array('error' => 0, 'message' => '创建邀请码成功,刷新后可见'); + $result = array('error' => 0, 'message' => '创建邀请码成功,刷新后可见', 'invite_num' => $user->invite_num); } echo json_encode($result); diff --git a/Template/Default/panel/invite.htm b/Template/Default/panel/invite.htm index 72f49f00..032824b4 100644 --- a/Template/Default/panel/invite.htm +++ b/Template/Default/panel/invite.htm @@ -86,6 +86,8 @@

注意!

if(data.error == 0){ showToastr(data.message, 0, 5000); setTimeout("window.location.reload()", 2000); + $("#invitec_num").html(data.invite_num); + $("#invitec_num2").html(data.invite_num); }else{ //$("#msg-error").show(); //$("#msg-error-p").html(data.msg);