Browse Source

订单列表

shish 3 years ago
parent
commit
7d4ea5349b
1 changed files with 5 additions and 1 deletions
  1. 5 1
      app-mall/controllers/OrderController.php

+ 5 - 1
app-mall/controllers/OrderController.php

@@ -529,7 +529,11 @@ class OrderController extends BaseController
     //订单列表 ssh 2019.12.12
     public function actionList()
     {
-        $where = ['userId' => $this->userId];
+        $userId = $this->userId;
+        if (empty($userId)) {
+            util::success(['list' => []]);
+        }
+        $where = ['userId' => $userId];
         $list = OrderService::getOrderList($where);
         util::success($list);
     }