This commit is contained in:
mkm 2023-07-15 15:43:22 +08:00
parent 8b171b0e56
commit 74aee3779c

View File

@ -0,0 +1,27 @@
<?php
namespace app\api\controller;
use think\facade\Db;
class CommonController extends BaseApiController
{
public array $notNeedLogin = ['city','area','street'];
//**省份列表 */
public function city(){
$data = Db::name('geo_city')->where(['city_id'=>259])->select();
return $this->data($data->toArray());
}
//**区域列表 */
public function area(){
$data = Db::name('geo_area')->where(['city_code'=>510500])->select();
return $this->data($data->toArray());
}
//**街道列表 */
public function street(){
$data = Db::name('geo_street')->where(['area_code'=>510502])->select();
return $this->data($data->toArray());
}
}