diff --git a/webapp/controller/ChipController.class.php b/webapp/controller/ChipController.class.php index d2dca3ad..b996bf1e 100644 --- a/webapp/controller/ChipController.class.php +++ b/webapp/controller/ChipController.class.php @@ -497,13 +497,13 @@ class ChipController extends BaseAuthedController } $chip_param = $data; } - $cumulative_cost = 0; + $cumulative_cost = []; $token_id_arr = []; foreach ($chip_param as $value){ - $cumulative_cost += $value['cost']; + array_push($cumulative_cost,$value['cost']); array_push($token_id_arr,$value['token_id']); } - $this->_rspData(['data'=>['cost'=>$cumulative_cost,'token_ids'=>implode(' ',$token_id_arr)]]); + $this->_rspData(['data'=>['cost'=>$cumulative_cost,'token_ids'=>$token_id_arr]]); } public function lockChip(){