|
@@ -51,7 +51,8 @@ class bonusexControl extends mobileControl
|
|
|
if(!isset($_GET['type_sn']) || empty($_GET['type_sn'])) {
|
|
|
return self::outerr(errcode::ErrParamter,"需要红包 type_sn 参数.");
|
|
|
}
|
|
|
- $type_sn = $_GET['type_sn'];
|
|
|
+ $type_sn = $_GET['type_sn'];
|
|
|
+ $relay_id = $_GET['relay_id'];
|
|
|
|
|
|
$type_infos = bonus_helper::get_typeinfo($type_sn);
|
|
|
if(empty($type_infos)) {
|
|
@@ -83,7 +84,7 @@ class bonusexControl extends mobileControl
|
|
|
$mine_bonus = bonus_helper::get_mine_by_bonussn($new_sn);
|
|
|
}
|
|
|
}
|
|
|
- $data = array('type_info' => $type_info, 'mine_bonus' => $mine_bonus,'binded_info' => $binded_info,'avatars' => $avatars);
|
|
|
+ $data = array('type_info' => $type_info, 'mine_bonus' => $mine_bonus,'binded_info' => $binded_info,'avatars' => $avatars,'relay_id' =>$relay_id);
|
|
|
if($bonus->isBinded() || $isMineType) {
|
|
|
return self::outsuccess($data,"bonus/content");
|
|
|
}
|
|
@@ -110,7 +111,7 @@ class bonusexControl extends mobileControl
|
|
|
else if($type->binded_over()) {
|
|
|
return self::outsuccess(array('type_info' => $type_info,'msg' => "手慢了,红包派完了"),"bonus/over");
|
|
|
} else {
|
|
|
- return self::outsuccess(array('type_info' => $type_info),"bonus/open");
|
|
|
+ return self::outsuccess(array('type_info' => $type_info,'relay_id' =>$relay_id),"bonus/open");
|
|
|
}
|
|
|
}
|
|
|
else
|
|
@@ -122,7 +123,7 @@ class bonusexControl extends mobileControl
|
|
|
'bonus/detail');
|
|
|
}
|
|
|
else {
|
|
|
- return self::outsuccess(array('type_info' => $type_info),"bonus/open");
|
|
|
+ return self::outsuccess(array('type_info' => $type_info,'relay_id' =>$relay_id),"bonus/open");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -163,6 +164,7 @@ class bonusexControl extends mobileControl
|
|
|
return self::outerr(errcode::ErrParamter,"需要红包 type_sn 参数.");
|
|
|
}
|
|
|
$type_sn = $_GET['type_sn'];
|
|
|
+ $relay_id = $_GET['relay_id'];
|
|
|
|
|
|
$type_infos = bonus_helper::get_typeinfo($type_sn);
|
|
|
if(empty($type_infos)) {
|
|
@@ -210,10 +212,13 @@ class bonusexControl extends mobileControl
|
|
|
'avatars' => $avatars),
|
|
|
"bonus/content");
|
|
|
} else {
|
|
|
- return self::outsuccess(array('type_info' => $type_info, 'mine_bonus' => $mine_bonus,'binded_info' => $binded_info,'avatars' => $avatars),"bonus/bind");
|
|
|
+ return self::outsuccess(array('type_info' => $type_info,
|
|
|
+ 'mine_bonus' => $mine_bonus,'binded_info' => $binded_info,
|
|
|
+ 'avatars' => $avatars,'relay_id' =>$relay_id),"bonus/bind");
|
|
|
}
|
|
|
} else {
|
|
|
- return self::outsuccess(array('type_info' => $type_info, 'mine_bonus' => $mine_bonus,'binded_info' => $binded_info,'avatars' => $avatars),"bonus/bind");
|
|
|
+ return self::outsuccess(array('type_info' => $type_info, 'mine_bonus' => $mine_bonus,'binded_info' => $binded_info,
|
|
|
+ 'avatars' => $avatars,'relay_id' =>$relay_id),"bonus/bind");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -248,10 +253,10 @@ class bonusexControl extends mobileControl
|
|
|
$data = array('type_info' => $type_info,
|
|
|
'mine_bonus' => $mine_bonus,
|
|
|
'binded_info' => $binded_info,
|
|
|
- 'avatars' => $avatars);
|
|
|
+ 'avatars' => $avatars,'relay_id' =>$relay_id);
|
|
|
return self::outsuccess($data,"bonus/content");
|
|
|
} else {
|
|
|
- $data = array('type_info' => $type_info, 'mine_bonus' => $mine_bonus,'binded_info' => $binded_info,'avatars' => $avatars);
|
|
|
+ $data = array('type_info' => $type_info, 'mine_bonus' => $mine_bonus,'binded_info' => $binded_info,'avatars' => $avatars,'relay_id' =>$relay_id);
|
|
|
return self::outsuccess($data,"bonus/bind");
|
|
|
}
|
|
|
}
|
|
@@ -541,7 +546,12 @@ function bonus_output_graburl($output)
|
|
|
$type_info = $output['type_info'];
|
|
|
$type = \bonus\type::create_by_paramer($type_info);
|
|
|
$type_sn = $type->getType_sn();
|
|
|
- $url = BASE_SITE_URL . "/mobile/index.php?act=bonusex&op=grab&client_type=wap&type_sn={$type_sn}";
|
|
|
+ $relay_id = intval($output['relay_id']);
|
|
|
+ if($relay_id > 0) {
|
|
|
+ $url = BASE_SITE_URL . "/mobile/index.php?act=bonusex&op=grab&client_type=wap&type_sn={$type_sn}&relay_id={$relay_id}";
|
|
|
+ } else {
|
|
|
+ $url = BASE_SITE_URL . "/mobile/index.php?act=bonusex&op=grab&client_type=wap&type_sn={$type_sn}";
|
|
|
+ }
|
|
|
return $url;
|
|
|
}
|
|
|
|
|
@@ -551,7 +561,7 @@ function bonus_output_type($output)
|
|
|
echo '<p class="p p_name" style="color:#454545">';
|
|
|
$type_info = $output['type_info'];
|
|
|
$type = \bonus\type::create_by_paramer($type_info);
|
|
|
- echo($type_info['sender_name'] . "的红包");
|
|
|
+ echo($type->name());
|
|
|
if($type->isRandomAmount()) {
|
|
|
echo '<s class="icon_pin"></s>';
|
|
|
}
|
|
@@ -567,6 +577,7 @@ function bonus_output_mine($output)
|
|
|
} else {
|
|
|
$show_down = true;
|
|
|
}
|
|
|
+ $relay_id = intval($output['relay_id']);
|
|
|
|
|
|
$mine_bonus = $output['mine_bonus'];
|
|
|
if(!empty($mine_bonus)) {
|
|
@@ -575,6 +586,7 @@ function bonus_output_mine($output)
|
|
|
echo('<p><span>' . $bonus->bonus_value() . '</span>元</p>');
|
|
|
echo('</div>');
|
|
|
echo('<input type="hidden" id="mine_bonus" value=' ."{$bonus->bonus_sn()}>");
|
|
|
+ echo('<input type="hidden" id="relay_id" value=' ."{$relay_id}>");
|
|
|
$mobile = $bonus->user_mobile();
|
|
|
$show_down = $bonus->isBinded() && $show_down;
|
|
|
} else {
|