wx.request({
url: app.requestUrl("Index/answer"),
method: 'POST',
data: {
answer: JSON.stringify(needData),
},
header: { "content-type": "application/x-www-form-urlencoded" },
dataType: "json",
success: function(res) {
}
});
public function answer(){
$answer=I('post.answer');
$answer=htmlspecialchars_decode($answer);
$answer=json_decode($answer);
}