前段JSON如下 :
function newAffair() {
$.ajax({
type: "post",
url: "http://localhost/Sky.SftoaMobileWS/SftoaMobileWebService.asmx/newAffair",
data: {'uid':'0ca311cc-31dd-4aef-8db5-f73d798e3c56','type':'2', 'content': { 'dealuser':'1','memo':'test','begindate':'2015-09-10','begintime':'1','enddate':'2015-09-11','endtime':'1'}, 'attachments': [{aid:'1',aname:'a1'}] },
dataType: 'json',
contentType: 'application/json;charset=utf-8',
success: function(data) {
},
error: function(msg) {
alert(msg)
}
});
}
C#WEBSERVICE写法如下 :
/// <summary>
/// 新申请事务
/// </summary>
/// <returns></returns>
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json, UseHttpGet = false)]
public object newAffair(object uid, object type, object content, object attachments)
{}
可是在调试的时候,会发现无法进入WEBSERVICE的newAffair方法,请问 我该如何更改我的写法,谢谢。