From 06fb29038328226eefd269baf36ce2be9db11628 Mon Sep 17 00:00:00 2001 From: yangduo Date: Mon, 13 Jan 2025 14:55:45 +0800 Subject: [PATCH] adjust --- webapp/controller/RechargeController.class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/webapp/controller/RechargeController.class.php b/webapp/controller/RechargeController.class.php index 456eaed..93e1f70 100644 --- a/webapp/controller/RechargeController.class.php +++ b/webapp/controller/RechargeController.class.php @@ -622,12 +622,17 @@ class RechargeController $firstrecharge = ''; $vipinfo = array(); $dailypurchase = array(); + $daysecs = phpcommon\getdayseconds(time()); if ($rechargerow) { if ($rechargerow['first_data'] != null) { $firstrecharge = $rechargerow['first_data']; } if ($rechargerow['vip_info'] != null && $rechargerow['vip_info'] != '') { - $vipinfo = json_decode($rechargerow['vip_info']); + $vipinfo = json_decode($rechargerow['vip_info'], true); + foreach ($vipinfo as $key => $val) { + $vipinfo[$key]['award'] = $val['daily_time'] < $daysecs ? 0 : 1; + unset($vipinfo[$key]['daily_time']); + } } if ($rechargerow['daily_purchase'] != null && $rechargerow['daily_purchase'] != '') { @@ -664,7 +669,6 @@ class RechargeController ); break; case 3: //每日累积充值 - $daysecs = phpcommon\getdayseconds(time()); $itemarray['id'] = $item['id']; $itemarray['target'] = $item['target']; if ($item['time'] < $daysecs) {