Browse Source

增加根据pid查询省市区

panda 4 tháng trước cách đây
mục cha
commit
3500a46940
1 tập tin đã thay đổi với 2 bổ sung3 xóa
  1. 2 3
      addons/shopro/controller/data/Area.php

+ 2 - 3
addons/shopro/controller/data/Area.php

@@ -22,10 +22,9 @@ class Area extends Common
         $this->success('获取成功', $list);
     }
 
+    // 根据pid查询
     public function list()
     {
-        $pid = input('pid',0);
-        $list = AreaModel::where('pid', $pid)->select();
-        $this->success('获取成功', $list);
+        $this->success('获取成功', AreaModel::where('pid', input('pid',0))->select());
     }
 }