diff --git a/webapp/controller/ShareController.class.php b/webapp/controller/ShareController.class.php index 617b77c..01f0b3a 100644 --- a/webapp/controller/ShareController.class.php +++ b/webapp/controller/ShareController.class.php @@ -293,6 +293,7 @@ class ShareController{ return; } $ach_id = $_REQUEST['ach_id']; + $double = $_REQUEST['double']; $row = $conn->execQueryOne('SELECT status FROM share_achievement WHERE accountid=:accountid AND ach_id=:ach_id;', array( ':accountid' => $account_id, @@ -332,6 +333,12 @@ class ShareController{ $ach_list = $data['invitee_nums']; $peo_num = 0; $sh = $this->getShare($ach_id); + $num = 0; + if ($double != 0) { + $num = 2; + } else { + $num = 1; + } for ($i = 0; $i < count($ach_list); $i++) { $delim = ","; $drop_multiply = explode($delim, $string); @@ -353,7 +360,7 @@ class ShareController{ } $array = $this->getExplode($sh['rewards']); $addreward = new classes\AddReward(); - $addreward->addReward($array[0][0], $array[0][1], $account_id); + $addreward->addReward($array[0][0], $array[0][1] * $num, $account_id); echo json_encode(array( 'errcode' => 0, 'errmsg' => '',