bobing_908_5
This commit is contained in:
@@ -68,7 +68,7 @@ class Bo extends Base
|
||||
}
|
||||
$data['car_gold'] = $car_gold;
|
||||
$content = '<div>博到 <span style="color:#dd4223;">' . $car_gold . '</span> 元购车金!</div>
|
||||
<div><br></div><div>您已累计获得</div><div> <span style="color:#dd4223;">' . $all_car_gold . '</span> 元购车金</div><div>购车金可无限叠加使用</div>';
|
||||
<div><br></div><div>您已累计获得</div><div> <span style="color:#dd4223;">' . ($all_car_gold + $car_gold) . '</span> 元购车金</div><div>购车金可无限叠加使用</div>';
|
||||
$nums = $this->valid_nums - 1;
|
||||
if ($nums > 0) {
|
||||
$content .= '<div>今天还可再博<span style="color:#dd4223;">' . $nums . '</span>次</div>';
|
||||
@@ -100,12 +100,10 @@ class Bo extends Base
|
||||
$data['uid'] = $this->cf_uid;
|
||||
$data['cf_uid'] = $this->uid;
|
||||
if ($this->valid_nums <= 0) {
|
||||
$re_u2 = $this->ci->bobing_user_model->get(array('app_id' => $data['app_id'], 'act_key' => $data['act_key'], 'uid' => $this->uid));
|
||||
$credit = intval($re_u2['credit']);
|
||||
$sum_credit = $this->ci->bobing_logs_model->sum('credit', array('app_id' => $data['app_id'], 'act_key' => $data['act_key'], 'uid' => $data['uid'], 'cf_uid' => $data['cf_uid']));
|
||||
$sum_car_gold = $this->ci->bobing_logs_model->sum('car_gold', array('app_id' => $data['app_id'], 'act_key' => $data['act_key'], 'uid' => $data['uid'], 'cf_uid' => $data['cf_uid']));
|
||||
$content = '<div>您已帮好友博到</div><div><span style="color:#dd4223;">' . $sum_credit['credit'] . '</span> 幸运分和
|
||||
<span style="color:#dd4223;">' . intval($sum_car_gold['car_gold']) . '</span> 购车金</div><div>同时您还获得 <span style="color:#dd4223;">' . $credit . '</span> 积分</div><div>立即开桌获得更多幸运分</div><div>冲刺汽车大奖!</div>';
|
||||
<span style="color:#dd4223;">' . intval($sum_car_gold['car_gold']) . '</span> 元购车金</div><div>同时您还获得 <span style="color:#dd4223;">' . $sum_credit['credit'] . '</span> 积分</div><div>立即开桌获得更多幸运分</div><div>冲刺汽车大奖!</div>';
|
||||
$popup = array('title' => '开桌', 'content' => $content, 'btn' => array('title' => '我也要开桌', 'url' => '/bobing/pages/index/index'));
|
||||
return array('status' => 2, 'popup' => $popup);
|
||||
}
|
||||
@@ -147,8 +145,9 @@ class Bo extends Base
|
||||
if ($this->appConfig['ratio_hong_bao'] && $this->appConfig['ratio_hong_bao'] <= rand(1, 100)) {//红包概率
|
||||
$hb_count = $this->ci->bobing_logs_model->count(array('app_id' => $data['app_id'], 'act_key' => $data['act_key'], 'uid' => $data['uid']
|
||||
, 'cf_uid' => $data['cf_uid'], 'hong_bao >' => 0));
|
||||
if ($hb_count < 2) {//帮博时最多出现两次红包
|
||||
$hong_bao = '0.' . rand(30, 68);
|
||||
if (!$hb_count) {//帮博时最多出现1次红包
|
||||
//$hong_bao = '0.' . rand(30, 68);
|
||||
$hong_bao = '0.30';
|
||||
$data['hong_bao'] = $hong_bao;
|
||||
$data['status'] = 1;
|
||||
$this->ci->bobing_user_model->hongBaoDay($data['act_key'], $hong_bao);
|
||||
|
||||
Reference in New Issue
Block a user