bobing_908_3
This commit is contained in:
@@ -310,6 +310,9 @@ class Home extends Wxapp
|
||||
if ($re_u) {
|
||||
$credit = $re_u['credit'];
|
||||
$car_gold = $re_u['car_gold'] + $re_u['buy_car_gold'] + $re_u['lotter_gold'];
|
||||
if ($re_u['buy_car_gold'] > 0) {
|
||||
$tips = '<div><span style="color:#dd4223;">您已添加客服领取到' . $re_u['buy_car_gold'] . '元购车金</span></div>';
|
||||
}
|
||||
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');
|
||||
@@ -318,14 +321,14 @@ class Home extends Wxapp
|
||||
foreach ($re_u as $key => $value) {
|
||||
$tipsAry[] = $this->mdBobingUser->lottery($value['lottery']);
|
||||
}
|
||||
$tips = '<div><span style="color:#dd4223;">您已中奖' . implode(',', $tipsAry) . '</span></div>';
|
||||
$tips .= '<div><span style="color:#dd4223;">您已中奖' . implode(',', $tipsAry) . '</span></div>';
|
||||
} else {
|
||||
$sum = $this->mdBobingUser->count($where);
|
||||
$row = $this->mdBobingUser->count(array_merge($where, array('credit<=' => $credit)));
|
||||
$percentage = round($row / $sum * 100, 2);
|
||||
$tips = '<div>您已打败全闽南<span style="color:#dd4223;">' . $percentage . '%</span>的用户</div>';
|
||||
$tips .= '<div>您已打败全闽南<span style="color:#dd4223;">' . $percentage . '%</span>的用户</div>';
|
||||
}
|
||||
$tips = $tips . '<div>继续邀请好友助力博饼,冲刺大奖吧~</div>';
|
||||
$tips .= '<div>继续邀请好友助力博饼,冲刺大奖吧~</div>';
|
||||
}
|
||||
}
|
||||
//$menulist[] = array('title' => '9.9抢500购车金', 'url' => 'buy_car_gold', 'img' => $this->mdBobingUser->appImg('icon-mine-1'));
|
||||
|
||||
@@ -30,7 +30,7 @@ class Bo extends Base
|
||||
public function kz_bo()
|
||||
{
|
||||
if ($this->valid_nums <= 0) {
|
||||
$content = '<div>您的博饼次数已经用完啦!</div><div>立即邀请好友助力博饼,</div><div>获得更多购车金,冲击汽车大奖</div><div>助力好友可获得现金红包,最高100元!</div>';
|
||||
$content = '<div>您的博饼次数已经用完啦~</div><div>立即邀请好友助力博饼,</div><div>获得更多购车金,</div><div>冲击汽车大奖!!!</div>';
|
||||
$popup = array('title' => '邀请好友', 'content' => $content, 'btn' => array('title' => '立即邀请', 'url' => '/bobing/pages/game/invite/index'));
|
||||
return array('status' => 1, 'popup' => $popup);
|
||||
}
|
||||
@@ -61,13 +61,13 @@ class Bo extends Base
|
||||
if ($re_u['car_gold'] < $this->appConfig['max_car_gold']) {//购车金小于购车金设定值
|
||||
if ($this->appConfig['ratio_car_gold_kz'] && $this->appConfig['ratio_car_gold_kz'] <= rand(1, 5)) {//购车金概率
|
||||
//$car_gold = $this->carGoldAry[rand(1, 7)];
|
||||
$car_gold = rand(90, 110);
|
||||
$car_gold = rand(25, 35);
|
||||
if (($car_gold + $re_u['car_gold']) > $this->appConfig['max_car_gold']) {//如果购车金大于设定值,那么本次增加到最大值
|
||||
$car_gold = $this->appConfig['max_car_gold'] - $re_u['car_gold'];
|
||||
}
|
||||
$data['car_gold'] = $car_gold;
|
||||
$all_car_gold = $car_gold + $re_u['car_gold'] + $re_u['buy_car_gold'] + $re_u['lotter_gold'];
|
||||
$content = '<div>博到' . $car_gold . '元购车金</div><div>您已累计博得' . $all_car_gold . '元购车金</div>';
|
||||
$content = '<div>博到 ' . $car_gold . ' 元购车金!</div><div><br></div><div>您已累计博得</div><div> ' . $all_car_gold . ' 元购车金</div>';
|
||||
$popup = array('title' => '恭喜您', 'content' => $content, 'btn' => array('title' => '立即使用购车金', 'url' => '/bobing/pages/game/signUp/index'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user