Merge pull request 'yyw提交' (#25) from yyw into master

Reviewed-on: #25
This commit is contained in:
vivanlina 2025-12-19 09:10:42 +00:00
commit 47f0ef23d0

View File

@ -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(() => {