1、Illegal invocation
Processing method: the portion marked in red -
the FormData new new formData = var (); formData.append ( 'imgs', "Upload / Fruit / 284333BDBEFB481BB27C8E84FB7C0D82.jpg"); formData.append ( 'reason', $ ( 'TextArea') text ().); $ .ajax ({ type: "POST", URL: "/api/order_cancle.rm", Data: formData, headers: { 'token': sessionStorage.getItem ( "token")}, dataType: 'JSON', the processData: to false, // not tell jquery to handle data sent contentType: false, // do not tell jquery request to set the Content-Type header Success: function (data) {IF (data.code == 100) { the console.log ( "filed success! "); } the else { console.log (" filed failure ")!; }} }); Reference:
https://www.jianshu.com/p/436159828bfa