()
| 65 | } |
| 66 | }, |
| 67 | changeData() { |
| 68 | // 1.获取所有选中数据 |
| 69 | let totalPrice = 0; |
| 70 | let counter = 0; |
| 71 | |
| 72 | for (let item of this.data.cartList) { |
| 73 | if (item.checked) { |
| 74 | counter++ |
| 75 | totalPrice += item.price * item.count |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | console.log(counter, totalPrice) |
| 80 | |
| 81 | // 2.修改数据 |
| 82 | this.setData({ |
| 83 | totalCounter: counter, |
| 84 | totalPrice: totalPrice |
| 85 | }) |
| 86 | } |
| 87 | }) |
nothing calls this directly
no outgoing calls
no test coverage detected