Sfoglia il codice sorgente

购物车数据类型

lizhen_gitee 11 mesi fa
parent
commit
46a82b584b
1 ha cambiato i file con 8 aggiunte e 1 eliminazioni
  1. 8 1
      addons/unishop/controller/Cart.php

+ 8 - 1
addons/unishop/controller/Cart.php

@@ -61,7 +61,14 @@ class Cart extends Base
             ->order(['createtime' => 'desc'])
             ->select();
         if (!$carts) {
-            $this->success('', []);
+//            $this->success('', []);
+
+            $result = [
+                'choose_price_total' => '0',
+                'choose_number' => 0,
+                'list' => [],
+            ];
+            $this->success('', $result);
         }
 
         $data = [];