From 147dbe0e1540c0d1b61855f0d37e5856d54f54d8 Mon Sep 17 00:00:00 2001
From: czx <28353131@qq.com>
Date: Tue, 1 Dec 2020 16:07:35 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=AF=8F=E5=91=A8=E8=8F=9C?=
=?UTF-8?q?=E8=B0=B1=E8=87=AA=E5=8A=A8=E8=AE=A1=E4=BB=B7=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ruoyi-ui/src/views/fantang/weekMenu/index.vue | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/ruoyi-ui/src/views/fantang/weekMenu/index.vue b/ruoyi-ui/src/views/fantang/weekMenu/index.vue
index 7adabc7fb..aa478dec1 100644
--- a/ruoyi-ui/src/views/fantang/weekMenu/index.vue
+++ b/ruoyi-ui/src/views/fantang/weekMenu/index.vue
@@ -36,8 +36,8 @@
-
-
+
+
", row);
+ console.log("foodList-->", this.foodList)
let ret = 0;
- for(let i =0 ; i < row.foods.length; i++) {
- ret += this.foodList[i].price;
+ for (let i = 0; i < row.foods.length; i++) {
+ let foodPrice = row.foods[i];
+ this.foodList.forEach(item => {
+ if (item.foodId === foodPrice) {
+ ret += item.price;
+ }
+ });
}
- this.weekMenuList[row.id -1 ].price = ret;
+ this.weekMenuList[row.id - 1].price = ret;
},
// 控制合并列