<?php
class Common_CityController extends Ec_Controller_Action
{
    public function preDispatch()
    {
        $this->tplDirectory = "common/views/region/";
        $this->serviceClass = new Service_City();
    }
    /**
     * @author william-fan
     * @todo 用于得到省份或者城市
     */
    public function getcityAction(){
    	$country_id = $this->getRequest()->getParam('country_id', 0);
    	if(!$country_id){
    		echo "";
    		exit;
    	}  //if(!$province_id)
    	$city_array = Service_City::getByCondition(array('country_id'=>$country_id));
    	echo json_encode($city_array);
    	exit;
    }
}