module.exports = { formatNumber: function (n) { if (isNaN(n)) return 0; var out = n; if (out >= 100000000) { out = (out / 100000000).toFixed(2) + '亿'; } else if (out >= 10000) { out = (out / 10000).toFixed(2) + '万'; } return out } }