util-fun.wxs 198 B

123456789
  1. var filter = {
  2. getPercent: function(item){
  3. if( item.isFinish) return 100;
  4. return parseInt(item.position*10000/item.duration)/100;
  5. }
  6. }
  7. module.exports = {
  8. getPercent: filter.getPercent
  9. }