diff --git a/backstage/application/backstage/controllers/Recharge.php b/backstage/application/backstage/controllers/Recharge.php index 03c8abb..16e2f70 100644 --- a/backstage/application/backstage/controllers/Recharge.php +++ b/backstage/application/backstage/controllers/Recharge.php @@ -1047,6 +1047,19 @@ class Recharge extends CI_Controller $data['supplierId'] = $this->session->userdata("supplierId"); $data['userTypeName'] = $userTypeInfo['name']; $data['userInfo'] = $userInfo; + + // 获取充值在赠送金额 + $this->load->library('Recharge_config'); + $rechargeInfo = $this->recharge_config->rechargeRule($userInfo, $userInfo['company_id'], $count, 2); + $rechargeInfo = json_decode($rechargeInfo, 1); + $data['giveFee'] = 0; + if($rechargeInfo['status'] == 1){ + $giveFee = $rechargeInfo['data']['gift_fee']; + if($giveFee > 0){ + $data['giveFee'] = $giveFee; + } + } + $html = $this->load->view('recharge/xj/modal_confirm', $data, true); echo $this->lw_load->jsonResult(true, array('msg' => $actionText . '信息确认', 'html' => $html)); break; diff --git a/backstage/application/backstage/views/recharge/xj/modal_confirm.php b/backstage/application/backstage/views/recharge/xj/modal_confirm.php index 07e4d18..b2fbf3d 100644 --- a/backstage/application/backstage/views/recharge/xj/modal_confirm.php +++ b/backstage/application/backstage/views/recharge/xj/modal_confirm.php @@ -99,6 +99,14 @@ $text = ($action==1)?"充值":"退款"; +
+
+ +
+ +
+
+
diff --git a/backstage/system/libraries/Recharge_config.php b/backstage/system/libraries/Recharge_config.php index a2aefc1..897df21 100644 --- a/backstage/system/libraries/Recharge_config.php +++ b/backstage/system/libraries/Recharge_config.php @@ -111,7 +111,7 @@ class CI_Recharge_config { return $this->CI->db->query("select count(id) as num from tb_recharge where user_id=? and type=1 and YEAR(record_datetime) = YEAR(CURDATE())", array($userId))->row()->num; }else{ // 每次赠送 - return $this->CI->db->query("select count(id) as num from tb_recharge where user_id=? and type=1", array($userId))->row()->count; + return $this->CI->db->query("select count(id) as num from tb_recharge where user_id=? and type=1", array($userId))->row()->num; } }