From eea093439712c3f4706743df2137e4abeeaa4c45 Mon Sep 17 00:00:00 2001
From: 李忠强 <1354905998@qq.com>
Date: Fri, 21 Jan 2022 18:35:03 +0800
Subject: [PATCH] 更新

---
 application/api/controller/Cart.php |  9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/application/api/controller/Cart.php b/application/api/controller/Cart.php
index dc06a67..cd390ae 100644
--- a/application/api/controller/Cart.php
+++ b/application/api/controller/Cart.php
@@ -202,12 +202,11 @@ class Cart extends Api
      */
     public function priceCalculation()
     {
-        $json = $_POST;
-//        if (!$json) $this->error('data_json参数不能为空');
-//        $json = '[{"goods_id":22,"goods_sku_id":106,"number":2},{"goods_id":23,"goods_sku_id":66,"number":2}]';
-//        $data = json_decode($json['data_json'],true);
+        $json = $_POST['data_json'];
         var_dump($json);exit();
-//        var_dump($data);exit();
+        if (!$json) $this->error('data_json参数不能为空');
+//        $json = '[{"goods_id":22,"goods_sku_id":106,"number":2},{"goods_id":23,"goods_sku_id":66,"number":2}]';
+        $data = json_decode($json,true);
         $goodsmodel = new \app\api\model\Goods();
         $skumodel = new GoodsSpec();
         $sum_price = 0; //总价格
--
libgit2 0.24.0