diff --git a/api/controllers/wxapp/bobing/Home.php b/api/controllers/wxapp/bobing/Home.php index 94a5d74f..5b83871b 100644 --- a/api/controllers/wxapp/bobing/Home.php +++ b/api/controllers/wxapp/bobing/Home.php @@ -43,9 +43,10 @@ class Home extends Wxapp $bo_nums = 0;//$this->mdBobingUser->boNums($this->appConfig['act_key']) $this->data['bodata'] = array('title' => "累计博饼次数", 'content' => $this->appConfig['content'], 'bo_nums' => $bo_nums); $lucky_car[] = array('title' => '', 'img' => $this->mdBobingUser->appImg('index-tip'), 'url' => '/pages/buyCar/detail/index?id=' . $this->car_id); + $share = array('title' => '送你100元现金,帮我博取iPhone13、汽车大奖', 'img' => $this->mdBobingUser->appImg('share_tip', $this->car_id)); $this->data['lucky_car'] = $lucky_car; $this->data['group'] = $this->appConfig['group']; - $this->data['title'] = $this->appConfig['title']; + $this->data['share'] = $share; return $this->data; } @@ -308,27 +309,29 @@ class Home extends Wxapp if ($re_u) { $credit = $re_u['credit']; $car_gold = $re_u['car_gold'] + $re_u['buy_car_gold']; - $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) { - if ($value['lottery'] == 1) { - $tipsAry[] = '购物卡1张'; - } else if ($value['lottery'] == 2) { - $tipsAry[] = 'iPhone13手机一只'; - } else if ($value['lottery'] == 3) { - $tipsAry[] = '新能源汽车一台'; + 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) { + if ($value['lottery'] == 1) { + $tipsAry[] = '购物卡1张'; + } else if ($value['lottery'] == 2) { + $tipsAry[] = 'iPhone13手机一只'; + } else if ($value['lottery'] == 3) { + $tipsAry[] = '新能源汽车一台'; + } } + $tips = '