bobing_908_5
This commit is contained in:
@@ -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 = '<div>目前累计' . $car_gold . '元购车金和' . $credit . '幸运分,您的运气爆表,</div><div>超越了全闽南<span style="color:#fff10a">' . $percentage . '%</span>的用户,</div>
|
||||
<div>邀请好友助力博饼,获得更多购车金,冲击汽车大奖~</div><div>助力好友可获得现金红包,最高<span style="color:#fff10a">100</span>元!</div>';
|
||||
// $share_content = array('我已经博取' . $car_gold . '元购车金和' . $credit . '幸运分',
|
||||
// '运气超越了全闽南' . $percentage . '%的用户。', '快来帮我助力博饼冲击汽车大奖,', '助力博饼可以获得现金奖励,最高100元哦!');
|
||||
$share_content = array('car_gold' => $car_gold, 'credit' => $credit, 'percentage' => $percentage . '%');
|
||||
$content = '<div>目前累计<span style="color:#fff10a;font-weight:bold;">' . $car_gold . '</span>元购车金和<span style="color:#fff10a;font-weight:bold;">' . $credit . '</span>幸运分,您的运气爆表,</div><div>超越了全闽南<span style="color:#fff10a">' . $percentage . '%</span>的用户,</div>
|
||||
<div>邀请好友助力博饼,获得更多购车金,冲击汽车大奖~</div><div>助力好友可获得现金红包,最高<span style="color:#fff10a;font-weight:bold;">100</span>元!</div>';
|
||||
$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;
|
||||
}
|
||||
|
||||
@@ -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 .= '<div><span style="color:#dd4223;">您已中奖' . implode(',', $tipsAry) . '</span></div>';
|
||||
$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 .= '<div><span style="color:#dd4223;">您在' . $bo_date . '获得单日排行榜前' . $this->appConfig['lottery_nums']
|
||||
. '名,<br>获得购车金' . $this->appConfig['lotter_gold'] . '元购车金可叠加使用</span></div>';
|
||||
} else {
|
||||
$sum = $this->mdBobingUser->count($where);
|
||||
$row = $this->mdBobingUser->count(array_merge($where, array('credit<=' => $credit)));
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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'] . '元现金,</br>已转入微信零钱~';
|
||||
} else {
|
||||
//$data['msg'] = '转帐失败!';
|
||||
}
|
||||
|
||||
@@ -8,22 +8,20 @@
|
||||
<title>领取红包</title>
|
||||
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
|
||||
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/jquery.3.4.1.min.js"></script>
|
||||
<link rel="stylesheet" href="/css/h5/hongbao/red.css">
|
||||
<link rel="stylesheet" href="/css/h5/hongbao/red.css?0908">
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$(".close").click(function (e) {
|
||||
$('.msg').hide();
|
||||
});
|
||||
});
|
||||
function navigateBack() {
|
||||
wx.miniProgram.navigateBack()
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<? if ($code == 200) { ?>
|
||||
<!--非空的-->
|
||||
<div class="red img-top-cover fn-hide" style=" background-image:url('/img/h5/hongbao/bg.jpg');"></div>
|
||||
<div class="red img-top-cover" style=" background-image:url('/img/h5/hongbao/bg.jpg?0908');"></div>
|
||||
<? } else { ?>
|
||||
<!--空的-->
|
||||
<div class="red img-top-cover " style=" background-image:url('/img/h5/hongbao/bg2.jpg');"></div>
|
||||
<div class="red img-top-cover" style=" background-image:url('/img/h5/hongbao/bg2.jpg?0908');"></div>
|
||||
<? } ?>
|
||||
<div class="msg">
|
||||
<div class="msgBg"></div>
|
||||
@@ -36,7 +34,7 @@
|
||||
<div class="mt40 pl100 pr100 font-32 olor-666"><?= $msg ?></div>
|
||||
</div>
|
||||
<div class="mt20 bts-1-ccc pl40 pr40">
|
||||
<a class="block pt25 pb25 text-center font-32 color-666 close" href="javascript:">好的</a>
|
||||
<a class="block pt25 pb25 text-center font-32 color-666 close" onclick="navigateBack()" href="javascript:">好的</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user