TaskSystem/app/api/controller/CommonController.php
2023-07-15 15:43:22 +08:00

27 lines
718 B
PHP

<?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());
}
}