let x = String(loanRate).indexOf('.') + 1; //小数点的位置 let y = String(loanRate).length - x; //小数的位数 相关文章: