HACKER
TALK
Home
Channels
beta
Bookmarks
Messages
Notifications
Sign In
Comment
关于前端拿到后端长整数数据精度失真问题
后端返回数据 id 长度为19, "data": { "records": { "id": 15793455538242
HD Superman
·
2 years ago
Across the Great Wall, we can reach every corner in the world.
后端要处理,这是个很常见的问题,js 不支持64位整数,id太长会被截断,后端传输的时候需要转换为 string 类型
Reply
Report
HD Superman
Joined 3 years ago
Across the Great Wall, we can reach every corner in the world.
github.com/hdsuperman
Follow
Message