API : https://api.weixin.qq.com/wxa/servicemarket?access_token
params = {
"service": "wx79ac3de8be320b71",
"api": "OcrAllInOne",
"data": {
"img_data": "",
"data_type": 2,
"ocr_type": 1
},
"client_msg_id": "id123"
};
$.ajax({
type: "POST",
url: "https://api.weixin.qq.com/wxa/servicemarket?access_token=token",
contentType: "application/json",
data: JSON.stringify(params), //此处注意,要转换成JSON.stringify(对象)
dataType: "json",
success: function (data) {
},
error: function (data) {
}
});