$(document).ready(function(){
	$("#activityId").select2({
		placeholder : "请选择",
		allowClear : true
	});
	
})


var wish = {
	
	search : function(url){
		var activityId = $("#activityId").val();
		var searchStr = $("#searchStr").val();
		var url = webPath + "/rainbow/wish/list";
		
		if(activityId!="" || searchStr!=""){
			var param = "?"
			if (activityId != ""){
				param = param + "activityId=" + activityId ;
			}
			
			if (searchStr != ""){
				if (param == "?"){
					param = param + "searchStr=" + searchStr;
				} else {
					param = param + "&searchStr=" + searchStr;
				}
				
			}
			url = url + param;
		}
		window.location.href = url;
	}
	
	
}