as shown in the picture, the undefinde error is reported, but I don"t understand the error. Please take a look at it.
as shown in the picture, the undefinde error is reported, but I don"t understand the error. Please take a look at it.
alert(data.errmsg); // errmsg echo echo return
response check the results returned by the response to see what is returned
I think it is not the error of js, but the error of the result returned by the controller. If this is TP5, it should be the result of return so that the frontend can accept that
if (data.errno) is not data ['errno']
try to return the array directly. TP5 may be configured with JSON format by default.
tp5 returns json data directly to the ajax of js (['status'= > 1 json data returns = > $data]);
and then the js side is
success:function (e) {
if (e.status = = 1) {
alert(e.data);
}
}
Previous: What are the problems encountered when uploading files by React?
Next: How does the Baum of laravel get the final parent id of a record