|
@@ -25,7 +25,13 @@ Page({
|
|
|
url: '/mini/canteen/getDeliciousList',
|
|
|
method: 'GET'
|
|
|
}).then(res => {
|
|
|
+ let temp = [];
|
|
|
res.data.forEach(element => {
|
|
|
+ if (element.deliciousList.length > 0) {
|
|
|
+ temp.push(element);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ temp.forEach(element => {
|
|
|
element.deliciousList.forEach(item => {
|
|
|
if (item.dishesPic) {
|
|
|
wx.getImageInfo({
|
|
@@ -33,7 +39,7 @@ Page({
|
|
|
fail() {
|
|
|
item.dishesPic = '';
|
|
|
that.setData({
|
|
|
- canteenList: res.data
|
|
|
+ canteenList: temp
|
|
|
})
|
|
|
}
|
|
|
});
|
|
@@ -41,7 +47,7 @@ Page({
|
|
|
});
|
|
|
});
|
|
|
this.setData({
|
|
|
- canteenList: res.data
|
|
|
+ canteenList: temp
|
|
|
})
|
|
|
})
|
|
|
},
|