Skip to content

Commit

Permalink
Fixed invite num show
Browse files Browse the repository at this point in the history
  • Loading branch information
sendya committed Mar 23, 2016
1 parent dab2219 commit ae4081b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Library/Controller/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions Template/Default/panel/invite.htm
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ <h4>注意!</h4>
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);
Expand Down

0 comments on commit ae4081b

Please sign in to comment.