filter.wxs 317 B

1234567891011121314
  1. // fliter
  2. function valueFormat(val) {
  3. var out = val;
  4. if(!out) return "-"
  5. if (val >= 10000 && val < 100000000) {
  6. out = (val / 10000).toFixed(2) - 0 + '万';
  7. } else if (val >= 100000000) {
  8. out = (val / 100000000).toFixed(2) - 0 + "亿";
  9. }
  10. return out
  11. }
  12. module.exports = {
  13. valueFormat: valueFormat
  14. }