精度丢失

parent 31230581
...@@ -47,10 +47,10 @@ ...@@ -47,10 +47,10 @@
</div> </div>
<div class="price"> <div class="price">
合计: 合计:
<span>{{ totalPrice }}</span> <span>{{ totalPrice / 100 }}</span>
</div> </div>
</div> </div>
<div class="submit" @tap="toSettle">去结算({{ totalPrice }})</div> <div class="submit" @tap="toSettle">去结算({{ totalPrice / 100 }})</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -68,7 +68,7 @@ const totalPrice = computed(() => { ...@@ -68,7 +68,7 @@ const totalPrice = computed(() => {
cartList.value.forEach((item) => { cartList.value.forEach((item) => {
item.prodInfos.forEach((c) => { item.prodInfos.forEach((c) => {
if (c.isChecked) { if (c.isChecked) {
total += c.skuPrice * c.count; total += c.skuPrice * 100 * c.count;
} }
}); });
}); });
......
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