filter.wxs 295 B

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