Compare commits
2 Commits
39700f1d0a
...
47f0ef23d0
| Author | SHA1 | Date | |
|---|---|---|---|
| 47f0ef23d0 | |||
| 13fc93f8d2 |
@ -298,7 +298,13 @@ export default {
|
||||
val += cost * item.num
|
||||
}
|
||||
})
|
||||
data.itemInfo.goods_cost = (val / 100).toFixed(2)
|
||||
data.itemInfo.goods_cost = toTwoDecimals(val)
|
||||
}
|
||||
|
||||
function toTwoDecimals(num) {
|
||||
let truncated = Math.floor(num)
|
||||
let result = truncated / 100
|
||||
return result.toFixed(2)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user