Springboot + vue 后端把Long类型的数据传给前端,前端可能会出现精度丢失的情况,以及解决方案
1前端解决方案:https://juejin.im/post/5c51526fe51d455047338a2a这位大神的方法 获取到jsonlint.js然后导入本地vue项目本地使用import jsonlint from "@/utils/jsonlint.js"// 创建axios实例const service = axios.create({ 在这里重写方法 transformResponse: [function (data) { // Do whatever.
原创
2020-07-03 10:38:39 ·
2882 阅读 ·
0 评论