From 4e9a867432ad4186c75e707a0b57ef6fc4cc18c6 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Thu, 14 Dec 2023 14:10:40 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E7=9C=81=E5=B8=82=E5=8C=BA=E5=8E=BF?= =?UTF-8?q?=E9=95=87=E6=9D=91=E5=9C=B0=E5=8C=BA=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/adminapi/controller/CommonController.php | 46 ++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 app/adminapi/controller/CommonController.php diff --git a/app/adminapi/controller/CommonController.php b/app/adminapi/controller/CommonController.php new file mode 100644 index 00000000..d7d0b6e6 --- /dev/null +++ b/app/adminapi/controller/CommonController.php @@ -0,0 +1,46 @@ +where(['switch' => 1])->select(); + return $this->data($data->toArray()); + } //**市列表 */ + public function city($city) + { + $data = Db::name('geo_city')->where(['province_code' => $city])->select(); + return $this->data($data->toArray()); + } + //**区域列表 */ + public function area($area) + { + $data = Db::name('geo_area')->where(['city_code' => $area])->select(); + return $this->data($data->toArray()); + } + //**街道列表 */ + public function street($street) + { + $data = Db::name('geo_street')->where(['area_code' => $street])->select(); + return $this->data($data->toArray()); + } + //**村列表 */ + public function village($village) + { + $data = Db::name('geo_village')->where(['street_code' => $village])->select(); + return $this->data($data->toArray()); + } + //**小队列表 */ + public function brigade() + { + $data = Db::name('geo_brigade')->select(); + return $this->data($data->toArray()); + } +}