Commit 5a094e81 authored by jiangjiantao's avatar jiangjiantao

bugfix

parent 4169b063
...@@ -13,9 +13,9 @@ Page({ ...@@ -13,9 +13,9 @@ Page({
//总数量 //总数量
totalQuantity: 0, totalQuantity: 0,
//折后价格 //折后价格
totalPrice: "0.00", totalPrice: 0.00,
//折扣 //折扣
totalDisc:"0.00", totalDisc:0.00,
goods: [ goods: [
] ]
}, },
...@@ -180,7 +180,7 @@ Page({ ...@@ -180,7 +180,7 @@ Page({
let pricetemp = 0; let pricetemp = 0;
goods.forEach(function (item, index, array) { goods.forEach(function (item, index, array) {
quantitytemp = quantitytemp + item.quantity quantitytemp = quantitytemp + item.quantity
pricetemp = pricetemp + item.price pricetemp = pricetemp + item.price*item.quantity
}) })
this.setData({totalQuantity:quantitytemp,totalPrice:pricetemp}) this.setData({totalQuantity:quantitytemp,totalPrice:pricetemp})
//数据同步到前屏 //数据同步到前屏
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment