$(function(){

	$("#submitBtn").click(function(){
		var siteName = $("#siteName").val();
		var tel = $("#tel").val();
		var email =$("#email").val();
		var address = $("#address").val();
		var logo=$("#logo").val();
		var keyword=$("#keyword").val();
		var description =$("#description").val();
		var qrcode=$("#qrcode").val();
		var wxcode =$("#wxcode").val();
		var wxopen = $("#wxopen").val();

		layer.confirm('是否保存当前站点配置信息', function() {

			var params={
					siteName:siteName,
					tel:tel,
					email:email,
					address:address,
					logo:logo,
					keyword:keyword,
					description:description,
					qrcode:qrcode,
					wxcode:wxcode,
					wxopen:wxopen
			};
			$.ajax({
				url: HttpRest+"protal/save.shtml", 
				type: "post", 
				dataType: "json",
				data:$.toJSON(params),   
				contentType:"application/json",
				success: function(data) { 
					if(data.code=='01'){
						layer.msg('保存成功！',{icon: 1});
					}else{
						layer.msg('保存失败！',{icon: 5});
					}
				}
			});
		});
	});

});