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); }