您将内容类型设置为,
application/json但正在发送
application/x-www-form-urlenpred数据。
设置正确的内容类型:
$.ajax({ url: '/share', type: 'post', contentType: "application/x-www-form-urlenpred", data: $('#share-form').serialize(),或更妙的是,通过
contentType完全省略键将其保留为默认值。

您将内容类型设置为,
application/json但正在发送
application/x-www-form-urlenpred数据。
设置正确的内容类型:
$.ajax({ url: '/share', type: 'post', contentType: "application/x-www-form-urlenpred", data: $('#share-form').serialize(),或更妙的是,通过
contentType完全省略键将其保留为默认值。