From 5d3c77cff2f0e1e078ed3eb1a79fe461f7422b98 Mon Sep 17 00:00:00 2001 From: xiaodaii <1259102089@qq.com> Date: Wed, 14 Jul 2021 02:00:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E9=80=9A=E5=A5=97=E9=A4=90=E5=8D=A1?= =?UTF-8?q?=E5=AF=86=E4=B8=8D=E6=8C=89=E6=8A=98=E6=89=A3=E6=89=A3=E6=AC=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agent/ajax.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/agent/ajax.php b/agent/ajax.php index 9948e5b..3241996 100644 --- a/agent/ajax.php +++ b/agent/ajax.php @@ -1008,7 +1008,10 @@ switch ($_GET['mod']) { if (!$agentinfo = $db->select_first_row('sq_agent', '*', array('username' => $_SESSION['agent_username']), 'AND')) { die(json_encode(array('code' => -3, 'msg' => '代理信息获取失败'))); } - $spendmoney = $fidinfo['agentprice'] * $count; + if (!$levelinfo = $db->select_first_row('sq_level', '*', array('ID' => $agentinfo['levelid']), 'AND')) { + die(json_encode(array('code' => -2, 'msg' => '代理对应的等级信息获取失败!'))); + } + $spendmoney = $fidinfo['agentprice'] * $count * $levelinfo['fracture']; if ($spendmoney > $agentinfo['money']){ die(makejson(-10,'代理余额不足'.$spendmoney.',请先进行充值')); }