WIN-2308041133\Administrator 2 dni temu
rodzic
commit
7cf9cb5834
1 zmienionych plików z 7 dodań i 0 usunięć
  1. 7 0
      app/api/controller/Shop.php

+ 7 - 0
app/api/controller/Shop.php

@@ -227,6 +227,13 @@ class Shop extends BaseController
             ->select()
             ->select()
             ->toArray();
             ->toArray();
 
 
+        // 解析 cart_info JSON 字段为数组
+        foreach ($cartInfo as &$item) {
+            if (!empty($item['cart_info'])) {
+                $item['cart_info'] = json_decode($item['cart_info'], true);
+            }
+        }
+
         $order['cart_info'] = $cartInfo;
         $order['cart_info'] = $cartInfo;
 
 
         return app('json')->success($order);
         return app('json')->success($order);