- // fliter
- function valueFormat(val) {
- var out = val;
- if(!out) return "-"
- if (val >= 10000 && val < 100000000) {
- out = (val / 10000).toFixed(2) - 0 + '万';
- } else if (val >= 100000000) {
- out = (val / 100000000).toFixed(2) - 0 + "亿";
- }
- return out
- }
- module.exports = {
- valueFormat: valueFormat
- }
|