Quellcode durchsuchen

没有登录不显示数据

shish vor 4 Jahren
Ursprung
Commit
7b3e4dd02a
1 geänderte Dateien mit 6 neuen und 1 gelöschten Zeilen
  1. 6 1
      app-hd/controllers/OrderController.php

+ 6 - 1
app-hd/controllers/OrderController.php

@@ -555,8 +555,13 @@ class OrderController extends BaseController
     {
     {
         $get = Yii::$app->request->get();
         $get = Yii::$app->request->get();
         $search = isset($get['search']) ? $get['search'] : '';
         $search = isset($get['search']) ? $get['search'] : '';
+        $shopId = $this->shopId ?? 0;
+        if (empty($shopId)) {
+            //没有登录不显示数据
+            util::success(['list' => [], 'moreData' => 0, 'shop' => [], 'totalNum' => 0, 'totalPage' => 0]);
+        }
         $where = [];
         $where = [];
-        $where['shopId'] = $this->shopId;
+        $where['shopId'] = $shopId;
         $status = $get['status'] ?? 0;
         $status = $get['status'] ?? 0;
         if (!empty($status)) {
         if (!empty($status)) {
             $where['status'] = $get['status'];
             $where['status'] = $get['status'];