ajax请求失败,状态码: 200 ,状态: 4 ,错误信息: parsererror
const getPDFData = () =>
new Promise((resolve, reject) => {
fetchData(_this, options, function (res) {
resolve(res);
});
});
let res = await getPDFData();
//获取库位
let barcode = res.data.records[0].barcode
let optionLoc = {
url: `/wmsrest/product/outwx/getLocCode?sn=${barcode}`,
type: "post",
// condition: parameter,
contentType: "application/json; charset=utf-8",
};
const getLocCode = () =>
new Promise((resolve, reject) => {
fetchData(_this, optionLoc, function (res) {
resolve(res);
});
});
let locCode = await getLocCode();
parsererror
解析错误咯,看看返回格式是否符合要求。看起来像是直接返回了
result
没有按照接口的格式包裹返回结果啥的。