Wang Chen há 4 anos atrás
pai
commit
46d010d308

+ 5 - 2
app/Http/Controllers/QuickApp/Activity/Transformers/ReBuildData.php

@@ -50,13 +50,16 @@ class ReBuildData
 
             // 支付产品信息
             $product = collect($products)->firstWhere('id', $productId);
+            $price   = (int)getProp($product, 'price');
+            $total   = $price * 100 + (int)getProp($product, 'given');
 
             $result[] = [
                 'product_id' => $productId,
                 'limit'      => $limit,
                 'type'       => getProp($product, 'type'),
-                'price'      => getProp($product, 'price'),
-                'total'      => getProp($product, 'given'),
+                'price'      => $price,
+                'given'      => getProp($product, 'given'),
+                'total'      => $total,
             ];
         }