From 0eb35fb9c2b38720f5ca95644e13c0b3225b7217 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 19 Aug 2020 15:40:17 +0800 Subject: [PATCH] 1 --- webapp/controller/AdditemController.class.php | 3 ++- webapp/controller/ShopController.class.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/webapp/controller/AdditemController.class.php b/webapp/controller/AdditemController.class.php index cfa8631..b1f6d8f 100644 --- a/webapp/controller/AdditemController.class.php +++ b/webapp/controller/AdditemController.class.php @@ -227,7 +227,8 @@ class AdditemController{ die(); return; } - + error_log($addnum + $row['coin_num']); + error_log($row['diamond_num'] - $num); echo json_encode(array( 'errcode' => 0, 'errmsg' => '', diff --git a/webapp/controller/ShopController.class.php b/webapp/controller/ShopController.class.php index 86c3b33..c35566d 100644 --- a/webapp/controller/ShopController.class.php +++ b/webapp/controller/ShopController.class.php @@ -425,7 +425,7 @@ class ShopController{ )); $price = $i['price'] * $num; if ($row_c) { - $price = round($i['price'] * $row_c['coin_discount'] / 10); + $price = round($price * $row_c['coin_discount'] / 10); } $this->SubCoin($price, $account_id, 1); } else if ($type == 1) { @@ -436,7 +436,7 @@ class ShopController{ ':id' => $id )); if ($row_d) { - $price = round($i['dprice'] * $row_d['diamond_discount'] / 10); + $price = round($dprice * $row_d['diamond_discount'] / 10); } $this->SubCoin($price, $account_id, 2); }