accuracy(n) {
let res = parseFloat(n)
if (isNaN(res)) {
// '传递参数错误,请检查'
return 0
}
res = Math.round(n * 100) / 100
let s_x = res.toString()
let pos_decimal = s_x.indexOf('.')
if (pos_decimal < 0) {
pos_decimal = s_x.length
s_x += '.'
}
while (s_x.length <= pos_decimal + 2) {
s_x += '0'
}
return s_x
}