Commit 6ab9d9e2b594b410b25b242ed4d8e2d8d284d111
1 parent
7afe595a
filter文件修改
Showing
1 changed file
with
5 additions
and
0 deletions
utils/filter.wxs
... | ... | @@ -143,6 +143,10 @@ var filters = { |
143 | 143 | return val / 100; |
144 | 144 | }, |
145 | 145 | |
146 | + div100: function(val) { | |
147 | + return val / 100; | |
148 | + }, | |
149 | + | |
146 | 150 | // 计算百分比, 不带百分号 |
147 | 151 | percent: function(num1, num2) { |
148 | 152 | // console.log('百分比',Math.round(num1/num2 * 10000) / 100); |
... | ... | @@ -188,5 +192,6 @@ module.exports = { |
188 | 192 | difference: filters.difference, |
189 | 193 | multiply: filters.multiply, |
190 | 194 | price: filters.price, |
195 | + div100: filters.div100, | |
191 | 196 | JSONStringify: filters.JSONStringify, |
192 | 197 | } |
193 | 198 | \ No newline at end of file | ... | ... |