From ae4081b975d7fb7d826d24d01f105428aa730fd7 Mon Sep 17 00:00:00 2001 From: Sendya <18x@loacg.com> Date: Thu, 24 Mar 2016 00:04:03 +0800 Subject: [PATCH] Fixed invite num show --- Library/Controller/Form.php | 2 +- Template/Default/panel/invite.htm | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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);