Explorar el Código

购物车数据类型

lizhen_gitee hace 11 meses
padre
commit
46a82b584b
Se han modificado 1 ficheros con 8 adiciones y 1 borrados
  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 = [];