Product detail ajax api data structure updated

This commit is contained in:
Vion 2022-03-14 11:06:58 +08:00
parent ae9f2e34e6
commit 3201a6ee2e

View File

@ -344,12 +344,13 @@ export default {
let stopIndex = 0; let stopIndex = 0;
for(let singleCode of productCode) { for(let singleCode of productCode) {
let data = await goodsmessage(singleCode); let data = await goodsmessage(singleCode);
if (data && data.data.length>0) { console.log(data);
newlist.push(data.data[0]); if (data && data.length>0) {
newlist.push(data[0]);
if(data.data[0].leftAllotment>0 && !stopLeftAllotmentChecking) { if(data[0].leftAllotment>0 && !stopLeftAllotmentChecking) {
activeIndexa = stopIndex; activeIndexa = stopIndex;
curItem = data.data[0]; curItem = data[0];
stopLeftAllotmentChecking=true; stopLeftAllotmentChecking=true;
} }
stopIndex++; stopIndex++;