<?php
/**
*ajax 数据交互操作
*/
class ajaxControl extends skymvc{
	
	public function __construct(){
		parent::__construct();
	}
	
	public function onDefault(){
		
	}
	
	public function onUserinfo(){
		 
			echo trim('{"deliverAmount":13,"favored":false,"favorFoodIds":[],"mapUrl":"\/google\/maps\/api\/staticmap?language=zh-CN\u0026size=340x240\u0026sensor=false\u0026center=31.252434,120.572280\u0026path=color:0x2c57a5bb|weight:4|31.252868,120.576561|31.252000,120.568000\u0026markers=icon:http:\/\/static11.elemecdn.com\/forward\/img\/map\/marker-restaurant.png?v=2|31.252868,120.576561\u0026markers=icon:http:\/\/static11.elemecdn.com\/forward\/img\/map\/marker-entrance.png|shadow:false|31.252000,120.568000\u0026zoom=13\u0026key=AIzaSyA9Fzb6RIyqfCNP9iJqNXmNM29A5pwt3cM","distance":"819"}');exit;
	 
	}
	
	
	/**
	* 区域操作  获取省市地区
	*/
	public function ondistrict(){
		$id=get('id','i');
		echo "<option value=0>请选择</option>";
		if($id){
			$this->loadModel("district");
			$data=$this->district->dist_list(array("where"=>"upid=$id","limit"=>10000));
			if($data){
				foreach($data as $k=>$v){
					echo "<option value=".$k.">".$v."</option>";
				}
			}
		}
		exit; 
	}
}

?>