<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<script type="text/javascript" src="jquery-3.2.1.min.js"></script>
<script type="text/javascript">
$(function(){
$("#testAjax").click(function(){
var json={ "parameters": "[\"59e6f73a471a1b\",\"demo\",\"888888\",2052]"}
json.timestamp=new Date().getTime().toString();
var jsonstr=JSON.stringify(json);
$.ajax({
type: "POST",
url:'http://172.19.66.55:8888/k3cloud/Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser.common.kdsvc',
contentType: "application/json; charset=utf-8",
data: jsonstr,
success: function(data, textStatus, XMLHttpRequest){
$("#myDiv").html('
'+data+'
');},
error:function(data){
$("#myDiv").html('
'+data+'
');}
});
});
$("#testAjax1").click(function(){
var json={ "parameters": "[\"PUR_PurchaseOrder\",\"{\\\"Number\\\":\\\"CGDD000025\\\"}\"]"};
var myDate = new Date();
json.timestamp=myDate.getTime().toString();
var jsonstr=JSON.stringify(json);
alert(jsonstr);
$.ajax({
type: "POST",
url:'http://172.19.66.55:8888/k3cloud/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.View.common.kdsvc',
contentType: "application/json; charset=utf-8",
data: jsonstr,
success: function(data){
$("#myDiv").html('
'+data+'
');},
error:function(data){
$("#myDiv").html('
'+data+'
');}
});
});
});
</script>
</head>
<body>
<div id="myDiv">
<button id="testAjax" type="button">登陆</button>
<button id="testAjax1" type="button">查询</button>
</body>
</html>
test.zip(30.38KB)