class Common{
	constructor() {
	    
	}
	
	//跳转
	navTo(url){
		uni.navigateTo({
			url:url
		})
	}
	
	goback(url){
	 var page = getCurrentPages();
	 let windpowerstationName =  uni.getStorageSync('windpowerstationName');
	 page[0].$vm.address = windpowerstationName;
  //    uni.showModal({
		// 		title: '提示',
		// 		content: page,
		// 		success: function (res) {
		// 			if (res.confirm) {
		// 				console.log('用户点击确定');
		// 			} else if (res.cancel) {
		// 				console.log('用户点击取消');
		// 			}
		// 		}
		// 	});
		
		uni.switchTab({
			
			url: url,success: function(e) {				
				//if (page[0] == undefined || page[0] == null) return;
					page[page.length-1].onLoad();
				}
				
		})
		
		
	}
	
	
}

let common = new Common();
export default common;