1
This commit is contained in:
parent
c9dae057bb
commit
69da19f145
@ -224,6 +224,9 @@ class RoleController{
|
|||||||
$share_equip_times = 0;
|
$share_equip_times = 0;
|
||||||
$daily_diamond_times = 0;
|
$daily_diamond_times = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//更新新手礼
|
||||||
|
$newhand = $this->getnewhandinfo($row['newhand'], $row['game_times2'], $row['view_times2'], $account_id);
|
||||||
echo json_encode(array(
|
echo json_encode(array(
|
||||||
'errcode' => 0,
|
'errcode' => 0,
|
||||||
'errmsg' => '',
|
'errmsg' => '',
|
||||||
@ -259,13 +262,35 @@ class RoleController{
|
|||||||
'box_num' => $box_num,
|
'box_num' => $box_num,
|
||||||
'share_equip_times' => $share_equip_times,
|
'share_equip_times' => $share_equip_times,
|
||||||
'daily_diamond_times' => $daily_diamond_times,
|
'daily_diamond_times' => $daily_diamond_times,
|
||||||
'newhand' => $row['newhand'],
|
'newhand' => $newhand,
|
||||||
'game_times2' => $row['game_times2'],
|
'game_times2' => $row['game_times2'],
|
||||||
'view_times2' => $row['view_times2'],
|
'view_times2' => $row['view_times2'],
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getnewhandinfo($status, $num1, $num2, $account_id)
|
||||||
|
{
|
||||||
|
$p3 = $this->getParameter(ZIJIE_ACTIVITY_FIGHT);
|
||||||
|
$fight_times2 = $p3['param_value'];
|
||||||
|
$p4 = $this->getParameter(ZIJIE_ACTIVITY_ADS);
|
||||||
|
$view_times2 = $p4['param_value'];
|
||||||
|
$conn = $this->getMysql($account_id);
|
||||||
|
if ($num1 >= $fight_times2 && $num2 >= $view_times2 && $status == 0) {
|
||||||
|
$ret = $conn->execScript('UPDATE user SET newhand=1, ' .
|
||||||
|
'modify_time=:modify_time WHERE accountid=:accountid;',
|
||||||
|
array(
|
||||||
|
':accountid' => $account_id,
|
||||||
|
':modify_time' => time(),
|
||||||
|
));
|
||||||
|
if (!$ret) {
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return $status;
|
||||||
|
}
|
||||||
|
|
||||||
protected function updateDaily($account_id, $daily_time)
|
protected function updateDaily($account_id, $daily_time)
|
||||||
{
|
{
|
||||||
$nowTime = phpcommon\getdayseconds(time());
|
$nowTime = phpcommon\getdayseconds(time());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user