var app=new Vue({
	el:"#app",
	data:function(){
		return {
			pageLoad:false,
			pageData:{},
			provinceid:0,
		}
	},
	created:function(){
		
		this.getPage();
		
	},
	methods:{
		setSites:function(siteid){
			$.ajax({
				url:"/index.php?m=sites&a=setsite&ajaxa=1&siteid="+siteid,
				success:function(){
					history.back();
				}
			})
		},
		setProvince:function(id){
			this.provinceid=id;
		},
		getPage:function(){
			var that=this;
			$.ajax({
				url:"/index.php?m=sites&a=schooldata&ajax=1",
				dataType:"json",
				success:function(res){
					that.pageData=res.data;
					that.pageLoad=true;
					that.provinceid=res.data.provinceid;
				}
			})
		}
	}
})