Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript 不支持Long类型,导致数据精度丢失显示异常。 #15

Open
xdh725 opened this issue Jan 27, 2022 · 0 comments
Open

Comments

@xdh725
Copy link

xdh725 commented Jan 27, 2022

数据库中integer存储的是Int64的数字,在传输过程中,Long长度大于17位时会出现精度丢失的问题。

在Chrome浏览器调试时也发现,Preview与Response因为精度丢失的原因,显示的数据不一致。

比如 365942491263795226 会显示成 365942491263795200 。

一种方案是将Long类型的整形转成String传输。
一种方案是前端反序列化时不使用默认的JS解析器。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant