diff --git a/api/controllers/wxapp/bobing/Bobing.php b/api/controllers/wxapp/bobing/Bobing.php
index 858c58b2..ff03724e 100644
--- a/api/controllers/wxapp/bobing/Bobing.php
+++ b/api/controllers/wxapp/bobing/Bobing.php
@@ -57,10 +57,11 @@ class Bobing extends Wxapp
$row = $this->mdBobingUser->count(array('app_id' => $this->appConfig['app_id'], 'act_key' => $this->appConfig['act_key'], 'credit<=' => $credit));
$percentage = round($row / $sum * 100, 2);
}
- $share_content = array('我已经博取' . $car_gold . '元购车金和' . $credit . '幸运分',
- '运气超越了全闽南' . $percentage . '%的用户。', '快来帮我助力博饼冲击汽车大奖,', '助力博饼可以获得现金奖励,最高100元哦!');
- $content = '
目前累计' . $car_gold . '元购车金和' . $credit . '幸运分,您的运气爆表,
超越了全闽南' . $percentage . '%的用户,
-邀请好友助力博饼,获得更多购车金,冲击汽车大奖~
助力好友可获得现金红包,最高100元!
';
+// $share_content = array('我已经博取' . $car_gold . '元购车金和' . $credit . '幸运分',
+// '运气超越了全闽南' . $percentage . '%的用户。', '快来帮我助力博饼冲击汽车大奖,', '助力博饼可以获得现金奖励,最高100元哦!');
+ $share_content = array('car_gold' => $car_gold, 'credit' => $credit, 'percentage' => $percentage . '%');
+ $content = '目前累计' . $car_gold . '元购车金和' . $credit . '幸运分,您的运气爆表,
超越了全闽南' . $percentage . '%的用户,
+邀请好友助力博饼,获得更多购车金,冲击汽车大奖~
助力好友可获得现金红包,最高100元!
';
$share = array('title' => '送你100元现金,帮我博取购车金和汽车大奖', 'share_content' => $share_content, 'content' => $content
, 'img' => $this->mdBobingUser->appImg('share_tip', $this->car_id), 'posters' => $this->mdBobingUser->appImg('posterbg', $this->car_id));
$result['valid_nums'] = $this->get_valid_nums($cf_uid);
@@ -285,7 +286,7 @@ class Bobing extends Wxapp
$content = $nickname . "为桌长博到{$value['car_gold']}元购车金";
}
} else if ($value['type'] == 2) {
- $content = "桌长加企业微信得到{$this->appConfig['wxqy_nums']}购车金";
+ $content = "桌长加企业微信得到{$this->appConfig['wxqy_nums']}元购车金";
}
$logs[] = $content;
}
diff --git a/api/controllers/wxapp/bobing/Home.php b/api/controllers/wxapp/bobing/Home.php
index 92054d07..627fc766 100644
--- a/api/controllers/wxapp/bobing/Home.php
+++ b/api/controllers/wxapp/bobing/Home.php
@@ -315,13 +315,11 @@ class Home extends Wxapp
}
if ($credit) {
$where = array('app_id' => $this->appConfig['app_id'], 'act_key' => $this->appConfig['act_key']);
- $re_u = $this->mdBobingUserCredit->select(array_merge($where, array('uid' => $this->myuid, 'lottery>' => 0)), 'lottery DESC', 0, 0, 'lottery');
- if ($re_u) {
- $tipsAry = array();
- foreach ($re_u as $key => $value) {
- $tipsAry[] = $this->mdBobingUser->lottery($value['lottery']);
- }
- $tips .= '您已中奖' . implode(',', $tipsAry) . '
';
+ $re_uc = $this->mdBobingUserCredit->get(array_merge($where, array('uid' => $this->myuid, 'lottery>' => 0)));
+ if ($re_uc) {
+ $bo_date = date('n月d日', strtotime($re_uc['bo_date']));
+ $tips .= '您在' . $bo_date . '获得单日排行榜前' . $this->appConfig['lottery_nums']
+ . '名,
获得购车金' . $this->appConfig['lotter_gold'] . '元购车金可叠加使用
';
} else {
$sum = $this->mdBobingUser->count($where);
$row = $this->mdBobingUser->count(array_merge($where, array('credit<=' => $credit)));
diff --git a/api/libraries/bobing/Bo.php b/api/libraries/bobing/Bo.php
index f6f29467..6fb4c522 100644
--- a/api/libraries/bobing/Bo.php
+++ b/api/libraries/bobing/Bo.php
@@ -68,7 +68,7 @@ class Bo extends Base
}
$data['car_gold'] = $car_gold;
$content = '博到 ' . $car_gold . ' 元购车金!
-
您已累计获得
' . $all_car_gold . ' 元购车金
购车金可无限叠加使用
';
+
您已累计获得
' . ($all_car_gold + $car_gold) . ' 元购车金
购车金可无限叠加使用
';
$nums = $this->valid_nums - 1;
if ($nums > 0) {
$content .= '今天还可再博' . $nums . '次
';
@@ -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 = '您已帮好友博到
' . $sum_credit['credit'] . ' 幸运分和
-' . intval($sum_car_gold['car_gold']) . ' 购车金
同时您还获得 ' . $credit . ' 积分
立即开桌获得更多幸运分
冲刺汽车大奖!
';
+' . intval($sum_car_gold['car_gold']) . ' 元购车金同时您还获得 ' . $sum_credit['credit'] . ' 积分
立即开桌获得更多幸运分
冲刺汽车大奖!
';
$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);
diff --git a/home/controllers/h5/Hongbao.php b/home/controllers/h5/Hongbao.php
index 31125678..c6116496 100644
--- a/home/controllers/h5/Hongbao.php
+++ b/home/controllers/h5/Hongbao.php
@@ -63,7 +63,7 @@ class Hongbao extends CI_Controller
$this->mdBobingLogs->update(array('status' => 2), array('id' => $id));//设为已领取
$data['title'] = '领取成功';
$data['code'] = 200;
- $data['msg'] = '恭喜您领到' . $re_l['hong_bao'] . '元现金,已转入微信零钱~';
+ $data['msg'] = '恭喜您领到' . $re_l['hong_bao'] . '元现金,已转入微信零钱~';
} else {
//$data['msg'] = '转帐失败!';
}
diff --git a/home/views/h5/hongbao/index.php b/home/views/h5/hongbao/index.php
index 83903c77..5f3ab444 100644
--- a/home/views/h5/hongbao/index.php
+++ b/home/views/h5/hongbao/index.php
@@ -8,22 +8,20 @@
领取红包
-
+
if ($code == 200) { ?>
-
+
} else { ?>
-
+
} ?>
@@ -36,7 +34,7 @@
= $msg ?>