bindAddm3:function(e) {
var rm3 =(this.data.numg1 * 1 / ((this.data.numg1 * 1 / this.data.numd1 * 1 + this.data.numg2 * 1 / this.data.numd2 * 1 + this.data.numg3 * 1 / this.data.numd3 * 1) / 3 *2 - 1));
console.log(rm3);
this.setData({
resultm3: rm3
})
四舍五入:
num = num.toFixed(2)
不四舍五入,直接截取:
Math.floor(15.7784514000 * 100) / 100
console.log(rm3.toFixed(2))