This commit is contained in:
aozhiwei 2020-08-19 15:40:17 +08:00
parent 54441ff859
commit 0eb35fb9c2
2 changed files with 4 additions and 3 deletions

View File

@ -227,7 +227,8 @@ class AdditemController{
die(); die();
return; return;
} }
error_log($addnum + $row['coin_num']);
error_log($row['diamond_num'] - $num);
echo json_encode(array( echo json_encode(array(
'errcode' => 0, 'errcode' => 0,
'errmsg' => '', 'errmsg' => '',

View File

@ -425,7 +425,7 @@ class ShopController{
)); ));
$price = $i['price'] * $num; $price = $i['price'] * $num;
if ($row_c) { 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); $this->SubCoin($price, $account_id, 1);
} else if ($type == 1) { } else if ($type == 1) {
@ -436,7 +436,7 @@ class ShopController{
':id' => $id ':id' => $id
)); ));
if ($row_d) { 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); $this->SubCoin($price, $account_id, 2);
} }