new-cashier/jeepay-ui-uapp-face/commons/utils/cal.js

16 lines
268 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/***
* 单位换算 分转元
* data, 原始数据
* list 需要装换的 数组 object的 key
* */
function yuan(data, list = []) {
const obj = data
list.forEach((v) => {
obj[v] = (obj[v] / 100).toFixed(2)
})
return obj
}
export default { yuan }