小数相加精度问题,保留两个小数位

Math.round(totalPrice * 100) / 100;
原文地址:https://www.cnblogs.com/ZenoPan/p/9798745.html