Ajax中传递Json格式的参数
$.ajax({
type: "post",
url: baseUrl+"sys/login",
dataType: "json",
contentType: "application/json;charset=utf-8",
data: JSON.stringify({userName: loginapp.userName,userPassword: loginapp.userPassword}),
或者拼接字符串的形式:
data: "{'userName': '"+loginapp.userName+"','userPassword': '"+loginapp.userPassword+"'}",