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 ·
2717 阅读 ·
0 评论