Przeglądaj źródła

返回假数据

shish 5 lat temu
rodzic
commit
d84e9f45dc
1 zmienionych plików z 9 dodań i 0 usunięć
  1. 9 0
      app-ghs/controllers/PtItemController.php

+ 9 - 0
app-ghs/controllers/PtItemController.php

@@ -34,6 +34,15 @@ class PtItemController extends BaseController
         $where['delStatus'] = 0;
         $sjId = $this->sjId;
         $list = PtItemClass::getItemList($where, true, $sjId);
+
+        if (getenv('YII_ENV') != 'production') {
+            //返回假数据
+            foreach ($list as $key => $val) {
+                $select = rand(1, 2);
+                $list[$key]['select'] = $select;
+            }
+        }
+
         util::success($list);
     }