Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

goldzhang814 1 gadu atpakaļ
vecāks
revīzija
a034f6e5bf
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      app/api/controller/Goods.php

+ 2 - 0
app/api/controller/Goods.php

@@ -50,10 +50,12 @@ class Goods extends Controller
         $enableExchange = boolval($this->request->param('enable_exchange', 0));
         $list = $model->getList($this->request->param(),15,false, $enableExchange);
         $goodsType = $this->request->param('goods_type', null);
+        $rate = SettingModel::getItem('points_rate')['points_2_money'];
         foreach ($list as $item){
             if ($goodsType == GoodsType::EXCHANGE){
                 $item['za'] = null;
                 $item['miaosha'] = null;
+                $item['points_to_exchange'] = bcmul($item['goods_price_min'],$rate,0);
                 continue;
             }
               //买一赠一