<%--
Created by IntelliJ IDEA.
User: jh
Date: 2017/7/12
Time: 14:31
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>submitUserList_3</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script language="JavaScript" src="https://code.jquery.com/jquery-3.2.1.min.js" ></script>
<script language="JavaScript" src="https://cdn.bootcss.com/jquery-json/2.6.0/jquery.json.min.js" ></script>
<script type="text/javascript" language="JavaScript">
function submitUserList_3() {
var customerArray = new Array();
customerArray.push({groupNo: 1234, configGroup: "2",configKey: "2011,2012",configValue:"2011 - 11,2013 - 22", configdescription: "qwertyui"});
customerArray.push({groupNo: 5678, configGroup: "2",configKey: "2011,2012",configValue:"2011 - 11,2013 - 22", configdescription: "qwertyussghji"});
var sysConfigList = customerArray/* {
cardLevelName: "测试电子卡价格策略接口杨坤",
partnerName:"李四渠道",
isCobranded:"2",
registerFee:"10",
effectiveDays:"100",
cardType:"1",
allowUseOnline:"1",
allowUseOffline:"1",
periodType:"1",
status:"1",
allowRenew:"1",
cardPriceEcardPolicyList: customerArray
};*/
$.ajax({
url: "/sysConfig/insertSysConfig",
type: "POST",
contentType : ‘application/json;charset=utf-8‘, //设置请求头信息
dataType:"json",
//data: JSON.stringify(customerArray), //将Json对象序列化成Json字符串,JSON.stringify()原生态方法
data: $.toJSON(sysConfigList), //将Json对象序列化成Json字符串,toJSON()需要引用jquery.json.min.js
success: function(data){
alert(data);
alert("ok");
},
error: function(res){
alert(res.responseText);
}
});
}
</script>
</head>
<body>
<h1>submitUserList_3</h1>
<input id="submit" type="button" value="Submit" onclick="submitUserList_3();">
</body>
</html>