<?php


namespace app\api\controller;


use app\common\controller\Api;
use app\lib\service\AddressService;

class Address extends Api
{

    protected $noNeedLogin = ['*'];
    protected $noNeedRight = [];


    //查询省市区街道村
    public function AddrList(){
        $param=$this->request->param();
        $list=AddressService::getAddress($param);
        $this->success('',$list);
    }

    //根据编码ID查询
    public function getAddrInfo(){
        $ID=$this->request->param("ID");
        $type=$this->request->param("type",3);
        $list=AddressService::getAddrInfo($ID,$type);
        $this->success('',$list);
    }


}