until.wxs 277 B

12345678910111213
  1. module.exports = {
  2. formatNumber: function (n) {
  3. if (isNaN(n)) return 0;
  4. var out = n;
  5. if (out >= 100000000) {
  6. out = (out / 100000000).toFixed(2) + '亿';
  7. } else if (out >= 10000) {
  8. out = (out / 10000).toFixed(2) + '万';
  9. }
  10. return out
  11. }
  12. }